UNIVERSITY OF HOUSTON Department of Computer Science COSC 4330-Fundamentals of Operating Systems MIDTERM EXAMINATION October 25, 1995 This exam is closed book. You can have one sheet of notes. 1. For each of the statements below, indicate in one sentence whether the statement is true or false (2 points), and why (3 points). (a) To reduce I/O costs, we should try read or write as many useful data as possible during each disk access (b) Processes waiting for the CPU are in the waiting state (c) The Round-Robin scheduling algorithm does not differentiate between CPU-bound and I/O bound processes. (d) Most message passing systems use blocking receives. 2. Give two methods intruders can use to modify the operating systems of the workstation on which they are logged on (2×5 points) and propose the appropriate countermeasure for each method (2×5 points). 3. Given the following fragment of code: int fd, pd[2]; fd = open("data", O_RDWR | O_CREAT, 0660); pipe(pd); redirect the standard input of the process to the file "data" (10 points): 4. A system V scheduler with four priority levels has the following table: #ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LEVEL 1000 0 1 2000 1 # 0 500 0 2 2000 2 # 1 250 1 3 200 3 # 2 100 3 3 200 3 # 3 (a) what is the highest priority level? (5 points) (b) would it be a good idea to replace the 1000 on the second line by a 100? (5 points) (c) would it be a good idea to replace the 1 on the fourth line by a 3? (5 points) (d) what happens when a process at priority level 1 has been in the ready queue for at least two seconds? (5 points) 5. What is the major disadvantage of not using lightweight processes in a server? (5 points) 6. What are the major differences between public and private mailboxes? (10 points) 7. What is the difference between big-endian and little- endian machines? (5 points) 8. What can we do to guarantee that a remote procedure call will be executed at most once. (5 points) 9. What is the major disadvantage of non-pre-emptive scheduling? (5 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. ----------------------------------------------------------------