Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Disk Scheduling ¦ 149

EXERCISE 1
Helen Hoang
Name ____________________________________ Date ____________________

Section ___________________________________

1) Start the Disk Scheduling app.


2) Click on the Example button, which fills the list with some requests.
3) Select First-Come First-Served from the pull-down menu and click the Run button. Time the app
with your watch or the computer’s clock, and write down how many seconds it takes.

It takes about 29 seconds.


4) Select Shortest Seek Time First and run the app again. Measure the time that takes and write it
down. Also write down the order of the tracks that are visited. (This is different from the original
request list.)

It takes around 14 seconds.


52, 47, 44, 61, 87, 96, 25, 20, 4

5) Repeat step 4 after selecting SCAN Disk (elevator). This took about 12 seconds.
6) Which algorithm took the least time?

The SCAN disk algorithm took the least time.


7) Based on your observations of the three algorithms on the example request list, state what kind of
request list would make first-come, first-served take up a lot of time. In other words, what pattern
would the numbers in the request list have to follow so that first-come, first-served consumes a lot
of time?

The first come first serve takes a lot of time because it tends to the one who
came first even though, the time between the request is very large. For a first
come first serve algorithm to consume a lot of time, alternate the requests on
each side so the first come first serve algorithm would have to come back and
forth to consume the most amount of time.

© Jones & Bartlett Learning, LLC


NOT FOR SALE OR DISTRIBUTION
150 ¦ Laboratory 14

EXERCISE 2
Name ____________________________________
Helen Hoang Date ____________________

Section ___________________________________

1) Some request lists might cause the disk scheduler to act the same when the three different
algorithms are run. Create a request list of five track numbers that will cause all three algorithms to
visit the same tracks in the same order.

50
35
25
15
5

2) If shortest seek time first starts with the disk head positioned at either 0 or 99, instead of at 50 (in the
middle), which algorithm would it resemble: first-come, first-served or SCAN?
Why?

It would resemble first come, first serve.

3) Based on your past lab experiences with stacks and queues, is the request list of the disk scheduler
a stack or a queue?

It is a queue.

© Jones & Bartlett Learning, LLC


NOT FOR SALE OR DISTRIBUTION

You might also like