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.

Version
The current version is 1.1, Nov 1992.
References

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

toyOS.c++.tar.gz [158K]
Complete source code archive, sample programs, traces, and their analysis

published in comp.sources.misc, vol 44, issues 53-56.

 

Macintosh Software

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 quits.
DetectNewVolume.cpt.hqx [80K]
March 1994
 
Saving/restoring PRAM and Extended PRAM
tells in great detail what xPRAM is, what is in there, and how to read and write it.
<xPRAM.html>
 
Get a full (path) file name from an AliasRecord
determines the full path name of a file from the corresponding AliasRecord or FSSpec. The function is especially useful when dealing with odoc, pdoc or any other file-related AppleEvent.
alias_to_fname.cc [6K]
June 1996
 
``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 System Folder.
launch-creator.cpt.hqx [24K]
June 1996
 
My own ``standard'' programming environment
utility C++ functions/classes for several common Mac chores. Among them are posting of synchronous and asynchronous notifications, doing printf() into an alert box, and the automatic conversion from a C to a Pascal string. Also included is the code for handling of Mandatory Apple Events OpenApplication, {Open|Print}Document, Quit, and a template for getting hold of the files dropped on the application.
mymenv-notify.cpt.hqx [40K]

 
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.
sound-at-random.cpt.hqx [87K]
November 1993
 


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