Chapter 11: Input/Output Flashcards
(43 cards)
A device controller (device adapter) is an
electronic circuit capable of operating a specific I/O device using binary signals.
A device driver is a device-specific program that
implements I/O operations, requested by user applications or the OS, by interacting with the device controller
Opcode (generic I/O register)
The register specifies the type of operation requested. Ex: read or write. Storing a new value into the register starts the I/O operation.
Operands (generic I/O register)
One or more operand registers are used to describe the parameters of the requested operation. The values are written by the CPU prior to starting the operation.
Busy (generic I/O register)
The register (a 1-bit flag) is set by the controller to indicate whether the device is busy or idle.
Status (generic I/O register)
The register is set by the controller to indicate the success or failure of the last I/O operation.
Data buffer (generic I/O register)
The data buffer holds the data to be transferred between the device and main memory. Depending on the device type, the buffer may hold a single character or a block of data.
Programmed I/O is a style of
I/O programming where the CPU, running the device driver, performs the copying of all data between the I/O device controller and main memory.
Polling is a technique to
determine whether a device is busy or idle by reading a flag set and reset by the device controller.
A direct memory access (DMA) controller is
a hardware component that allows devices to access main memory directly, without the involvement of the CPU.
A buffer is a register or an area of main memory used to
hold data generated by a producer process or an input device and removed from the buffer at a later time by a consumer process or an output device.
Buffer swapping is a technique that allows the operations of a producer process and a consumer process to
overlap by using two buffers. While the producer is filling buffer 1, the consumer is copying buffer 2.
A circular buffer is a fixed
array of buffer slots filled by the producer and emptied by the consumer one slot at a time in ascending order, modulo the buffer size.
A disk block cache is a set of
main memory buffers that contain the most recently accessed disk blocks.
A track is one of many
concentric rings on a magnetic disk surface.
A sector is a portion of a
track and is the smallest unit of data that can be read or written with a single r/w operation.
The seek time is the time to
move the r/w head from the current position to the track containing the desired data. The time is directly proportional to the physical distance the r/w head needs to traverse.
The rotational delay (rotational latency) is the time to
wait for the desired data item to pass under the r/w head. On average, the rotational delay is one-half of the time of one disk revolution. Thus the time depends on the disk’s rotational speed.
The data transfer time is the time to
transfer the desired number of bits to or from the disk, and is directly proportional to the disk’s rotational speed.
Peak transfer rate is the rate at which the data is streamed to or from the disk once
the read/write head is at the beginning of the sector to be transferred.
Sustained data rate is the rate at which the disk can
transfer data continuously.
The Shortest seek time first (SSTF) scheduling algorithm considers the list of
all pending requests and always selects the request that requires the shortest travel distance from the current position.
The Scan scheduling algorithm mimics the behavior of
an elevator in a building. The r/w head maintains a current direction of travel and services all request sequentially in the current direction.
The C-Scan scheduling algorithm is a variant of the Scan algorithm that services requests in only one direction. When the outermost request is reached, the r/w head
sweeps back to the opposite end of the disk and starts servicing requests again in the same direction.