It's funny, but this could have been me. I also wrote a toy OS in 2001 and I learned by using many of the same resources you listed. One thing that makes this all SO much easier these days is the Virtual Machine. I remember back in '01 I didn't really know much about them and so, everytime I wanted to test my OS, I would dd it to a floppy and then boot it on a crappy laptop I had lying around. I probably would have s…
What would you say about writing an OS on something like an Arduino ? Without mucking with ASM, you could at least give it the ability to run multiple processes and implement some IPC. I've been trying to do something of the sort but I've got other high-priority stuff to get out of the way first.
At the moment, IPC is very simple: since there is no memory protection, tasks can access each others memory. I have a very simple mutex implementation (basically, a spinlock where tasks yield if the mutex is locked) to protect shared memory, but so far thats it. I plan on supporting a maibox/messaging system sometime soon. I still have not got a memory management system though, so tasks need to know ahead of time what memory they may use. Currently, tasks are all within the one program binary (ie, no runtime program loading yet), so the C compiler can handle most of this, butI cannot use malloc unless I temporarily turn off premptive multitasking. I cant just turn off interrupts because PIC24's only allow you to turn off interrupts for a known number of cycles and I don't know how many cycles malloc may take.
I have already got some UART code to interface with a bluetooth module, and I plan on writing a little shell for it soon, so that I can connect to it from a laptop/desktop over bluetooth.
I also want to expand the scheduler/multitasking to have more RTOS-like features: task priorities, higher priority tasks pre-empt lower priority tasks, deadlines (and an error system for when deadlines are not met) etc
Another thing I would like to add reasonably soon is an SD Card interface and FAT driver, so that I can load files/programs/configuration from SD cards.
Finally, I need to finish the driver interface and write some drivers for my most commonly used peripherals (planned devices I plan to support for my own use: various types of buttons, analog input devices (sliders, pots), seven segment displays, LCDs, SRAM modules, USB devices (some of the devices I am developing for have USB OTG), an RF module I have, a way for two devices running my OS to talk to each other over SPI, eventually ethernet).