Homeworks can be used to solidify your knowledge of the material in each of the chapters. Most homeworks are based on running little simulators, which mimic some aspect of an operating system. For example, a disk scheduling simulator could be useful in understanding how different disk scheduling algorithms work. Some homeworks are just short programming exercises, allowing you to explore how real systems work.

For the simulators, the basic idea is simple: each of the simulators below let you both generate problems and obtain solutions for an infinite number of problems. Different random seeds can usually be used to generate different problems; using the -c flag computes the answers for you (presumably after you have tried to compute them yourself!).

Note: All of these scripts are available individually here. Each single script is available as a gzip'd tar file; for example, type tar xvzf HW-Scheduler.tgz to unpack the scheduler.py script and an associated README.

Each simulator now has a README file that explains how to run the simulator. Previously, this material had been included in the chapters themselves, but that was making the book too long. Now, all that is left in the book are the questions you might want to answer with the simulator; the details on how to run the simulator are all in the README.

NEW: Video. Each simulation will soon have a short video with one of the authors introducing the basic concepts of how to use the simulator to generate homework problems. Exciting, because you have to read less! Not exciting, because you have to hear us speak.

A single tar file containing all scripts is also available; type

tar xvzf all.tgz
to unpack all the scripts once you've downloaded the tar file.


Topic of Interest   Chapter   Video   What To Do
Process Intro   PDF   Video   Run process-run.py
Process API   PDF   Video   Write some code
Direct Execution   PDF   Video   Write some code
Scheduling Basics   PDF   Video   Run scheduler.py
MLFQ Scheduling   PDF   Video   Run mlfq.py
Lottery Scheduling   PDF   Video   Run lottery.py
VM API   PDF   Video   Write some code
Relocation   PDF   Video   Run relocation.py
Segmentation   PDF   Video   Run segmentation.py
Free Space   PDF   Video   Run freespace.py
Paging   PDF   Video   Run paging-linear-translate.py
TLBs   PDF   Video   Write some code
Multi-level Paging   PDF   Video   Run paging-multilevel-translate.py
Paging Mechanism   PDF   Video   Run mem.c
Paging Policy   PDF   Video   Run paging-policy.py


Topic of Interest   Chapter   Video   What To Do
Threads (Intro)   PDF   Video   Run x86.py
Threads (API)   PDF   Video   Run main-*.c
Threads (Locks)   PDF   Video   Run x86.py
Threads (CVs)   PDF   Video   Run main-*.c
Threads (Bugs)   PDF   Video   Run vector-*.c


Topic of Interest   Chapter   Video   What To Do
Disks   PDF   Video   Run disk.py
RAID   PDF   Video   Run raid.py
FS Intro   PDF   Video   Write some code
FS Implement   PDF   Video   Run vsfs.py
FFS   PDF   Video   Run ffs.py
AFS   PDF   Video   Run afs.py