CSE 451, Spring 2000 Solutions to homework 1 1) In a plain, run-of-the-mill, protected architecture, list at least three different ways (or machine level instructions) that a user mode program uses to transfer control to the kernel. Many of you had answers such as a page fault or external interrupt. The main problem with these answers is that the user program could not intentionally cause this transfer of control to the kernel. Correct answers included (but were not limited to): * Dividing by zero * Explicitly executing a hardware trap instruction * Executing an illegal instruction * Executing a privileged instruction (such as a "change processor mode" instruction) * Reading or writing an invalid or protected piece of memory (including device registers) 2) A lot of the older OS systems have to be custom built for the exact hardware configuration they are to run on (e.g., the number of terminal drivers is fixed). Some of the newer OS systems (particularly in the PC realm) can dynamically alter their state as hardware is added and removed. Give at least one compelling advantage for building systems the old-fashioned way. Correct answers included (but again, were not limited to): * Saves overall memory and disk space by not needing to check for hardware changes * Usually easier to share common code * Typically faster communication channels between devices * Easier to test and design OS.