wpe2.jpg (5396 bytes)wpe3.jpg (5331 bytes)

The Threads Project

Welcome    Design    Library     Schedulers    Server    Rules    Links


This year's project is to design and implement a flexible multi-threading library. The library will work under Linux and C++. The four parts to the project are described in the next sections.

The course will have two teachers, Ariel Rossenblatt and David Talby. After condensed meetings to present the project in the first three weeks of the semester, you'll work on your own. Their job will be to answer new questions and check your work. Post your questions on the same discussion group we used last year.

Design

After listening very carefully in class, here you must provide a complete and explained design explaining how you are about to implement the library. Pay utmost attention to these issues:

Submit your work on paper. The deadline for this part is the 14th of November 1999.

Library

Here you will program the basic features of the library, by implementating the classes Thread, Semaphore and RoundRobinScheduler (which inherits from Scheduler). You may only add private functions and data members to the supplied header files.

The library should be compiled to a library file named hthread.a and you should provide an example program that uses it. Sophisticated programs will result in grade bonuses of up to 15%. A very simple example program that creates three threads and prints "Hello, World!" on the screen is here.

The deadline for this part is the 5th of December.

Schedulers

Now it is time to extend the abilities of the library by writing three advanced scheduling modules:

According to the tradition of Object-Oriented programming, these three additions should integrate well with previous programs and with each other as well. It should be possible to easily construct a priority, real-time measured scheduler, for example. Threads being created on such a scheduler could request priorities only, a real-time demand only, to be measured, or a combination of these. To provide for this flexibility variants of the Thread class are needed: PriorityThread, RealTimeThread, MeasuredThread. A utility Time class will also be needed. Once again, you are only allowed to add private functions and data members to the supplied headers.

The extended library should be compiled to a new version of hthread.a and you should provide an example program that uses it as well. Sophisticated programs will result in grade bonuses of up to 15%. A very simple variation on the hello world program that uses the three schedulers is here.

The deadline for this part is the 26th of December.

Server

The last part of the project is composed of three parts:

Submit the server program, as well as a written analysis of the performance tests you did. The goal is to make good  use of priorities to improve the server's responsiveness. Very smart optimization will imply a bonus.

The deadline for this part is the 16th of January 2000.

Rules

The final grade of the course will be composed of 10% for the Design part and 30% for each of the implementation parts. All parts must be submitted. Except the change to C++, follow the guidelines of last year's Operating Systems course - in particular, add a Readme and Makefile to each submission. Specific submission instructions will be given in class.

You are encouraged to work in pairs, not only to reduce the work load but to be able to correct each other's mistakes sooner. Every part of the project relies on previous ones, and it is difficult for one person to see the whole picture. Also, the creativity of two people will help you when designing bonus-winning examples and optimizations. If you worked alone so far - think twice!

Links

System Calls Summaries: File System, Processes and Signals, Inter-Process Communciation.

Riddle collection