0% found this document useful (0 votes)
75 views6 pages

Disk Problem

I. FCFS total distance is 640 cylinders. Requests are served in order: 53, 98, 183, 37, 122, 14, 124, 65, 67 II. SSTF total distance is 236 cylinders. Requests are served in order: 53, 65, 67, 37, 14, 98, 122, 124, 183 III. Scan total distance is 331 cylinders. Requests are served in order: 53, 65, 67, 98, 122, 124, 183, 199, 37, 14

Uploaded by

Arif Munanda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views6 pages

Disk Problem

I. FCFS total distance is 640 cylinders. Requests are served in order: 53, 98, 183, 37, 122, 14, 124, 65, 67 II. SSTF total distance is 236 cylinders. Requests are served in order: 53, 65, 67, 37, 14, 98, 122, 124, 183 III. Scan total distance is 331 cylinders. Requests are served in order: 53, 65, 67, 98, 122, 124, 183, 199, 37, 14

Uploaded by

Arif Munanda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 6

2. suppose that a disk has 200 cylinders , numbered 0 to 199 .

the drive is
currently serving a request at cylinder 53 , and the previous request was at
cylinder 25. The queue of pending requests , in FIFO order is

98 , 183 , 37 , 122 , 14 , 124 , 65 , 67

Starting from the current head position, show the total distance ( in cylinders) that
the disk arm moves to satisfy all the pending requests for each of the following
disk-scheduling disciplines?

I. FCFS
II. SSTF
III. LOOK
IV. C-LOOK
V. Scan
VI. C-Scan

ANSWER
I. FCFS

0 14 37 53 65 67 98 122 124 183 199

53 98

183

37

122

14

65 124

67
The total distance:

(98-53)+(183-98)+(183-37)+(122-37)+(122-14)+(124-14)+(124-
65)+(67-65)= 640 Cylinders

In another way:

FCFS: 53 , 98 , 183 , 37 , 122 , 14 , 124 , 65 , 67

ii. SSTF

0 14 37 53 65 67 98 122 124 183 199

65

37 67

14

98

122

124

183

The total distance:

(65-53)+(67-65)+(67-37)+(37-14)+(98-14)+(122-98)+(124-122)+(183-
124)= 236 Cylinders
In another way:

SSTF: 53 , 65 , 67 , 37 , 14 , 98 , 122 , 124 , 183

iii. Scan

0 14 37 53 65 67 98 122 124 183 199

65

67

98

122

124

183

199

37

14

The total distance:


(65-53)+(67-65)+(98-67)+(122-98)+(124-122)+(183-124)+(199-183)+(199-
37)+(37-14)= 331 Cylinders

In another way:

Scan: 53 , 65 , 67 , 98 , 122 , 124 , 183 , 199 , 37 , 14


Iv. Look

0 14 37 53 65 67 98 122 124 183 199

65

67

98

122

124

183

37

14

The total distance


(65-53)+(67-65)+(98-67)+(122-98)+(124-122)+(183-124)+(183-37)+(37-14)=
299 Cylinders

In another way

LOOK: 53 , 65 , 67 , 98 , 122 , 124 , 183 , 37 , 14


V. C-Scan

0 14 37 53 65 67 98 122 124 183 199

65

67

98

122 124

183 199

0 14

37

The total distance


(53-65)+(67-65)+(98-67)+(122-98)+(124-122)+(183-124)+(199-183)+( 14-0)+(37-
14)=

In another way:

C-Scan: 53 , 65 , 67 , 98 , 122 , 124 , 183 , 199 , 0 , 14 , 37


VII. C-LOOK

0 14 37 53 65 67 98 122 124 183 199

The total distance:


(65-53)+(67-65)+(98-67)+(122-98)+(124-122)+(183-124)+(183-14)+(37-14) =
322 Cylinders

In another way

C-LOOK: 53 , 65 , 67 , 98 , 122 , 124 , 183 , 14 , 37

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy