I/O Devices Flashcards
What sort of structure does I/O hardware have?
Hierarchical structure
Which piece of I/O hardware is this?
Connection point for devices
Port
Which piece of I/O hardware is this?
Enables shared direct access
Bus
Which piece of I/O hardware is this?
Electronics that operate port & bus device. Contains processor, microcode, private memory & bus controller
Controller
Which piece of I/O hardware is this?
Present uniform device-access interface to I/O subsystem
Device driver
Which register in the canonical device communicating with the OS is this?
Can be read to see the current status of the device
Status register
Which register in the canonical device communicating with the OS is this?
Tells the device to perform a certain task
Command register
Which register in the canonical device communicating with the OS is this?
Passes data to / gets data from the device
Data register
What is the goal of I/O interrupts?
To lower CPU overhead
Should polling or interrupts be used in the case described below?
A fast device
Polling - better to spin than to take the interrupt overhead
Which register in the canonical device communicating with the OS is this?
Unknown speed for device
Both - spin, then use interrupts
Give the definition:
Batching together several interrupts
Interrupt coalescing
What can a flood of arriving interrupts lead to?
Livelock
Give the definition:
Always handling interrupts
Livelock
What type of I/O is this?
CPU directly controls data transfer between memory & an I/O device
Programmed I/O (PIO)
What type of I/O has this downside?
High CPU overhead - the CPU is fully occupied during transfera
Programmed I/O (PIO)
Give the definition:
Bypasses CPU to transfer data directly between I/O device & memory
Direct Memory Access (DMA)
What is used to avoid PIO for large data movement?
DMA (Direct Memory Access)
What communication method for an I/O is this?
Each device has a port & IN/OUT instructions communicate with the device using reg ports
I/O instructions
What communication method for an I/O is this?
Hardware maps registers into memory address. Addresses are loaded/mapped during system initialization & remain active until shutdown
Memory-Mapped I/O (MMIO)
What part of the I/O software is this?
Divers components that each have their own protocols. An abstraction that hides details & differences, and provides standard interfaces
Device driver
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
What sort of address space does a magnetic disk have?
Sector-addressable
What does a magnetic disk have a array of?
Sectors
What is the smallest unit of transfer on a magnetic disk?
Sector
What are the two main operations for a HDD?
Read & write
What’s the equation for the overall latency of a HDD?
Seek time + Rotational delay + Transfer latency
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
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
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
Are the seek and rotations in a HDD slow or fast?
Slow
Is the transfer in a HDD slow or fast?
Fast
Which type of workload for a HDD is this?
Access sectors in order. Most of the time is spent on transfer.
Sequential I/O
Is sequential I/O the best- or worst-suited type of workload for a HDD?
Best-suited
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
Give the definition:
Manages the order of I/O requests to optimize performance. Follows the SJF (Shortest Job First) principle
Disk scheduling
Which type of disk scheduling algorithm for a HDD is this?
Pros: simple
Cons: low performance
FIFO
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)
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
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
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)
Does HDD or SSD have the following pros?
Cheap
High capacity
HDD
Does HDD or SSD have the following pros?
Single/multiple transistors for storage
Fast: no rotating/moving & noe seek
Parallell
SSD
Does HDD or SSD have the following cons?
Slow: Seek + Rotate + Transfer
Poor performance for random I/O
HDD
Does HDD or SSD have the following cons?
More expensive
Wear out issue
SSD
What type of disk consists of NAND-flash memory divided into banks that can be accessed in parallell?
SSD
Each bank in an SSD consists of what?
Blocks
Each block in an SSC consists of what?
Pages
What are the three main operations on an SSD?
Read, erase & program
Give the definition:
The even distribution of data over SSD to avoid overuse of some pages & banks
Wear leveling