CS 372 Operating Systems
Homework 1: Processes,
Scheduling, Threads, Synchronization
Due: Monday October 1, at the start of class
- Processes. What differentiates a program, an
executable, and a process?
- 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.
- 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.
- Scheduling. Which of MLFQ and approximate SJF that
you implemented in lab1 approximates the ideal SJF better and why.
- 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.)