0% found this document useful (0 votes)
35 views

Lab14 Manual

This document discusses disk scheduling algorithms. It provides exercises to test the First-Come First-Served (FCFS), Shortest Seek Time First (SSTF), and SCAN disk scheduling algorithms. For the FCFS algorithm, processing a sample request list took 29 seconds, while SSTF took 14 seconds and SCAN took 12 seconds, making SCAN the fastest. For FCFS to take a long time, the request list would need to have alternating requests on opposite sides of the disk so the disk head moves back and forth repeatedly.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Lab14 Manual

This document discusses disk scheduling algorithms. It provides exercises to test the First-Come First-Served (FCFS), Shortest Seek Time First (SSTF), and SCAN disk scheduling algorithms. For the FCFS algorithm, processing a sample request list took 29 seconds, while SSTF took 14 seconds and SCAN took 12 seconds, making SCAN the fastest. For FCFS to take a long time, the request list would need to have alternating requests on opposite sides of the disk so the disk head moves back and forth repeatedly.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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