Hobby OS projects (by alaric)
HYDROGEN's support for multitasking is quite simple; there are primitives to cause a context switch, saving the current state of execution and loading another, with the in-memory structure of saved contexts being implementation specific - and the device interfaces allow for asynchronous interrupts, which automatically save the processor context and start running a designated handler. This interface can be implemented in raw hardware or within a host OS, with signals as the interrupts; it doesn't matter. The most important thing is that there must be a timer device that can generate timed interrupts on demand.
HELIUM builds on this to provide scheduling for threads. The page on the site and my previous blogging on the topic (linked from that page) explain it pretty well; the main thrust is that I'm rejecting the traditional notion of lots of long-running processes that spend most of their time sleeping waiting for work, and instead aim more for tables of handlers for specified events, that access global state through a standard interface for doing so. This means that state of the system is less complex; there aren't hundreds of processes, all in charge of managing their own internal state, saving it to persistent storage when the machine is to be rebooted and bringing it back seamlessly upon reboot. An idle ARGON machine will have code and data cached in memory, but if you hit the power switch, all it'll lose is what it was working on at the time or what was still waiting to be written to disk. The machine will come back up in very little time in just the state it was in when you hit that power switch.
Nice.
By James, Thu 18th Dec 2008 @ 11:13 am
So whens the release? 😛 Wouldn't mind testing this thing with a couple of old forth apps I got kicking around on my drive. -Jim