CSL373/CS333N Assignment 3: Building your own OS (Part 1)

Background reading

  1. Read from the OS books the sections that deal with: CPU scheduling, processes, threads, IPC, critical sections and synchronization.

Building your own OS (Part I)

  1. Implement an user level threads package. See the specs for Threads, scheduler and context switching
  2. Implement your own semaphores as spin-lock critical sections. Implement semaphore wait and signal such that threads waiting on a semaphore do not busy wait. Instead, they should be blocked and placed in a queue associated with the semaphore to be made awake later with a signal.
  3. Implement the following applications on your threads package:
    1. Bounded buffer producer consumer
    2. Deadlock and starvation free dining philosophers


  1. Try to keep the overall implementation (especially context switching) modular. You should be able to convert your user level threads package in to a proper mini-os just by changing the context switching module in Assignment 4.
  2. The last date of submission is Feb 12.
  3. Submission page

Subhashis Banerjee / Dept. Computer Science and Engineering / IIT Delhi / Hauz Khas/ New Delhi 110016 / suban@cse.iitd.ernet.in