UNIVERSITY OF HOUSTON Department of Computer Science COSC 4330-- Fundamentals of Operating Systems SECOND MIDTERM March 30, 1994 This exam is closed book. You can have one sheet of notes. 1. What is the major disadvantage of Conditional Critical Regions? (10 points) 2. What is the difference between a blocking receive and a non-blocking receive? (10 points) . Which one can be simu- lated by the other and how? (10 points) 3. A binary semaphore is a semaphore than can only have two values, zero and one. Write the two monitor procedures neces- sary to implement a binary semaphore assuming (a) that an up operation on a binary semaphore that is already equal to one does nothing and (b) that the initial value of the sema- phore is one. (2X10 points). /* declare here your global variable(s) */ /* the only condition you will need */ condition go; /* up function */ up (){ } /* up */ /* down function*/ down () { } /* down */ How would you initialize your semaphore? ( 5 points) 4. What can be done to reduce message transfer costs when both the sender and the receiver processes reside on the same machine? (10 points) 5. How can you explain the fact that the throughput of a com- puter using a Round-Robin scheduling policy often goes down when the number of interactive users goes up? (10 points) 6. Why is it a good idea to give larger slices of CPU time to processes with lower priorities? (10 points) 7. True or False: (3X5 points) T F --- --- All UNIX message passing primitives use direct naming T F --- --- In a RPC, one of the tasks of the user stub is to wait for messages from user processes T F --- --- Multiprogramming is especially beneficial when the workload contains I/O-bound processes --IMPORTANT----IMPORTANT----IMPORTANT----IMPORTANT----IMPORTANT-- Please do not try to answer these questions by yourself BEFORE having a clear idea of what's on the test for which you are studying. Materials covered in each test DO VARY from semester to semester because the pace of the course can change, some materials are be added and other deleted almost every semester. ----------------------------------------------------------------