CH11-IOawf Management and Disk Scheduling
CH11-IOawf Management and Disk Scheduling
CH11-IOawf Management and Disk Scheduling
Systems:
Internals
and
Design
Principles
Eighth Edition
By William Stallings
Chapter 11
I/O Management
and Disk Scheduling
Communication
Machine readable
Human readable
Data Rate
the
the nature of errors, the way in which they are reported, their consequences, and
available range of responses differs from one device to another
Error Conditions
Data Representation
Unit of Transfer
the effect on the operating system is filtered by the complexity of the I/O module that controls the device
Complexity of Control
Application
101
Keyboard
Mouse
Modem
Floppy disk
Laser printer
Scanner
Optical disk
Ethernet
Hard disk
Graphics display
Gigabit Ethernet
102
104
105
106
107
103
108
109
a DMA module controls the exchange of data between main memory and an
I/O module
Interrupt-driven I/O
Programmed I/O
Direct I/O-to-memory
transfer
I/O-to-memory transfer
through processor
Programmed I/O
No Interrupts
Interrupt-driven I/O
Use of Interrupts
The I/O module has a local memory of its own and is, in fact, a
computer in its own right
Control
Logic
Address
Register
Data
Register
Request to DMA
Acknowledge from DMA
Interrupt
Read
Write
Address Lines
Data Lines
Data
Count
I/O
I/O
DMA
I/O
I/O
I/O bus
System bus
I/O
DMA
I/O
I/O
Memory
Memory
Memory
Processor
DMA
Processor
I/O
DMA
Processor
Efficiency
Generality
Communication
Architecture
Device
I/O
Scheduling
& Control
Hardware
(b) Communications port
Logical
I/O
Device
I/O
Scheduling
& Control
Hardware
(a) Local peripheral device
Hardware
Scheduling
& Control
Device
I/O
Physical
Organization
File
System
Directory
Management
User
Processes
User
Processes
User
Processes
Stream-oriented device
transfers data in and out
as a stream of bytes
no block structure
terminals, printers,
communications ports,
and most other devices
that are not secondary
storage are examples
Block-oriented device
stores information in
blocks that are usually of
fixed size
transfers are made one
block at a time
possible to reference data
by its block number
disks and USB keys are
examples
No Buffer
Single Buffer
Disadvantages:
when the transfer is complete, the process moves the block into user
space and immediately requests another block
Line-at-a-time operation
Byte-at-a-time operation
used on forms-mode
terminals
when each keystroke is
significant
other peripherals such
as sensors and
controllers
Double Buffer
Circular Buffer
with enough demand eventually all buffers become full and their advantage
is lost