CS100, Spring 1996: Answers to Quiz 4

This page contains questions and answers for the fourth quiz in CS100: Principles of Computer Science, a course based on the book The Most Comples Machine.

The answers given here are sample answers only. There is always some variation in the answers that would receive full credit.

Question 1: Here is a list of names and terms from the history of computing. Pick any four of these and briefly explain the role of each in that history: Ada Augusta (Countess of Lovelace); the Analytical Engine; "human computers"; relays; Eckert and Mauchly; the ENIAC; John von Neumann; Alan Turing; integrated circuits.

Answer: Here are possible answers for all nine of the options listed in the question:

Question 2: What is the purpose of a device driver ?

Answer: A device is the software that the CPU executes in order to communicate with and control other devices, such as the keyboard, a sound card, a network interface card, etc. A device driver consists of subroutines and interrupt handlers specific to one particular type of device. Connecting a device physically to the computer is not enough to make it usable; the device driver must also be added to the system software.

Question 3: What is the purpose of a bus in a computer?

Answer: A bus is a bunch of wires that connect the CPU to other hardware devices in the system. The idea of a bus is that many devices can attach to the same set of wires. This brings order to the system and makes it possible to add new kinds of devices by plugging them into "expasion slots" on the bus rather than by redesigning the whole system.

Question 4: "Interrupts" make it possible for the CPU to communicate with and control other devices in a computer system. Outline the process that the CPU uses in order to "handle" an interrupt when one occurs.

Answer: An interrupt is a physical signal on a wire attached to the CPU. It indicates that some device needs the CPU's attention. When an interrupt occurs, the CPU first saves enough information about its current "state" to enable it to restore that state later. This generally means saving the values of important registers. Then the CPU jumps to a predertermined location in memory where an "interrupt handler" has been placed. This interrupt handler is the program that the CPU executed in order to respond to the situation that caused the interrupt. When it finishes executing the interrupt handler, the CPU restores its saved state and so returns to what it was doing before the interrupt occurred.

(by David Eck)