W9 - I/O Management and Disk Scheduling Flashcards
(21 cards)
External devices that engage in I/O with computer systems can be categorized into what three categories?
1) human readable
2) machine readable
3) communication
What are the design objectives of I/O efficiency?
- prevent bottleneck operations
- increase speed to coincide with memory and process speed
- give more attention to disk I/O
What are the design objectives of I/O generality?
- handle all devices in uniform manner
- NEG: diversity of devices make it difficult to achieve true generality
What is a device driver?
It is a computer program allowing high-level computer programs to interact with a hardware device
Typically communicates with the device through the computer bus
How does interrupt-driven I/O work?
Processor issues I/O command on behalf of a process.
If non-blocking, processor continues to execute instructions from the process that issues the I/O command.
If blocking, the next instruction the processor executes is from the OS, which is the current process in a blocked state and schedule another process
What do drivers use kernel functions for in Driver-Kernel Interface?
1) device allocation
2) scheduling
3) buffering and caching
4) resource allocation
Name a few characteristics of I/O buffering as a block-oriented device?
- stores information in blocks that are usually fixed sized
- transfers made one block at a time
- disks and USBs
Name a few characteristics of I/O buffering as a stream-oriented device?
- transfers data in and out as a stream of bytes
- no block structure
- printers, communications ports
Distinguish difference between block-oriented single buffer vs stream-oriented single buffer.
Block-oriented read ahead input. Generally provides a speedup compared to lack of system buffering.
For stream-oriented, appropriate for scroll-mode terminals. One line at a time
Name a main advantage to double buffer.
Transfer data to or from one buffer while OS empties or fills the other buffer
Why would a circular buffer be used?
When I/O operation must keep up with process.
What do magnetic disks provide?
They provide bulk of secondary storage of modern computers.
What are some pros and cons to Nonvolatile Memory (NVM).
Pros: More reliable than HDD. Faster Less power Cons: Expensive Lower capacity Shorter lifespan
Briefly explain the RAID strategy.
Stands for Redundant Array of Independent Disks.
Employs multiple disk drives and distributes data in such a way as to enable simultaneous access to data from multiple drives
Name two advantages to RAID.
1) improves I/O performance
2) allows easier incremental increases in capacity
UNIX Buffer Cache.
Data transfer between the buffer cache and user process space always occurs using DMA
What three lists are maintained in UNIX buffer cache?
1) free list
2) device list
3) driver I/O queue
What is unbuffered I/O?
DMA between device and process space.
Fastest method for a process to perform I/O.
Process locked in main memory and cannot be swapped out.
Elevator Scheduler.
Maintains a single queue for disk read and write requests and performs both sorting and merging functions on the queue.
When a new request is added to the queue, 4 operations are considered in order:
1) If request is to the same on-disk sector or an immediately adjacent sector to a pending request in the queue, then the existing request and the new request are merged into one request
2) If a request in the queue is old, new request is inserted at the tail of the queue
3) If a suitable location found, new request is inserted in sorted order
4) If no suitable location, new request is placed at the tail of the queue
What two problems occur from elevator scheme?
1) Distance request block can be delayed for a time because queue is dynamically updated.
2) Stream of write requests can block a read request for a time, and thus block a process
What happens when a read request is dispatched in Anticipatory I/O Scheduler?
A delay is caused. In this scheduler, the application that issued the last read request will issue another read request