CS 372 Operating Systems

Homework 1: Processes, Scheduling, and Threads

Due: 10am Monday February 7, 2005
McKinley: in class
Witchel: in Taylor Homework Box

  1. Processes. What differentiates a program, an executable, and a process?

  2. Process creation. Write a C/C++ program in which a parent forks a child, and the child forks a grandchild. The grandchild writes: "My process id is X, my parent's id is Y, and my Grandparent's id is Z" (where X, Y, and Z are the Unix process ids), and no other process writes.

  3. Scheduling. How can fairness and throughput be competing goals for a scheduler?  Give an example where a fair scheduler makes bad use of the CPU, and an example where a high-throughput scheduler is unfair. 

  4. Scheduling. Which of MLFQ and approximate SJF that you implemented in lab1 approximates the ideal SJF better and why.

  5. Scheduling. MLFQ prioritizes jobs based on how frequently they perform I/0. Describe an algorithm to add to the 3-queue MLFQ from lab 1 a secondary priority criteria (e.g., give priority to OS processes, certain users, or certain processes such as video.)