Screen Version
School of Computer Science & Engineering
University of New South Wales

 Advanced Operating Systems 
 COMP9242 2010/S2 

Project: A Simple Operating System

These pages outline what you will be expected to implement for the project. While some minor details may change during session, this has been a successful format for a number of years. It is a good idea to start thinking early and try to understand the full assignment and ask any questions you have about structure and problems early.
  1. Overview
  2. Assessment
  3. Milestones
  4. Resources
  5. A warning
  6. Demonstrations


The aim of the assignment is to implement a simple operating system (SOS) server on top of the L4 microkernel. The SOS server is expected to provide a specified system call interface to its clients. (Specified in sos.h) The project will be completed by groups of 2 students. This is a challenging project. You have been warned!. The project is to be completed using the facilities in the Slug Lab.


About half the marks for the project are obtained for timely and complete demonstration of intermediate milestones (M0–M7). These milestones will be demonstrated in the lab each week. When demonstrating your solution you should be able to

The remaining marks will be determined by our assessment of your overall project and documentation. The assessment involves:


M0: Familiarisation
Due: Week 2
Marks: 4 (-1 for one week late, discontinue course if more than one week late)
Milestone 0 involves familiarising yourself with the provided source code and build system, and then writing a simple IPC protocol. This milestone should be done individually. Further milestones are done in groups.
M1: Memory manager
Due: Week 3
Marks: 4 (-1 if one week late, discontinue course if more than one week late)
Design and implement a simple frame table.
M2: A pager
Due: Week 4
Marks: 4 (-1 per week late)
Design and implement a simple pager based on the existing pager and the memory manager completed in M1.
M3: System call interface
Due: Week 5
Marks: 4 (-1 per week late)
Design and implement the system call interface for your operating system.
M4: Implement filesystem
Due: Week 6
Marks: 4 (-1 per week late)
Using the provided code implement the filesystem related system calls.
M5: A timer driver and benchmarking
Due: Week 7
Marks: 4 (-1 per week late)
Write a simple device driver for the timers available on the IXP420, and use it to benchmark your filesystem.
M6: Demand paging
Due: Week 8
Marks: 4 (-1 per week late)
Implement demand paging in your operating system.
M7: Process management
Due: Week 10
Marks: 4 (-1 per week late)
Design and implement process management. You should implement the process_* system calls.
M8: ELF Loading
Due: Week 11
Marks: 4 (-1 per week late)
Extend your process management code to handle loading ELF files. This is your last demo; your entire system should be working at this stage.
M9: Documentation
Due: Week 12, Monday 23:59, 11 Oct.
Marks: 9 (-2 per week late) docs, 20 (-3 per week late) code
Complete the documentation for your project. You also have a chance to clean up your codebase for your final submission. This milestone does not involve a lab demo.

Advanced Components (aka Stuff for Masochists)

The following features, if demonstrated and submitted together with your Milestone 8, will give bonus marks. (2 marks each, -1 per week late.)

Shared memory
Implement shared memory via the share_vm() system call and demonstrate operation with some application which has processes communicating via shared memory.
Clock driver loaded from file system
Rather than loading your clock driver from the boot image, load it from the file system and run it as a separate L4 task.
Filesystem caching
Reserve a part of RAM as a file system cache. Implement caching of directory information and file data, as well as read-ahead, to improve file system performance.
Dynamic filesystem (only valid with file system caching)
Have your SOS file system behave correctly even if files are added/removed in the Unix file system while your SOS is running. Do this without significantly degrading performance.

Kernel Bugs

In addition, there are bonus marks for finding kernel bugs (not library bugs!) Specifically, the first student who reproducibly proves a previously unknown bug in the L4 kernel will receive two bonus marks.

A student who provides a working patch to a kernel bug (irrespective whether the bug was found by them or someone else) will receive a further two bonus marks.

No late penalty applies for kernel bonus marks, although the claim must be made no later than the conclusion of the exam.

Notes on Bonus Marks



Some students are tempted to write some tricky or obscure code for these projects. Other students run into problems by trying to do too much.

I can only reiterate that the debugging environment you have on the Slug is extremely spartan. You will not do yourself a favour by writing obscure or particularly tricky code. You'll most likely end up getting hoplessly tangled up in your own code. Don't do this.

Write your code as clearly, obviously and straightforward as possible. This is the best safeguard against obscure bugs. I believe that the project is challenging enough as it is, there is no need to make it harder.

Furthermore, when doing the final project marking I will obviously not look with much sympathy upon code I find difficult to understand.

The same applies for implementing features beyond the project specifications. You are welcome to do this, but, in your own interest, you are strongly advised to implement the required features first. First make it work, then go for the extras! Most of the (very few) students who have failed the course to date have ignored this rule — at their peril!

Demonstration and Submission of Milestones

You are to show that your project passes the milestone requirements by demonstrating its operation to the demonstrator during the allocated time during the week the milestone is due.

In addition, you are to submit your source code using the give system.

You should submit all your changes, including makefiles etc. This means that you should create a tar file which includes any directories containing changed code. eg:

cd aos-2010
tar -zcvf ../m0.tar.gz sos sosh tty_test Makefile
give cs9242 m0 ../m0.tar.gz

Only one member of the group needs to submit.


Last modified: 06 Sep 2010.