December 28, 2011 § Leave a comment
I recently learned about fork bombs and I find myself intrigued by the simplicity behind them.
For those who are unfamiliar with them, I quote the Wikipedia article which provides a nice succinct definition:
A fork bomb works by creating a large number of processes very quickly in order to saturate the available space in the list of processes kept by the computer’s operating system. If the process table becomes saturated, no new programs may start until another process terminates.
Here’s the Python example from the article:
import os while True: os.fork()
Pass those three lines to the Python interpreter and you’ll crash your machine. This isn’t even the shortest example – the Windows batch example is five characters (%0|%0). You can even (apparently) create one in HTML and JS which would allow you to lock a computer (independent of OS) just by visiting a website.
I don’t bring this up to suggest that this is something you should do. Far from it in fact. Rather, I find this simplicity quite elegant (this is what intrigues me). With such a limited input, you can lock up an OS. I’ve tried it (using the Python example above) and the results were interesting. The virtual machine I tried this in slowly sucked up the RAM available to it to the point of locking up. When I say lock up, I mean it in the old ‘Windows 98’ style when nothing was responsive.
Moral of the story: simplicity can still beat complex OS design.
December 21, 2011 § Leave a comment
So I’ve decided to do a test of the major browsers available for the Mac to see how they’re doing. Before I show you the results, one thing to note about my browser habits is that I use nightly/dev builds. I like to get new features as soon as I can so I don’t actually use stable builds. As such, the following is a list of browsers that will be tested with the corresponding version and/or build numbers.
- Firefox Nightly (12.0 a1 2011-12-21)
- Opera Next (12.00, build 1213)
- Webkit (r 103402)
- Chrome (17.0.963.12 dev)
What is most surprising about this is Firefox’s performance. For the first time (in my experience), Firefox has the best SunSpider score. What’s even more surprising is Chrome’s relatively poor performance. For a browser focused on JS performance, it’s disappointing to see it finish in 3rd.
Chrome and Opera’s performance here is not at all surprising. Both Google and Opera put a lot of work into adding as much support as they can to their browsers. The Webkit and Firefox nightly results are not surprising with respect to placing but I’m surprised at how low Firefox’s score is comparatively.
This is a custom test that I designed (you can view it here). It tests a variety of things but primarily, it tests HTML5 and CSS features. Opera’s last place finish here is a little disappointing but other than this, the results are rather unsurprising.
Peacekeeper tests a variety of JS and HTML features including the performance of each browser in video playback and WebGL (I think). Chrome’s far greater score here was expected and to be honest, none of these scores is all that surprising.
Chrome finished first in three of the four tests that I did which might lead one to think that Chrome was far superior. When you consider that it has a healthy extension ecosystem (not quite Mozilla large but sizeable enough), has built in PDF support and has a built in Flash plugin that is automatically updated (thus preventing problems that might come with old Flash installations), it seems harder to believe that it isn’t the best out there. That said, it has some serious flaws including (and this one is big for me) its inability to handle multiple tabs. I can’t tell you the number of times that Chrome has comes to its knees trying to open twenty tabs while something like Opera can handle that task with ease.
As always, not only are these tests relatively meaningless to the average user but browser choice should be based on personal comfort with each.