Storage and I/O Flashcards
The CPU is attached to main memory via the _______ ____
memory bus
Devices are connected to the system via the ___ ____
I/O bus
What are buses?
Data paths provided to enable information between CPU(s), RAM, and I/O devices
The I/O bus connects a ____ to an ____ device
CPU, I/O
What 3 hardware components connect the I/O bus to I/O device?
- I/O ports
- Interfaces
- Device controllers
Software interacts with device though device _______
interfaces
Device interfaces are just _________ and _______ device registers
programming, reading
What 3 values does an interface register have?
- Status
- Command
- Data
The status value in an interface register shows the current _______ of the device
status
The command value in an interface register tells the device to perform a _____
task
The data value in an interface register ______ or ____ data from the device
passes, gets
Devices are addressed by direct I/O __________ or _____-______ I/O
instructions, memory-mapped
In memory-mapped I/O, a device’s data and command registers are mapped to the _______ ______ _____
processor address space
What is the interrupt-driven I/O cycle?
- CPU device driver initiates I/O
- I/O controller initiates I/O
- I/O controller generates interrupt signal with input, output, or error
- CPU receives interrupt and transfers control to interrupt handler
- Interrupt handler processes data and returns
- CPU resumes interrupted task
Direct memory access transfers data _____ between I/O device and memory
directly
___________ I/O suspends processes until the I/O is complete
blocking
Blocking I/O is easy to ___ and ________
use, understand
Blocking I/O us ________ and _______ for some needs
inefficient, insufficient
__________ I/O return I/O calls as much as possible
nonblocking
Nonblocking I/O is implemented via __________
multi-threading
_____________ I/O allows processes to run while the I.O executes
asynchronous
Asynchronous I/O is _________ to use
difficult
The hard disk has been the main form of _____________ storage for decades
persistent
The hard disk consists of a large amount of ______
sectors
Sectors in a hard disk are in _____-byte blocks
512
Hard disks can be viewed as an _____ of sectors
array
In hard disks, only single sector accesses are ______
atomic
When does a torn write occur?
When a hard disk is accessing multiple sectors at once
What is a torn write?
power loss during the multi-sector write, and only some of the sectors were successfully updated
In hard disk access, _________ access is faster than _______ access
sequential, random
What are four sections of a hard disk?
- Platter
- Track
- Sector
- Cylinder
In the hard disk, the _____ moves horizontally from one track to another
head
Disk rotate from __ to ____ times/sec
60, 250
Explain the process of accessing a block in hard disks
Move the head to desired track (seek time)
•Wait for desired sector to rotate under the head (rotational latency time)
•Transfer the block to a local buffer, then to main memory (transfer time)
In hard disks, accesses should minimize ______ _____
seek time
Hard disks typically have small ______ (____)
caches, DRAM
The DRAM in hard disks hold data _____ from or ________ to the physical disk structure
read, written
The DRAM in hard disks allow the device to respond _______ to requests
quickly
In the write-back policy, the disk returns ‘completed’ as long as data is in ______
cache
Write-back policy as fast, but can be ________
dangerous
In the write-through policy, data is guaranteed to reach the ___
disk
The write-through policy is safe, but _____
slow
What are the 3 objectives of a disk scheduling algorithm?
- Fast disk access time
- High disk bandwidth
- Fairness (maybe)
What are 4 disk scheduling algorithms?
- FCFS
- Shortest Scan time first (FCFS)
- C-/SCAN/Elevator
- C-/LOOK
The FCFS disk scheduling algorithm processes requests in _____ order
arrival
The SSTF disk scheduling algorithm processes requests with the minimum _____ time from current position
seek
The main issue of SSTF is ________
starvation
In the SCAN/Elevator disk scheduling algorithm, the OS moves across the disk processing requests in order across the ______
tracks
What is a sweep in the SCAN algorithm?
A single pass across the disk
During SCAN, what happens when a request comes for a block on track that has already been sweeped?
It is queued until the next sweep
F-SCAN ______ the queue to be serviced when doing a _______
freezes, sweep
F-SCAN avoids _______
starvation
C_SCAN sweeps from ______ to ______, then ______ to ______
outer, inner, inner, outer
SSTF is _____ and has a natural ______
common, appeal
SCAN and C_SCAN perform ________ for systems that place _______ loads on the disk
better, heavy