redsar
asked on
disk scheduling -FCFS, SCAN, CSCAN, SSTF
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(to tal seek:112)
SCAN: 30->33->33->45->75->99(end of platter)->15->15->10->8(to tal :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.
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->
SCAN: 30->33->33->45->75->99(end
CSCAN:30->33->33->45->75->
can anyone give me some ideas cos I'm not too sure...
Thanks in advance.
ASKER
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?
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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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?
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?
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
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
ASKER
well....i supposed to use a single linked list, rather than a double linked list..
In that case there is no other way except the one you listed
ASKER
thanks...
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