INPUT/OUTPUT Flashcards
OS I/O refers to
communication between the system and the outside world.
I/O devices are categorised as
storage, communications and user-interface.
A human-readable I/O device is
suitable for communicating with the computer user
A machine-readable I/O device is suitable for
communicating with electronic equipment.
A communication I/O device is suitable for
communicating with remote devices
With programmed I/O, the processor issues
an I/O command on behalf of a process to an I/O module. That process waits for the operation to be completed before proceeding.
With interrupt-driven I/O, the processor issues
an I/O command on behalf of a process.
With Direct Memory Access, a
dedicated module controls the exchange of data between main memory and an I/O module.
Interrupts allow
devices to notify the CPU when they have data to transfer or when an operation is complete.
Interrupts allow the CPU to
perform other duties when no I/O transfers need its immediate attention.
The requirements of interrupts are complicated by the needs of modern I/O:
- The need to defer interrupt handling during critical processing
- The need to determine which interrupt handler to invoke, without having to poll all devices to see which one needs attention
- The need for multi-level interrupts so the system can differentiate between high and low priority interrupts for proper response
Direct Memory Access is achieved
using a special processor which offloads the work of the main CPU.
With DMA, a special control unit is used to
transfer a block of data directly between an external device and the main memory, without intervention by the processor
When the I/O operation is delegated to the DMA module
the processor continues with other work.
The DMA module transfers the entire block of data to or from memory, without going through the processor.
When the transfer is complete, the DMA module sends an interrupt signal to the processor. The processor is therefore involved only at the beginning and the end of the transfer.
The DMA mechanism can be configured so
that all modules share the same system bus. This configuration is inefficient and inexpensive.
The DMA mechanism can be configured so
that there is a path between the DMA module and one or more I/O modules that does not include the system bus
The DMA mechanism can be configured so
that I/O modules are connected to the DMA module using an I/O bus.
Polling describes the
activity of sampling the status of an external device by a client program. Polling can be fast and efficient if both the device and the controller are fast and if there is significant data to transfer. It becomes inefficient however, if the host must wait a long time waiting for the device, or if frequent checks need to be made for data that is infrequently there
The hierarchical design philosophy is
that OS functions should be separated according to their functionality. This leads to an organisation of the OS into a series of layers. Each layer performs a related subset of the functions required of the OS. It relies on the next lower layer to perform more primitive functions and to conceal the details of those functions. It provides services to the next higher layer.
The layers are defined and organised so
that changes in one layer do not require changes in other layers.