Solved

disk scheduling -FCFS, SCAN, CSCAN, SSTF

Posted on 2004-04-13
9
11,628 Views
Last Modified: 2007-12-19
I know how these method works, but I'm woundering,
if the request queue is like this: 15, 33, 45, 8, 10, 75, 15, 33
diskhead: 30
So if 50% of the request are for the fixed cylinders, which method{fcfs, scan, cscan, sstf} is likely to have a better performance for this case?

I think the sstf method will have a better performance, because if we know the requests, then It is no point to use cscan, and scan method, because they both perfrom unnecssary checking after the cylinder 75.
SSTF: 30(diskhead)->33->33->45->75->15->15->10->8(total seek:112)
SCAN: 30->33->33->45->75->99(end of platter)->15->15->10->8(total :166)
CSCAN:30->33->33->45->75->99->0->8->10->15->15(total :258)

can anyone give me some ideas cos I'm not too sure...
Thanks in advance.
0
Comment
Question by:redsar
  • 4
  • 4
9 Comments
 
LVL 45

Expert Comment

by:sunnycoder
ID: 10820208
Hi redsar,

You are right  ... in this case, sstf will give the best performance

but the best strategy perhaps would have been
30->8-> ... ->75 total 22+67=89
0
 

Author Comment

by:redsar
ID: 10820296
thanks for your reply...
so , in general, SSTF will give us the best performance among the those strategy(sstf, scan, csan, fcfs) if we know 50% of the request are for a small, fixed number of cylinders?

so the best strategy by taking advantage of this "hot spot" on the disk would be the LOOK scheduling
as you mentioned?
0
 
LVL 45

Accepted Solution

by:
sunnycoder earned 220 total points
ID: 10820344
In what I mentioned, the idea was
if ( current < max && current > min )
         get current - min ; get max-current ... which ever value is smaller, start with that end (min/max)

>SSTF will give us the best performance among the those strategy(sstf, scan, csan, fcfs) if we know
>50% of the request are for a small, fixed number of cylinders?
Generally sstf is best but there can be degenerate cases where other algorithms will perform better or atleast the same ...e.g head at 80 and requests for 99 and 0
0
 
LVL 9

Assisted Solution

by:ankuratvb
ankuratvb earned 30 total points
ID: 10820441
Hi redsar,

There have been variants of SCAN and CSCAN which dont seek to end of platter.They consider the last request on the queue and then scan back.

But yes,SSTF does give you the best performance most of the times.
0
Network it in WD Red

There's an industry-leading WD Red drive for every compatible NAS system to help fulfill your data storage needs. With drives up to 8TB, WD Red offers a wide array of solutions for customers looking to build the biggest, best-performing NAS storage solution.  

 

Author Comment

by:redsar
ID: 10820480
thanks , got the idea
and If this is the linked list for the request:
33->72->47->8->90->NULL
diskhead:63
and I wanna perform SCAN algorithum :
72->90->99->47->33->8
what I think is using the disk head to divide the linked list into two sub linked list,
one is sorted: 72->90
another: 47->33->8
and then combine that....and then take the first from the linked list and then free that process,
but it seems pretty messy to do that, any simpler or any other ideas,
thanks again?
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 10820528
1. maintain doubly linked list ...
2. sort it
3. start from smallest request > disk head ... proceed till end of disk
4. back to original (starting position of step 3) ... traverse the list in other direction
0
 

Author Comment

by:redsar
ID: 10820611
well....i supposed to use a single linked list, rather than a double linked list..
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 10820627
In that case there is no other way except the one you listed
0
 

Author Comment

by:redsar
ID: 10820676
thanks...
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now