You are on page 1of 1

Sample Midterm Exam I Questions

1. Suppose a computer has 512 MB of memory. Operating System takes 128 MB of


memory. Imagine each task takes up 128 MB of memory and the average I/O wait is
80%. What would be the CPU utilization if you have 6 jobs?
2. What is the advantage of kernel level threading?
3. How can you prevent race condition using TSL instruction? Please give the pseudo
code.
4. Suppose three processes A, B and C are loaded into the ready queue simultaneously, in
the order of A, B, C. The lengths of processes A, B and C are 10, 5, and 7 seconds,
respectively. Compute the completion time and waiting time for each of the three
processes when using (1) FCFS (2) Shortest job first.
5. Which of the following items are per process, and which are per thread?
a. Program Counter
b. Registers
6. Explain the concept of barriers as a synchronization mechanism.
7. What is TLB? What happens on a TLB miss?
8. Please explain the worst fit algorithm for memory allocation.

You might also like