Chapter 11: Input/Output Flashcards

1
Q

A device controller (device adapter) is an

A

electronic circuit capable of operating a specific I/O device using binary signals.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A device driver is a device-specific program that

A

implements I/O operations, requested by user applications or the OS, by interacting with the device controller

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Opcode (generic I/O register)

A

The register specifies the type of operation requested. Ex: read or write. Storing a new value into the register starts the I/O operation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Operands (generic I/O register)

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Busy (generic I/O register)

A

The register (a 1-bit flag) is set by the controller to indicate whether the device is busy or idle.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Status (generic I/O register)

A

The register is set by the controller to indicate the success or failure of the last I/O operation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Data buffer (generic I/O register)

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Programmed I/O is a style of

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Polling is a technique to

A

determine whether a device is busy or idle by reading a flag set and reset by the device controller.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

A direct memory access (DMA) controller is

A

a hardware component that allows devices to access main memory directly, without the involvement of the CPU.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

A buffer is a register or an area of main memory used to

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Buffer swapping is a technique that allows the operations of a producer process and a consumer process to

A

overlap by using two buffers. While the producer is filling buffer 1, the consumer is copying buffer 2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

A circular buffer is a fixed

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

A disk block cache is a set of

A

main memory buffers that contain the most recently accessed disk blocks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

A track is one of many

A

concentric rings on a magnetic disk surface.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

A sector is a portion of a

A

track and is the smallest unit of data that can be read or written with a single r/w operation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

The seek time is the time to

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

The rotational delay (rotational latency) is the time to

A

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.

19
Q

The data transfer time is the time to

A

transfer the desired number of bits to or from the disk, and is directly proportional to the disk’s rotational speed.

20
Q

Peak transfer rate is the rate at which the data is streamed to or from the disk once

A

the read/write head is at the beginning of the sector to be transferred.

21
Q

Sustained data rate is the rate at which the disk can

A

transfer data continuously.

22
Q

The Shortest seek time first (SSTF) scheduling algorithm considers the list of

A

all pending requests and always selects the request that requires the shortest travel distance from the current position.

23
Q

The Scan scheduling algorithm mimics the behavior of

A

an elevator in a building. The r/w head maintains a current direction of travel and services all request sequentially in the current direction.

24
Q

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

A

sweeps back to the opposite end of the disk and starts servicing requests again in the same direction.

25
Q

Data on a disk can become inconsistent for two reasons:

A

A system crash during a write operation can leave a disk block in a partially updated state.
A spontaneously occurring bad block, caused by aging or physical damage to the recording medium, makes the reading or re-writing of the block impossible.

26
Q

A parity bit is a

A

bit added to a string of bits to ensure that the total number of 1’s in the string is even or odd. Even parity sets the parity bit such that the number of 1’s is even. Similarly, odd parity sets the parity bit such that the number of 1’s is odd. Even and odd parity are duals of each other and either can be used as the simplest form of error detecting code, able to detect a single erroneous bit in a string.

27
Q

An error correcting code (ECC) includes multiple

A

parity bits in a string to permit the detection and automatic correction of some number of erroneous bits.

28
Q

A bad block (bad sector) is a

A

storage block that is no longer reliable for storing and retrieving data due to physical damage.

29
Q

Sector forwarding is a technique where a bad disk block b[i] is

A

mapped to one of the spare sectors. The solution is fast and simple but the drawback is that the logical blocks are no longer mapped to consecutive sectors, resulting in additional revolutions of the disk.

30
Q

Sector slipping is a technique where all blocks following a bad block b[i]

A

are shifted to the right. The last block is mapped to a spare sector and b[i] is mapped to the sector occupied previously by block b[i+1]. The approach requires more work initially but maintains the sequential order of all blocks.

31
Q

Stable storage is an approach to data management that uses

A

redundancy, along with a strict protocol for reading, writing, and error recovery, to guarantee that all data remains consistent in the presence of media and crash failures.

32
Q

A stable read guarantees

A

to return a valid copy of any block.

33
Q

A stable write guarantees that

A

every block is updated atomically.

34
Q

Striping is a technique where

A

a sequence of data blocks, b[i], is distributed over n disks

35
Q

A RAID (Redundant Array of Independent Disks) is a set of disks viewed by the OS as a

A

single mass storage device.

36
Q

The device bandwidth is the

A

total number of bytes transferred, divided by the total time between the first request for service and the completion of the last transfer.

37
Q

The simplest form of disk scheduling is, of course, the first-come, first-served (FCFS) algorithm (or FIFO).

A

This algorithm is intrinsically fair, but it generally does not provide the fastest service.

38
Q

In the SCAN algorithm, the disk arm starts at

A

one end of the disk and moves toward the other end, servicing requests as it reaches each cylinder, until it gets to the other end of the disk.

39
Q

The SCAN algorithm is sometimes called the

A

elevator algorithm, since the disk arm behaves just like an elevator in a building, first servicing all the requests going up and then reversing to service requests the other way.

40
Q

Circular SCAN (C-SCAN) scheduling is a variant of SCAN designed to provide a more uniform wait time. Like SCAN, C-SCAN moves the head from one end of the disk to the other, servicing requests along the way. When the head reaches the other end, however,

A

it immediately returns to the beginning of the disk without servicing any requests on the return trip

41
Q

The deadline scheduler maintains

A

separate read and write queues, and gives reads priority because processes are more likely to block on read than write.

42
Q

The deadline I/O scheduler is the default in the Linux RedHat 7 distribution, but RHEL 7 also includes two others.

A

NOOP is preferred for CPU-bound systems using fast storage such as NVM devices, and the Completely Fair Queueing scheduler (CFQ) is the default for SATA drives. CFQ maintains three queues (with insertion sort to keep them sorted in LBA order): real time, best effort (the default), and idle.

43
Q

Completely Fair Queuing (CFQ):

A

In Linux, the default I/O scheduler in kernel 2.6 and later versions.