- Text Input
- The Applications
- The Filesystem
The 2006 firmware update improved a lot of things, but stability wasn’t one of them. After one reboot, I found that the machine would get part of the way through the boot cycle and then restart. Reading the Internet showed me that this was not an isolated problem. The only way of recovering was to re-flash the device, leaving the internal flash back in its precustomized state. I believe the cause of the problem was filling up the internal Flash (just before the reboot, I installed 20MB of LaTeX), but this definitely wasn’t graceful failure.
The device is still crippled by a lack of RAM. I can’t tell whether it’s the Linux kernel, X11, or the applications that are to blame, but 64MB doesn’t seem to cut it any more. I’d be interested to see if NetBSD performs better, but so far no one has ported it to the device. The "solution" to this problem is to configure a swap file on the memory card.
Unfortunately, when you plug the device into a USB cable, it unmounts the memory card and gives the host computer block-level access to it. If you have any applications partially swapped out, it can cause problems.
While we’re talking about memory, let’s talk about how Linux handled out-of-memory (OOM) conditions. In short, it doesn’t. It picks a pseudo-random process, and kills it. I say pseudo-random, because the algorithm seems to be "which process has the most unsaved work?"
For a system such as the 770, the correct way of handling low-memory conditions is to add two new signals—let’s call them SIGLOWMEM and SIGOOM. When you are down to (say) 5MB, you send SIGLOWMEM to all processes. This is ignored by default, but compliant applications will catch it and flush in-core caches and buffers. When memory gets really constrained, you start sending SIGOOM to applications (starting with those that handled input the least recently). Again, this is ignored by default, but compliant applications will save their state and quit. Only after this do you start killing applications. The 770 does the first of these, but it seems that the most any application does is pop up a little warning that says "You are out of memory."
Linux is built on the assumption that running out of memory almost never happens. On the 770, this is not valid.