204 points · by DanielHimmelein · 15y ago · 20 comments
I do OS development and most of my coworkers had similar experiences.
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 stuck with it had I used a VM and some scripts.
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).
For me, the worst part of writing an OS to x86 is that you have to start with a bootloader, a primitive filesystem, change CPU modes... all that before you get to the fun part (memory management, threads, running programs, improving your filesystem). Then I discovered LILO and GRUB, but it was too late!
Some of the languages available: C, C++, Python, Ruby, Perl, Lua, Haskell, Scheme, Squirrel, Yabasic, bash (comes with a bash shell), zsh
Some of the developer tools available: Paladin (its own IDE), Git, Hg (Mercurial), GNU Compiler Collection, Vim, QEMU, Bochs
Some of the technologies used: Multi-process WebKit browser, OpenGL, OpenAL, SDL and Qt libraries, Gutenprint and CUPS for printing, FreeBSD network drivers, Haiku Vector Icon Format
On the way: An ARM port, Clang with the already working LLVM, OpenJDK, Gallium3D, package management, more language bindings for the API
Included below is ways to contact, lessons and software sources:
freelists.org/list/haiku
freelists.org/list/haiku-development
haiku-inc.org
haiku-screencasts.blogspot.com
www.haiku-os.org/blog/darkwyrm
www.osnews.com/story/24945/A_Programmer_s_Introduction_to_the_Haiku_OS
haikuware.com (back online shortly)
bebits.com
There's also a wallpaper contest going on. I am not affiliated but I'd love to see more people get involved in this great OS! :)
Doing a stage 1 install of Gentoo or some similarly masochistic distro-installation trick (Linux From Scratch, hurrah!) means you're good at reading an install guide. After you install Gentoo, could you immediately go and write a kernel driver, or even set up NFS, since you know Linux from the ground up?