Computer Science 322 Quiz 2 Name _____________________ We considered a time line like the following one in class last time: Proc A ------ ----- ------ Proc B ------ ----- OS --- --- ---- ----- 1. The relative lengths of the ---- lines shown above are: a. Realistic reflections of b. Wrong.. The user lines should a typical system behavior be longer c. Wrong.. The OS lines should d. Wrong.. All --- lines should have be longer. EXACTLY the same length. 2. Which of the following does NOT occur WITHIN the VERTICAL period of transition from APP to OS or OS to APP another a. Push IP and Flags on stack b. Clear User mode bit in Flags c. Save SP in process PCB d. Load IP from Interrupt address (vector) table 3. In the multiasking model that we discussed in class, OS code runs: a. each time a switch between b. only after all tasks have two application tasks occurs. had a chance to run. c. after each instruction is d. only when there are no executed by an application. applications available to run. 4. Which of the following hypothetical instructions MUST be privileged in order to ensure safe operation in the presence of broken or malicious user programs (but a correct OS). a. Enable interrupts b. Set User Mode bit (Enter user mode) c. Disable interrupts d. Clear User Mode bit (Enter kernel mode) e. c. and d. (but not a. and b.) f. all of the above 5. Which of the following state transitions would be made LEAST OFTEN by a process that did a tremendous amount of I/O with very minimal computation between I/O requests a. Running to Ready b. Blocked to Ready c. Running to Blocked d. Ready to Running