COSC 4330 QUIZ #1 February 9, 1999 Closed Book. You can have one sheet of notes. 1. What is the major advantage of batch systems over bare-bone machines? (20 points) What replaced batch systems, at least in academic environments, and why? (20 points) A: BATCH SYSTEMS ALLOW MORE EFFICIENT USE OF THE COMPUTER SINCE IT DID NOT HAVE TO BE REBOOTED BETWEEN JOBS. THEY WERE REPLACED IN MANY ENVIRONMENTS BY TIME-SHARING SYSTEMS BECAUSE THESE SYSTEMS ALLOW INTERACTIVE ACCESS TO THE COMPUTER. 2. Why do computers have DMA for their disk drives and not for their other peripherals? (20 points) A: DISK DRIVES HAVE MUCH FASTER TRANSFER RATES THAN OTHER PERIPHERALS. WITHOUT DMA--OR DIRECT MEMORY ACCESS, THEY WOULD INTERRUPT TOO OFTEN THE CPU. 3. What are the advantages and disadvantages of delaying writes to the disk? (20 points) A: DELAYING WRITES TO THE DISK REDUCES THE NUMBER OF DISK ACCESS BY ALLOWING THE GROUPING OF SEVERAL SMALL WRITES INTO A SINGLE I/O OPERATION. THE ONLY DISADVANTAGE IS THAT WRITES WILL BE LOST IF THE SYSTEM CRASHES WHILE SOME WRITES ARE STILL PENDING. 4. Explain why a kernel should always handle itself short system calls. (20 points) A: THE ONLY ALTERNATIVE WOULD BE TO HAVE THE KERNEL FORWARD THE CALL TO SOME USER-LEVEL SERVER AND IT WOULD COST TWO EXTRA CONTEXT SWITCHES. THIS IS NOT A PROBLEM FOR COMPLEX SYSTEM CALLS THAT ALREADY TAKE A LOT OF TIME. IT MATTERS MUCH MORE FOR SHORT SYSTEM CALLS. --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. ----------------------------------------------------------------