COSC 4330 MIDTERM 3/4/99 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) It makes no sense to have memory protection on a single user system. (b) A process waiting on a semaphore is in the suspended state. (c) Shortest Job First always provides the absolute minimum waiting time for very short CPU requests. (d) Processes often interrupt themselves. 2. Explain why some applications are better implemented with virtual circuits and others with datagrams. Give at least one example of both. (10 points) 3. Answer in one sentence or less to each of the following questions (4×5 points) (a) Under which conditions can a running process return to the ready state? (b) What is the major advantage of microkernels? (c) What is the major advantage of non-blocking sends? (d) What is the major benefit of adding more RAM to a computer? 4. Explain why it is easier to write a multithreaded file server using kernel-level threads than user-level threads? (10 points) 5. What would be the consequences of much faster context switches on (a) kernel organizations, (b) lightweight process support and (c) scheduling policies? (3×5 points) 6. How many lines will be printed by the following program? (5 points) main() { fork(); printf("One!\n"); fork(); printf("Two!\n"); } It will print exactly ____ lines. 7. Consider the following system V scheduler: #ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LEVEL 800 0 1 4000 1 # 0 400 0 2 2000 2 # 1 200 1 3 1000 1 # 2 100 2 4 500 3 # 3 What are the two incorrect parameters? What would be their correct values? (4×5 points) On level ____ parameter ______________ should be set to _______ On level ____ parameter ______________ should be set to _______ --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. ----------------------------------------------------------------