Operating Systems and Systems Programming
Kernel of a simple OS in C++
This is yet another UNIX-like toy operating
system, which runs on emulated hardware. This was an extended
class project, so I was not at liberty to choose architecture, the
instruction set, and the system calls to implement.
Highlights: UNIX-like OS kernel with semaphores, virtual memory and
asynchronous I/O, hardware emulator, ``bus'' paradigm for both OS and
hardware, extensibility to multi-processor architecture, C++
in full grace.
This project was carried out in Fall 1992.
- The current version is 1.1, Nov 1992.
C++ *is* good for writing OS kernels. Here's an example. [plain text file]
An article posted on the newsgroup comp.lang.c++ on
Tue Sep 13 09:43:22 CDT 1994
Complete source code archive, sample programs, traces, and
comp.sources.misc, vol 44, issues
- Detect Volume Mount
- detects a newly mounted volume and ``double-clicks'' on a
document/ application at a ``standard'' location on that volume. This
application can be used to tell the user (a student) what's new on
some particular volume or how to use it. The document being
``clicked'' may be a simple message-of-the-day text or an application
that somehow prepares the student for using the (file server) volume,
whenever the volume is mounted. A distinct feature is a dynamic,
transient patching of a system trap -- the patching that does not
require restarting the system and gets uninstalled when the daemon
- Saving/restoring PRAM and Extended PRAM
- tells in great detail what
xPRAM is, what is in
there, and how to read and write it.
- Get a full (path) file name from an AliasRecord
- determines the full path name of a file from the
function is especially useful when dealing with
pdoc or any other file-related
- ``Double-click'' on a file from within a running program
- This is a simple function that, given a file name, launches an
application-creator and has it handle the file. That is, it gets the
Finder to do what the Finder normally does when you double-click on an icon.
The name of the file/folder to open can be specified either as an
ASCII C string, or as a
FSSpec. There is also
code to convert
FSSpec to the full path name, and to figure
out the full path name to the
- My own ``standard'' programming environment
- utility C++ functions/classes for several common Mac
chores. Among them are posting of synchronous and asynchronous
printf() into an alert box, and the
automatic conversion from a
C to a
string. Also included is the code for handling of Mandatory Apple Events
Quit, and a template for getting hold of the files
dropped on the application.
- Pick a sound at random and play
- The sound is picked from a folder of sound files or from
suitcase(s). This makes for a good start-up application.
Last updated October 5, 2008
This site's top page is http://okmij.org/ftp/
oleg-at-pobox.com or oleg-at-okmij.org
Your comments, problem reports, questions are very welcome!
Converted from SXML by SXML->HTML