UNIVERSITY OF HOUSTON Department of Computer Science COSC 4330-Fundamentals of Operating Systems FINAL EXAMINATION December 11, 1996 This exam is closed book. You can have one sheet of notes. 1. Give one good reason for implementing an all or nothing semantics in remote procedure calls? (5 points) 2. For each of the statements below, indicate in one sentence whether or not the statement is true or false, and why (5 points each): a) Deadlocks cannot happen without a circular wait condition. b) Dynamic address translation is normally done by the kernel. c) All virtual memory systems have a PAGE-REFERENCED bit. 3. Add the missing parts to the following monitor, to obtain a solution for the readers/writers problem. (5×4 points) monitor readers_and_writers { // visible part read_lock(); write_lock(); read_unlock(); write_unlock(); //invisible part int inuse, readerscount; condition green; read_lock() { if (inuse == 1 &&________________________) green.wait; readerscount++; inuse = 1; green.signal; //let another waiting reader in } //read_lock write_lock() { __________________________ green.wait; inuse = 1; } //write_lock read_unlock() { readerscount--; if (______________________){ inuse = 0; _________________; }; } // read_unlock write_unlock() { _________________; inuse = 0; }// write_unlock body() { readerscount = inuse = 0; } } //monitor readers_and_writers 4. A workstation has a maximum memory size of 256 Megabytes. The memory is byte addressable and virtual addresses have 32 bits, 21 of which are dedicated to the page number: (2×5 points) a) what is the page size? ______ bytes b) what is the size of a process virtual address space? __________ pages You may detail here your computations for partial credit: 5. What are the main advantage and the main disadvantage of the three following page replacement policies (6×5 points) a) LRU: main advantage: main disadvantage: b) Working Set: main advantage: main disadvantage: c) VMS: main advantage: (I can think of two but one is very specific to the VMS policy.) main disadvantage: 6. What are the two criteria to consider when selecting a block size for a file system? (2×3 points) How does Berkeley UNIX solve this dilemma? (4 points) 7. Explain how the UNIX file system implements access control lists (6 points) What would be the main advantage and the main disadvantage of a fuller implementation of the concept? (2×2 points) --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. ----------------------------------------------------------------