Suppose that a disk drive has 2000 cylinders numbered 0 to 1


Suppose that a disk drive has 2,000 cylinders, numbered 0 to 1999. The drive is currently serving a request at cylinder 150, and the previous request was at cylinder 125. The queue of pending requests, in FIFO order, is: 86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130 Starting from the current head position, what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests for each of the following disk-scheduling algorithms? FCFS SSTF SCAN LOOK C-SCAN C-LOOK

Solution

86,1470,913,1774,948,1509,1022,1750,130

current request - 150 , previous request-125

a.FCFS

150-86=64

1470-86=1384

1470-913=557

1774-913=861

1774-948=826

1509-948=561

1509-1022=487

1750-1022=728

1750-130=1620

total seek dis=7088

b.SSTF:

The pending requests processed in following order:

150,130,86,913,948,1022,1470,1509,1750,1774

150-130=20

130-86=44

913-86=827

948-913=35

1022-948=74

1470-1022=448

1509-1470=39

1750-1509=241

1774-1750=24

total dis=1752

c.SCAN:

currently serving request is 150

previous request is 125

150,913,948,1022,1470,1509,1750,1774,130,86

913-150=763

948-913=35

1022-948=74

1470-1022=448

1509-1470=39

1750-1509=241

1774-1750=24

1774-130=1644

130-86=44

tot dis=3312

d.LOOK:

150,913,948,1022,1470,1509,1750,1774,130,86

913-150=763

948-913=35

1022-948=74

1470-1022=448

1509-1470=39

1750-1509=241

1774-1750=24

1774-130=1644

130-86=44

tot dis=3312

e.C-SCAN:

150,913,948,1022,1470,1509,1750,1774,86,130

913-150=763

948-913=35

1022-948=74

1470-1022=448

1509-1470=39

1750-1509=241

1774-1750=24

1774-0=1774

86-0=86

130-86=44

tot dis=3528

f.C-LOOK:

150,913,948,1022,1470,1509,1750,1774,86,130

913-150=763

948-913=35

1022-948=74

1470-1022=448

1509-1470=39

1750-1509=241

1774-1750=24

1774-86=1688

130-86=44

tot dis=3356

 Suppose that a disk drive has 2,000 cylinders, numbered 0 to 1999. The drive is currently serving a request at cylinder 150, and the previous request was at cy
 Suppose that a disk drive has 2,000 cylinders, numbered 0 to 1999. The drive is currently serving a request at cylinder 150, and the previous request was at cy
 Suppose that a disk drive has 2,000 cylinders, numbered 0 to 1999. The drive is currently serving a request at cylinder 150, and the previous request was at cy

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site