Title: Operating Systems
1Operating Systems
reportspost topic on WebCT
Sassn 5PDL 10 Novproject 1 Dec
2Operating Systems
wassn7 assigned
due next time
3 Operating Systems
4Device Management
II. Device Management
D. DASD example 4. OS seek stategies
5Device Management
a. FCFS
tracks are serviced in the order they arrived
6Device Management
data organization
assume 50 tracks on disc (0..49) assume 1ms to
move R/W head 1 track
7Device Management
track 0 at outside track max at inside
8Device Management
R/W head at track 20
list of pending track requests 2, 26, 19, 43
9Device Management
at track 20
10Device Management
move to track 2
11Device Management
move to track 26
12Device Management
move to track 19
13Device Management
move to track 43
14Device Management
how much time?
20 2 26 19 43
20-2 26-2 26-19 43-19
18 24 7 24
73 msec
15Device Management
animation
link
16Device Management
b. SSTF
Shortest Seek Time First track closest to current
request is serviced next
17Device Management
adv short seek times
dis favors closer tracks may indefinitely
postpone far tracks
18Device Management
SSTF will reorder pending requests
eg, 2, 26, 19, 43 becomes 19, 26, 43, 2
19Device Management
at track 20
20Device Management
move to track 19
21Device Management
move to track 26
22Device Management
move to track 43
23Device Management
move to track 2
24Device Management
how much time?
20 19 26 43
2
20-19 26-19 43-26 43-2
1 7 17 41
66 msec
25Device Management
c. SCAN
continue R/W head travel in one direction
satisfying requests direction bit
26Device Management
SCAN moves all the way across disc surface
eg, from lower (outer) tracks to higher
(inner)(track 0 is outermost)
27Device Management
SCAN analogy
wiper blade
28Device Management
adv no starvation
dis may miss a close track if moving in other
direction
29Device Management
SCAN will reorder pending requests
eg, 2, 26, 19, 43 in becomes 26, 43, 49,
19, 2
30Device Management
at track 20
31Device Management
move to track 26
32Device Management
move to track 43
33Device Management
move to track 49
34Device Management
move to track 19
35Device Management
move to track 2
36Device Management
how much time?
2026 43 49 19
2
26-20 43-26 49-43 49-19 19-2
6 17 6 30
17
76 msec
37Device Management
d. LOOK
variation of SCAN R/W head doesnt move to
extreme edges of disc if no requests
38Device Management
at track 20
39Device Management
move to track 26
40Device Management
move to track 43
41Device Management
move to track 19
42Device Management
move to track 2
43Device Management
how much time?
20 26 43 19 2
26-20 43-26 43-19 19-2
6 17 24 17
64 msec
44Device Management
e. C-SCAN
circular SCAN R/W head moves from outer to inner
track
45Device Management
when inner track is reached
quickly repositions head (no reading) back to
outer track begins a new sweep
46Device Management
CSCAN analogy
squeegee
47Device Management
not even close
to hernia movers
48Device Management
C-SCAN will reorder pending requests
eg, 2, 26, 19, 43 in becomes 26, 43, 2,
19
49Device Management
at track 20
50Device Management
move to track 26
51Device Management
move to track 43
52Device Management
move to track 49
53Device Management
sweep to track 0
54Device Management
move to track 2
55Device Management
move to track 19
56Device Management
how much time?
20 26 43 2
19
26-2043-2649-43502-019-2
6 17 6 50 2 17
98 msec
57Device Management
in real systems, the pending list is not static
new requests are entered all the time
58 Operating Systems
59Device Management
exercise
head is over track 20 (of 50 0..49) in these
requests are pending 5, 25, 17, 30
60Device Management
exercise compute times for FCFS, SSTF and SCAN
61 Operating Systems
62Device Management
E. Device Management Functions
1. Checking Device Status
63Device Management
a. Polling CPU checks if a flag is set
b. Interrupt H/W signal to CPU indicating
status
64Device Management
2. Enforce Access Policies
3. Allocating Devices to Processes
65Device Management
4. Deallocating Devices
a. I/O complete (temporary) b. Job complete
(permanent)
66Device Management
5. Device Communication
a. DMA allows control unit to access memory
directly without CPU utilization or involvement
67Device Management
b. buffers synchronize speed of I/O and CPU
68Device Management
6. Device Types
a. dedicated b. shared c. virtual
69Device Management
F. RAID
purpose adaptec info
70Device Management