I/O Devices Flashcards

(58 cards)

1
Q

⭐️ What sort of structure does I/O hardware have?

A

Hierarchical structure

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

⭐️ What is at the top, middle & lower level of the I/O hardware hierarchy: memory bus, PCI bus, Peripheral I/O bus?

A
  1. Memory bus
  2. PCI bus
  3. Peripheral I/O bus
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

⭐️ Which piece of I/O hardware is this?
Connection point for devices

A

Port

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

⭐️ Which piece of I/O hardware is this?
Enables shared direct access

A

Bus

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

⭐️ Which piece of I/O hardware is this?
Electronics that operate port & bus device. Contains processor, microcode, private memory & bus controller

A

Controller

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

⭐️ Which piece of I/O hardware is this?
Present uniform device-access interface to I/O subsystem

A

Device driver

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

Which register in the canonical device communicating with the OS is this?
Can be read to see the current status of the device

A

Status register

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

Which register in the canonical device communicating with the OS is this?
Tells the device to perform a certain task

A

Command register

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

Which register in the canonical device communicating with the OS is this?
Passes data to / gets data from the device

A

Data register

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

What is the goal of I/O interrupts?

A

To lower CPU overhead

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

I/O interrupts allow for the overlap of…

A

computation & I/O

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

⭐️ Should polling or I/O interrupts be used in the case described below?
A fast device

A

Polling - better to spin than to take the interrupt overhead

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

⭐️ Should polling or I/O interrupts be used in the case described below?
Unknown time for device

A

Both/Hybrid: Spin, then use interrupts

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

⭐️ Give the definition:
Batching together several interrupts

A

Interrupt coalescing

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

⭐️ What can a flood of arriving interrupts lead to?

A

Livelock

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

⭐️ Give the definition:
Lock that occurs when always handling interrupts

A

Livelock

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

⭐️ If a flood of interrupts arrives is it better to ignore the interrupts, or to handle them right away?

A

Better to ignore the interrupts, while making some progress handling them

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

What type of I/O transfer of data is this?
CPU directly controls data transfer between memory & an I/O device

A

Programmed I/O (PIO)

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

What type of I/O for data transfer has this downside?
High CPU overhead - the CPU is fully occupied during transfer

A

Programmed I/O (PIO)

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

⭐️ What type of I/O for data transfer has the following definition:
Bypasses CPU to transfer data directly between I/O device & memory

A

Direct Memory Access (DMA)

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

⭐️ What data transfer I/O method is used to avoid PIO for large data movement?

A

DMA (Direct Memory Access)

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

⭐️ What communication method for an I/O is this?
Each device has a port & IN/OUT instructions communicate with the device using reg ports

A

I/O instructions

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

⭐️ What communication method for an I/O is this?
Hardware maps registers into memory address space. CPU uses load/store instructions that are sent to the device.

Addresses are loaded/mapped during system initialization & remain active until shutdown

A

Memory-Mapped I/O (MMIO)

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

What part of the I/O software is this?
An abstraction that hides details & differences between devices, and provides standard interfaces

A

Device driver

25
⭐️ What part of a Hard Disk Drive (HDD) is this? A circular hard surface on which data is stored persistently by inducing magnetic changes to it
Platter
26
⭐️ What sort of address space does a magnetic disk have?
Sector-addressable
27
⭐️ What does a magnetic disk have a array of?
Sectors
28
⭐️ What is the smallest unit of transfer on a magnetic disk?
Sector
29
⭐️ What are the two main operations for a HDD?
Read & write
30
⭐️ What's the equation for the overall latency of a HDD?
Seek time + Rotational delay + Transfer latency
31
⭐️ What part of a operation for a magnetic disk is this? Function of cylinder distance that may take several ms. The entire part often takes 4 - 10 ms.
Seek
32
⭐️ What part of a operation for a magnetic disk is this? Rotation time in seconds / RPM. Depends on the RPM and takes 4.2 ms on average.
Rotate
33
⭐️ What part of a operation for a magnetic disk is this? Transfer time / bytes per sector. Depends on the RPM & sector density. Pretty fast.
Transfer
34
⭐️ Are the seek and rotations in a HDD slow or fast?
Slow
35
⭐️ Is the transfer in a HDD slow or fast?
Fast
36
Which type of workload for a HDD is this? Access sectors in order. Most of the time is spent on transfer.
Sequential I/O
37
Is sequential I/O the best- or worst-suited type of workload for a HDD?
Best-suited
38
Which type of workload for a HDD is this? Random workloads access sectors in a random order. Slow on HDD due to seek and rotation dominating.
Random I/O
39
⭐️ Give the definition: Manages the order of I/O requests to optimize performance. Follows the SJF (Shortest Job First) principle
Disk scheduling
40
⭐️ Which type of disk scheduling algorithm for a HDD is this? Pros: Simple Cons: Low performance
FIFO
41
⭐️ Which type of disk scheduling algorithm for a HDD is this? Pros: Minimal seek time compared to FIFO Cons: Starvation
Shortest Seek Time First (SSTF)
42
⭐️ Which type of disk scheduling algorithm for a HDD is this? The head moves back and forth across the tracks, and favors the middle tracks. An elevator algorithm.
SCAN
43
⭐️ Which type of disk scheduling algorithm for a HDD is this? The head sweeps in one direction, from outer to inner track, & resets to the outer. Cons: Slightly higher seek time than SCAN
C-SCAN
44
⭐️ Which type of disk scheduling algorithm for a HDD is this? Takes both seek time & rotation time. Has Positioning time = Seek time + Rotational latency. Faster than SSTF
Shortest Positioning Time First (SPTF)
45
⭐️ Does HDD or SSD have the following pros? Cheap High capacity
HDD
46
⭐️ Does HDD or SSD have the following pros? Single/multiple transistors for storage Fast: no rotating/moving & noe seek Parallell
SSD
47
⭐️ Does HDD or SSD have the following cons? Slow: Seek + Rotate + Transfer Poor performance for random I/O
HDD
48
⭐️ Does HDD or SSD have the following cons? More expensive Wear out issue
SSD
49
⭐️ What type of disk consists of NAND-flash memory divided into banks that can be accessed in parallell?
SSD
50
⭐️ Each bank in an SSD consists of what?
Blocks
51
⭐️ Each block in an SSD consists of what?
Pages
52
⭐️ What are the three main operations on an SSD?
Read, erase & program
53
⭐️ Why is writing to a page in an SDD so difficult & costly?
1. Cannot directly overwrite used page 2. Must erase target page before writing Read + Erase + Program
54
⭐️ Give the definition: The even distribution of data over SSD to avoid overuse of some pages & banks
Wear leveling
55
⭐️ What I/O communication method uses special instructions to send and receive data to and from device registers?
I/O instructions
56
⭐️ What I/O communication method makes device registers available as normal memory addresses, allowing standard memory instructions to interact with I/O devices?
Memory-Mapped I/O
57
⭐️ What's the advantage of I/O instructions over Memory-Mapped I/O?
I/O instructions do not require extra memory for I/O devices.
58
⭐️ What's the advantage of Memory-Mapped I/O over I/O instructions?
Memory-mapped I/O eliminates the need for specific instructions which simplify the hardware design