Programming Process

Download Report

Transcript Programming Process

Operating Systems
reports
post topic on WebCT
Sassn 5
PDL = 10 Nov
project = 1 Dec
CSC 350 - Dr. Gary Locklair
Operating Systems
CSC 350 - Dr. Gary Locklair
Device Management
II. Device Management
devices = peripherals
Input, Output,
Storage
CSC 350 - Dr. Gary Locklair
Device Management
A. Job
manages peripherals
balance supply &
demand (resource
management)
CSC 350 - Dr. Gary Locklair
Device Management
B. Purpose
1. allow efficient use
of peripherals
2. process
synchronization
CSC 350 - Dr. Gary Locklair
Device Management
C. Overview
ex: Job requests disc access
//
c code to read from file
infile >> jobnumber >>
pagenumber
CSC 350 - Dr. Gary Locklair
Device Management
1. I/O organization
CPU  I/O  Control  Device
channel
unit
(disc)
CSC 350 - Dr. Gary Locklair
Device Management
a. I/O channel
a processor which
synchronizes fast CPU
with slower speed of
peripheral
CSC 350 - Dr. Gary Locklair
Device Management
actually transfers data
between device CPU
can operate
simultaneously with
CPU (parallel processing)
CSC 350 - Dr. Gary Locklair
Device Management
b. Control Unit
translates “high level”
requests to “low level”
device instructions
CSC 350 - Dr. Gary Locklair
Device Management
2. OS
must synchronize
multiple I/O requests
many requests may be
“pending”
CSC 350 - Dr. Gary Locklair
Device Management
D. DASD example
direct  random
access to any data
item is direct (not
sequential)
CSC 350 - Dr. Gary Locklair
Device Management
1. data organization
tracks – located via
moveable read/write
head
sector – located via
rotation of media
CSC 350 - Dr. Gary Locklair
Device Management
2. access time
slowest to fastest
a. seek time – move
read/write head to
proper track
CSC 350 - Dr. Gary Locklair
Device Management
b. search time
(rotational latency) –
position proper sector
under read/write head
(ie, time for media to
rotate under head)
CSC 350 - Dr. Gary Locklair
Device Management
c. transfer time – move
data to/from processor
unit
CSC 350 - Dr. Gary Locklair
Device Management
3. OS function
must handle multiple
waiting requests to
DASD
CSC 350 - Dr. Gary Locklair
Device Management
what order?
FCFS not ideal here
ex: (1) track 27, sector 5
(2) track 15, sector 2
(3) track 27, sector 6
(4) track 1, sector 1
(5) track 27, sector 7
CSC 350 - Dr. Gary Locklair
Device Management
animation
link
CSC 350 - Dr. Gary Locklair
Device Management
3. OS seek strategies
possible goals:
- minimize read/write head
movement (since takes most time)
- minimize response times for jobs
- minimize variance of response
times
CSC 350 - Dr. Gary Locklair
Device Management
3. OS seek strategies
your ideas?
CSC 350 - Dr. Gary Locklair