He loses me here. My iPhone has a 32GB SSD hard drive. Sounds like a perfect medium for swap space to me...
He loses me here. My iPhone has a 32GB SSD hard drive. Sounds like a perfect medium for swap space to me...
The techie in me was aghast at the idea of Apple shipping iPhones with a full Unixy kernel but with no swap (and minimal background processing -- and for that matter, I wondered why its Objective-C runtime didn't support garbage collection) until I actually laid hands on one and realized how fluid things can be when they don't stutter and stop randomly while swapping in parts of the foreground program.
Such jerkiness gives a feel of "computeriness" to the user when running desktop OSes, breaking the feeling of fluid interactivity that one gets with a "real-world" object. It also causes a lot of user anxiety and even errors: it becomes a normal part of the experience to click on an item and then have a second or two of wondering whether the app "heard" you or not. Often followed by more clicks, which end up being misinterpreted when the app finally gets to run again, and now the user's mental model is completely out of sync with the system's state.
In the physical world, you never flick a real switch on a panel and then it actually moves a second or two later!
I know some old lights which do that.
It was in the 80's that PCs couldn't even scroll a line of text without making odd stops at times, it was in the 90's when I was surprised to still keep seeing the phenomenon, and it's these days that I can still see a modern Windows screensaver stutter for no reason. Or just some mouse click taking a few seconds "to deliver".
The reason I (and so many other people) so adored the Amiga still late in the 90's is that anything like that was completely unheard of. The computer was just so snappy. Everything happened pretty much immediately. I remember that around 1995 or so there was a web page that had 256 GIF animations playing on it simultaneously. My bare Amiga could run them all smoothly despite me even doing something else in another window. My friend's Pentium pretty much choked on the very same page.
Linux desktop is nothing compared to Amiga. BeOS was close but died as well. I want a completely 100% responsive, stutter-free multitasking desktop/ipad/phone because I know it's possible. I don't want to settle for too slow latency or live with the false claim that to be snappy you can only run one application at a time.
No swap file + no virtual memory + lots of stuff pre-cached onto RAM disk = snappiest user experience ever.
But, ah...
lea bbye,a0
move.l (a0),$80
trap #0
rts
(to take it back on-topic)Embedded engineer here: Solid State Drives do lots of things GREAT. However "being a drive which swap is used on" is not one of them. That's because swap memory is written very often compared to any other portion of the drive. This quickly wears out the drive in that location (and all flash has a limited number of writes, and SSD is a flash technology).
There are specific drivers for doing swap on flash devices. But it isn't easy to do well without compromising usable life of the device.
IF you're interested in doing virtual memory in an app: http://www.alexcurylo.com/blog/2009/05/14/tip-iphone-virtual... is a way to do it, there is a hacked iphone app that also enables it too (don't have a URL offhand).
I dis-recommend doing so.
http://serverfault.com/questions/23720/should-you-disable-pa...
If it's correct that at least Palm's webOS and Maemo dare to swap on flash storages, we shall see soon...
(they can cut corners in data storage requirements right now because the drives are written-to/read-from much less often than on a PC, so both longevity and speed are much smaller concerns)