I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests To Hardware Operations Streams Performance
I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests To Hardware Operations Streams Performance
I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests To Hardware Operations Streams Performance
I/O Hardware
Application I/O Interface
Kernel I/O Subsystem
Transforming I/O Requests to Hardware Operations
Streams
Performance
13.1
I/O Hardware
Incredible variety of I/O devices
Common concepts
Port
Bus (daisy chain or shared direct access)
Controller (host adapter)
I/O instructions control devices
Devices have addresses, used by
Direct I/O instructions
Memory-mapped I/O
13.2
13.3
13.4
Polling
Determines state of device
command-ready
busy
Error
Busy-wait cycle to wait for I/O from device
13.5
Interrupts
CPU Interrupt request line triggered by I/O device
Interrupt handler receives interrupts
Maskable to ignore or delay some interrupts
Interrupt vector to dispatch interrupt to correct handler
Based on priority
Some unmaskable
Interrupt mechanism also used for exceptions
13.6
13.7
13.8
13.9
13.10
classes
Device-driver layer hides differences among I/O
controllers from kernel
Devices vary in many dimensions
Character-stream or block
Sequential or random-access
Sharable or dedicated
Speed of operation
read-write, read only, or write only
13.11
13.12
13.13
13.14
Network Devices
Varying enough from block and character to have own
interface
mailboxes)
13.15
interrupts
13.16
13.17
between devices
13.18
13.19
device
13.20
Error Handling
OS can recover from disk read, device unavailable,
fails
13.21
to implement I/O
13.22
13.23
13.24
13.25
STREAMS
STREAM a full-duplex communication channel between
queues
13.26
13.27
Performance
I/O a major factor in system performance:
Demands CPU to execute device driver, kernel I/O code
Context switches due to interrupts
Data copying
Network traffic especially stressful
13.28
Intercomputer Communications
13.29
Improving Performance
Reduce number of context switches
Reduce data copying
Reduce interrupts by using large transfers, smart
controllers, polling
Use DMA
Balance CPU, memory, bus, and I/O performance for
highest throughput
13.30
Device-Functionality Progression
13.31