Java in Operating Systems Courses
Note:
This web page made sense in the early days of Java, when several of us
were struggling with how to use it in OS courses. At this point, Java
is mainstream and this web page is an anachronism. Moreover, the
contents of this page have become extremely dated; the last addition was made
in December of 2004, but before that the next most recent was one in
November of 2001, and before that nothing since
May of 1997. This is because people stopped sending me things to
add. Given that the premise of the page is anachronistic, that makes sense.
This is a list of resources for using the Java programming language in
courses on operating systems principles. There are four main
approaches I know of to using Java in such a course:
-
Use Java to teach the principles of concurrent programming, not in
particularly operating-systems related context.
-
Use Java to write individual operating system components. For
example, it is possible to write a file system in Java.
-
Use Java to write a simulator for a full operating system, including
the machine it is running on.
-
Use Java to write programs that make non-trivial use of
operating-system services (such as network communication) in order to
teach more about those services.
Given this variety of options, I expect the below list of resources
to grow; please send me email if you
have something I could add.
Enough preliminaries, here are the resources I know of so far:
-
The JNode project is an open-source
effort to develop a Java operating system.
-
Jeff Magee and Jeff Kramer of Imperial College
have a supporting web site,
Concurrency: State Models & Java Programs, for their
book of the same title.
-
David Jones of
Central Queensland University has a team working on RCOS.java,
a simulated operating system (including underlying machine),
implemented as a Java applet. A preliminary version is already
available.
-
Steve Hartley of
Drexel University has a collection of
example concurrent programs written in Java which are to form the
basis of a book. These would be suitable for the concurrent
programming portion of an operating systems course, as well as for a
course specifically on concurrent programming.
-
Marvin
Solomon of the University of Wisconsin - Madison has a whole
introductory
operating systems course set up to use Java, including projects on
synchronization, CPU scheduling, disk scheduling, and a file system.
-
I (Max Hailperin) have a couple
Java-based concurrent programming exercises that I've used in my
operating systems course:
-
A networked multi-player
puzzle program in which the client and server programs both are
multi-threaded, and both have race bugs in them. The assignment is to
find the races, demonstrate their existence by insertion of time
delays and otherwise making the conditions right, and then fixing them
by inserting appropriate ``synchronized'' keywords (and demonstrating
that they are gone).
-
An implementation of the
``readers/writers'' locking mechanism, together with a GUI demo of
it, that is subject to starvation of a writer by a stream of
overlapping readers. The assignment is to make it starvation free
(without wrecking the basic exclusion property). (Note that this is
akin to one of Hartley's example programs. This isn't surprising
given how classic this example is.) (Only problem 2 of this homework
is the Java readers/writers part, problem 1 is unrelated.)
-
Assaf Schuster of Technion - Israel Institute of Technology has
a tutorial on concurrent programming in Java.
-
George Fankhauser of the
ETH Zürich has a MIPS simulator
written in Java that he uses for running an instructional micro-kernel
OS on. However, the OS itself has no Java content.
The maintainer of this repository of resources regarding Java in
operating systems courses is
Max Hailperin
Email: max@gac.edu
Voice: (507) 933-7466
Fax: (507) 933-7041
Mathematics and Computer Science Department/
Gustavus Adolphus College
800 W. College Avenue
St. Peter, MN 56082
USA