Disk Scheduling
Disk Scheduling
Systems:
Internals Chapter 11
and
Design I/O Management
Principles and Disk Scheduling
Seventh Edition
By William Stallings
Categories of I/O Devices
External devices that engage in I/O with computer
systems can be grouped into three categories:
Human readable
Machine readable
Communication
Application
• the use to which a device is put has an influence on the software
Complexity of Control
• the effect on the operating system is filtered by the complexity of the I/O module that controls the device
Unit of Transfer
• data may be transferred as a stream of bytes or characters or in larger blocks
Data Representation
• different data encoding schemes are used by different devices
Error Conditions
• the nature of errors, the way in which they are reported, their consequences, and
the available range of responses differs from one device to another
Data Rates
◼ The actual details of disk I/O
Disk
operation depend on the:
◼ computer system
◼ Short batch jobs and interactive jobs are given higher priority
SCAN
◼ satisfies all outstanding requests until it
reaches the last track in that direction
then the direction is reversed
C-SCAN ◼
direction only
◼ When a scan begins, all of the requests are in one of the queues,
with the other empty
◼ During scan, all new requests are put into the other queue
◼ Service of new requests is deferred until all of the old requests have
been processed
RAID
RAID is a set of
◼ Redundant Array of Independent physical disk drives
viewed by the
Disks operating system as a
single logical drive
◼ Consists of seven levels, zero
through six
Design
architectures
share three
characteristics:
RAID
include redundancy to improve
performance or provide data protection
Level 2 ◼
◼
Typically a Hamming code is used
Effective choice in an environment in
which many disk errors occur
◼ Requires only a single redundant disk,
no matter how large the disk array
◼ The block that has been in the cache the longest with no reference
to it is replaced
◼ A key aspect of I/O is the use of buffers that are controlled by I/O utilities rather
than by application processes
◼ The use of buffers also decouples the actual I/O transfer from the address space of
the application process
◼ Two of the most widely used approaches are disk scheduling and the disk cache
◼ A disk cache is a buffer, usually kept in main memory, that functions as a cache of
disk block between disk memory and the rest of main memory