George Mason University                             Midterm Examination

CS571-002.  Spring 2001

Professor: Dr. Tan N. Nguyen

Due: March 22, 2001

 

IMPORTANT: The University Honor Code is in effect.  Do not collaborate.

 

 

1.     In your own words, discuss the advantages and disadvantages of “Virtual Machines.” (10)

2.     Give an example of how mechanism and policy can be separated with respect to scheduling.  Suggest a mechanism that could allow a parent process to control the scheduling policy for its children. (5 each)

3.     What design and management issues are raised by the existence of concurrency? (10)

4.     Describe the operating system multithreading supports for both user and kernel threads.  Briefly discuss the advantages and disadvantages of Windows NT multithreading model. (10)

 

5.     A major problem with priority scheduling algorithm is indefinite blocking.  Explain this problem using an example of processes entering critical sections.  Does the same problem occur if round robin scheduling is used instead of priority scheduling? Explain why. (5 each)

 

6.     Suppose that a computer can inhibit/enable interrupts using the IIN and ENI instructions.  Describe in words and in pseudo code how to implement semaphores using those instructions. (5 each)

 

7.     It is not uncommon for a computer to have and use a “Test and Set” instruction and another synchronization primitive such as semaphores.  However, these two types play a different role and do not compete with each other.  Explain why this is so. (10)

 

8.     Five batch jobs A through E, arrive at a computer center at almost the same time.  They have estimated running time of 10, 6, 2, 4, and 8 minutes.  Their priorities are 3, 5, 2, 1, and 4, respectively, with 5 being the highest priority.  For each of the following scheduling algorithms, determine the mean process turnaround time.  Ignore process switching overhead

 

(a)   Round robin,

(b)  Priority,

(c)  First-come, first-serve (run in order 10, 6, 2, 4, 8)

(d)  Shortest job first.

 

For (a), assume that the system is multi-programmed and that each job gets its fair share of the CPU.  For (b) through (d) assume that only one job at a time runs, until it finishes.  All jobs are completely CPU bound. (2.5 each)

 

9.     An operating using mailboxes has two primitives, SEND and RECEIVE.  The RECEIVE primitive specifies a process to receive from, and blocks if no message from that process is available, even though messages may be waiting from other processes.  There are NOO shared resources, but processes need to communicate frequently.  Is deadlock possible? Discuss. (10)

 

10. Briefly discuss the methods for handling deadlocks.  Briefly describe two options for breaking a deadlock.  (5 each)