4 ms·
What would be necessary to adapt a Linux distro to be crash-only? shutdown now really would mean shutdown now. Unfortunately, I doubt many Linux services or app
by cpeterso 15y ago
What would be necessary to adapt a Linux distro to be crash-only? shutdown now really would mean shutdown now. Unfortunately, I doubt many Linux services or applications would be happy if there shutdown scripts did not run.
If the distro can't be made crash-only, perhaps just the Linux kernel could. After executing shutdown scripts for userspace services, just crash the kernel. Good tests for filesystems and device drivers! :)
- justincormack 15y agoYou can work towards making userspace crash only. Generally you want to make it stateless as much as possible, ie avoid writing to lots of files, only config databases that are crash proof. A few people have been looking at stateless userspace eg see http://www.infoq.com/presentations/Runtime-Changes http://www.infoq.com/presentations/Runtime-Changes Current Linux distros generally have too much poorly documented state in the filesystem, much of which may not be updated in a crash proof way...
- forgotusername 15y agoThe kernel (along with a modern FS) already is crash-only. Journals are designed to recover a FS quickly from any state after a power failure. The remainder of the kernel mostly is a bunch of in-memory structures recreated on every boot. As for userspace, well, e.g. Firefox is a lot of the way there. SQLite itself is designed to handle failures extremely gracefully, and by virtue of regularly flushing most of its state into SQLite, Firefox itself achieves a great deal of reliability (although this might not be true of its cache storage, etc.).
- X-Istence 15y agoMac OS X has already provided a lot of the framework for applications, it is opt-in for app developers, but it allows for an app to be kill -9'ed on shutdown. Definitely take a look at Sudden Termination as Apple calls it. It is one of the few features along with restoring apps as they were upon login means that a reboot is no longer a productivity killer.