Test 3 - Input-Output

CS 438, Operating Systems Analysis


  1. Distinguish between device controllers and device drivers.


    A device controller sits between the hardware device and the rest of the world. The back-end of the controller, pointed toward the device, emits whatever electrical signals required to operated the device. The front-end of the controller, pointed toward the rest of the work, usually - but not necessarily - presents a standard software API such as SCIS or IDE. A device controller is almost always a piece of hardware, and is usually integrated with the device.

    A device driver is sits between a device controller and the rest of the computer system to which the controller is attatched. The lower-half of the driver, pointed at the controller, issuses whatever commands needed to operate the device. The top-half of the device, pointed at the computer system, implements whatever high-level access routines provided by the computer system. A device driver is almost always a piece of software, and is usually integrated into the operating system, although some system architectures make device drivers available as user-space processes.


  2. What is direct memory access (DMA)? How does DMA improve computer system performance?


    Direct memory access is the ability of a device controller to transfer data to or from a computer system's main storage without involving the CPU in the transfer. By providing independent data transfer between device and main storage, DMA frees up the CPU, making it available for other tasks.


  3. What are the four necessary and sufficient conditions for deadlock?


    1. Non-preemptive devices - Once assigned to a process, a non-pre-emptive device can't easily be taken away and given to another process.

    2. Mutually exclusive access - A process with mutually exclusive access to a device doesn't share the device with other processes.

    3. hold while waiting - A process holds on to allocated resources while waiting for an outstanding request, instead of releasing them until the new request is fufilled.

    4. A cyclic pattern of requests and grants among processes and resources - this is when the deadlock actually occurs.


  4. Explain why processes do not deadlock over contention for main storage.


    Main storage is a pre-emptive device, capable of being taken from one process and given to another process at arbitrary times. Virtual memory is the mechanism by which an operating system one pre-empts process's use of main storage in favor of another process.



This page last modified on 6 March 2000.