CS414, Fall 2005 Homework 1 Posted 8/31/05 Remember, do not turn in your answers. There may be a pop-quiz on these homework questions any time between Tues 9/6 and Thur 9/15 inclusive. You may work together on these homework questions. However, I strongly advise you to try to solve them yourself first, then compare answers with others afterwards. Please do not discuss the homework on the class discussion mailing list. 1. What's the purpose of interrupts? What's the purpose of traps? What are the differences between them? 2. Caching is an important principle of computer systems. What problems do they solve, and what problems do they cause? 3. Why is seperation of mechanism and policy desirable? 4. List the pros and cons of the virtual-machine concept. 5. If a computer system do not provide a privileged mode of operation in hardware, is it possible to contruct a secure operating system for these computers? why or why not. 6a. Assume that you need to design an OS for a series of handheld toys that are to be distributed in McDonalds happy meals. The toys all have the same I/O hardware, which consists of three input buttons and an output LCD display. Would you use an interrupt-based or a polling-based design for handling the button inputs? State the assumptions that led to your decision. 6b. Now assume that, the day before the happy meals became available, someone found a finger in his Big Mac (c), business at McDonalds dropped off, and you are left with millions of little CPUs. Now you want to repackage the CPUs and sell them to the military as sensors. The input would come from a small device that can detect vibrations ("on" if a big vibration is felt, "off" otherwise), and the output would be a signal to a tiny radio transmitter. The sensors would be distributed around enemy territory and would have to stay operational for many months. Is the I/O design you chose on for the happy meal toys suitable for the military application? Again, state the assumptions that lead to your conclusion.