Lecturer 4 Device Management
Lecturer 4 Device Management
of as devices.
Some of these devices are physical devices (for example, disk drives), while
others can be thought of as abstract or virtual devices (for example, files).
Device management Function
Keep tracks of all the devices and the programs
Monitoring the status of each device
Take the decision that which process gets the device when and
✓ Different categories:
✓ Dedicated, shared, and virtual
✓ Degree of shareability
Characteristics of parallel and serial devices
Parallel Devices: Transfer data multiple bits at a time, resulting in
faster speed. 20
Examples: printers, some older CPUs.
Advantages: faster transmission, simpler hardware.
Disadvantages: expensive cabling, limited transmission distance,
susceptibility to interference.
Serial Devices: Transfer data one bit at a time, often slower but more
economical.
Examples: keyboards, mice, most modern CPUs.
Advantages: cheaper cabling, longer transmission distance, less susceptible
to interference.
Disadvantages: slower transmission, requires more complex hardware.
Cont…
Dedicated Devices
Assigned to only one job at a time and serves that job for entire time it's
active
e.g., tape drives, printers, and plotters
Disadvantage:
Mustbe allocated to a single user for duration of a job's execution
Can be quite inefficient, especially when device isn’t used 100% of the time
Cont…
Shared Devices
Assigned to several processes
e.g., disk pack or other DASDs can be shared by several processes at same
time by interleaving their requests
Interleaving must be carefully controlled by Device Manager
e.g.,
printers (dedicated devices) converted into sharable devices through a
spooling program
Spooling is used to speed up slow dedicated I/O devices
e.g.,USB controller, a virtual device that acts as an interface between OS,
device drivers, and applications and the devices that are attached via the
USB host
Sequential Access Storage Media
Disadvantages of blocking:
Overhead and software routines are needed for blocking, deblocking, and
record keeping
Buffer space wasted if only one logical record is needed
Cont…
Advantages of magnetic tapes:
Lowcost
Compact storage capabilities
◼ Good medium for backing up magnetic disks and for long-term archival file storage
Disadvantages of magnetic tapes:
Accesstime variability
Poor medium for routine secondary storage
◼ Not good for interactive applications
Direct Access Storage Devices
DASDs, any devices that can directly read or write to a specific place
on a disk
Categories:
◼ Magnetic disks
◼ Fixed-Head Magnetic Disk Storage
◼ Movable-Head Magnetic Disk Storage
◼ Optical discs
◼ Flash memory
◼ Magneto-optical disks
Disk Pack:
Each platter has two surfaces for recording (except those at the top and
bottom of the stack)
Each surface is formatted with concentric tracks
Number of tracks ranges from 100 on a floppy disk to a thousand or more
on a high-capacity hard disk
Cont…
Optical Disc Storage
Optical disc vs. Magnetic disk:
Magnetic disk
◼ Consists of concentric tracks of sectors
◼ Spins at a constant angular velocity (CAV)
◼ Wastes storage space but data retrieval is fast
Optical disc
◼ Consists of a single spiraling track of same-sized sectors running
from center to rim of disc
◼ Spins at a constant linear velocity (CLV)
◼ Allows more sectors and more data to fit on a disc
Cont…
Magnetic disk
Optical Disc
Flash Memory Storage
Flash memory is a removable medium that emulates RAM, but
stores data securely even when removed from power source
Allows users to store data on a microchip card or "key" and
move it from device to device.
Configurations include compact flash, smart cards, and memory
sticks; often connected to the computer through the USB port
To write data to the chip, an electric charge is sent through
floating gate; to erase, a strong electrical field (flash) is
applied
DASD Access Times
Time required to access a file depends on:
Seek time: Time to position read/write head
◼ Slowest of the three factors
◼ Doesn't apply to devices with fixed read/write heads
Search time (rotational delay): Time to rotate DASD until desired record is
under read/write head
Transfer time: Time to transfer data from secondary storage to main memory
◼ Fastest
Communication Among Devices
SCAN:
Uses a directional bit to indicate whether the arm is moving
toward center of the disk or away from it.
Algorithm moves arm methodically from outer to inner track
servicing every request in its path.
When it reaches innermost track it reverses direction and
moves toward outer tracks, again servicing every request in its
path.
LOOK:
Arm doesn't necessarily go all the way to either edge unless there are
requests
Eliminates possibility of indefinite postponement
Cont…
N-Step SCAN: Holds all requests until arm starts on way back
New requests are grouped together for next sweep
C-SCAN (Circular SCAN) : Arm picks up requests on its path
during inward sweep
Provides a more uniform wait time
C-LOOK: Inward sweep stops at last high- numbered track
request
Arm doesn't move to last track unless required to
Which strategy is the best?
FCFS works well with light loads, but service time becomes
unacceptably long under high loads
SSTF works well with moderate loads but has problem of localization
under heavy loads
SCAN works well with light to moderate loads and eliminates problem
of indefinite postponement. Similar to SSTF in throughput and mean
service times
C-SCAN works well with moderate to heavy loads and has a very
small variance in service times
Search Strategies: Rotational Ordering