COSC 4330 QUIZ #1 July 16, 1998 Closed Book. You can have one sheet of notes. 1. Complete the following sentences: (4×10 points) In a modern computer system, a disk access takes around ten __________________ (indicate the time unit). ___________________________ allows the CPU to continue to do useful work while a program waits for the outcome of an I/O operation. When a process issues a system call,it goes from the ______________ state to the _______________ state. Processes waiting for the CPU are stored in the _______________________ queue. 2. What is a privileged instruction? (10 points) Which instructions should be privileged and why?(10 points) 3. What is the major disadvantage of microkernels? ( 20 points) 4. Complete the following C program so it will always print "Hello!" followed by "Good-bye!" (20 points) main() { int pid; if ((pid = fork()) == 0) { printf("Hello!\n"); _______________ } // if _________________ printf ("Good-bye!\n"); } // main --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. ----------------------------------------------------------------