Educational
<<<
Introduction
Andrew Tanenbaum's MINIX and the associated book were a revolutionary step in teaching operating systems. I experimented with a few educational operating systems (MINIX, Nachos and XINU) during my school days. I am in favor of having (perhaps mandatory) an applied operating systems course for undergraduate Computer Science students.
GeekOS is a tiny bootable operating system kernel that is minimal enough to be useful as an instructional framework in an applied operating systems course (it is indeed used at the undergraduate level at the University of Maryland). According to its creator, the design goals of GeekOS are "simplicity, realism and understandability".
GeekOS does interrupt handling, heap based memory allocation, time-sliced kernel threads (with mutexes and condition variables for synchronization), memory protection for user mode (using x86's segmentation), and simple device drivers for keyboard and VGA (text mode).
GeekOS boots properly under Virtual PC.
As is often the case with people trying MINIX, I tried it first when I read Andrew Tanenbaum's book. Although I have never really modified the MINIX kernel, or developed on (or for) it, I did make a concentrated effort to read the MINIX source during my undergraduate days. Given the system's rather small size, MINIX is undoubtedly of considerable value in understanding how an operating system works and how one is written.
My first installation of MINIX was native. Thereafter I used the Bochs emulator for a while. There seems to be a problem with how Virtual PC and the MINIX "root" floppy, ROOT.MNX interact. Booting fails with a panic message saying something like this:
File system panic: Cannot open RAM image device
I chose to figure out a workaround rather than trying to find out the cause of the problem. Note that DOSMINIX is a distribution of MINIX that works by booting DOS and running a command that boots MINIX. This process employs a hard-disk "file", which corresponds to a 50 MB disk drive with 3 primary partitions. Thus:
- Create an empty Virtual PC instance.
- Use a Linux rescue disk (either a floppy image or a CD image) to boot into a minimal Linux.
- On the Mac, create a CD image that contains the
MINIX.MNXfile (the disk drive) from DOSMINIX. This can be done using the following command line:
mkisofs -R /tmp/minixdisk.iso MINIX.MNX
- Capture the above CD image, and mount it in the already booted Linux. The
cdromdevice will most likely be/dev/hdc. - Do a
ddof the disk file to/dev/hda:
dd if=/cdrom/MINIX.MNX of=/dev/hda bs=512
- This has the effect of automagically creating the 3 partitions (a 1440 KB
root, a 4096 KBswapand a 45 MB/usr) on Virtual PC's hard disk. These partitions are already populated with MINIX - thus, the installation is essentially done. - Note however, that the CHS information in the two "disks" will not match! You can choose to ignore this, and the system will still boot fine if you use
ROOT.MNXto boot and set/dev/c0d0p0as the root device. You can "fix" the CHS numbers if you like.
XINU is a small, elegant operating system with a hierarchical structure. I came across XINU, quite expectedly, when I read Douglas E. Comer's book Operating System Design: The XINU Approach. The second volume, Internetworking with XINU shows how the system can be extended to include Internet protocol software (a minimal UDP/IP implementation is described, along with a shell).
By the way, if you haven't already noticed, XINU is UNIX backwards.
You need a Linux machine (FreeBSD should work too, actually) to compile Xinu and create a bootable disk that works under Virtual PC.
<<<