Scan-EDF Disk Scheduling

81 downloads 395 Views 37KB Size Report
Page 1 ... ➢Compromise between optimization of seek times and response times. ➢data in the middle of the ... ❖SCAN
www.site.uottawa.ca/~elsaddik www.el-saddik.com

Earliest Deadline First (EDF) Disk Scheduling ¾Real-time scheduling algorithm ¾Read block for stream with nearest deadline ¾Most often applied as a preemptive scheduling scheme ¾May result in: ™Excessive seek time and ™Poor throughput t

order of arrival

3 24 3 30 2 16

3 24

3 50 2 42

3 30

1 45 1 12 2 40 1 22

3 50

1 12 2 40

1

...

07_Scheduling © elsaddik

www.site.uottawa.ca/~elsaddik www.el-saddik.com 07_Scheduling © elsaddik

2 40

1 22

2 42 2 40

3 30 3 50

50

2 42 16 42

40 45

12 20

2

1 45 1 12

2 42 1 45 2 40

2 16 3 50

2 16 3 50

22

requests with: deadline

blocknumber

Scan-EDF Disk Scheduling SCAN: ¾Move disk head always between disk edges (BIdirectional) ¾Read next requested block in disk movement direction ¾Compromise between optimization of seek times and response times ¾data in the middle of the disk has better access properties SCAN-EDF ¾Combines advantages of: ™SCAN (seek optimization) with ™EDF (real-time aspects) ¾Method: ™Requests with earlier deadlines are served first ™Among requests with same deadline, requests are served by track location • Increase efficiency by modifying deadlines

1

www.site.uottawa.ca/~elsaddik www.el-saddik.com

SCAN-EDF Properties ¾apply EDF ¾for all requests with same deadline apply SCAN t 3 24 3 2 3 2 1 1 2 1

30 16 50 42 45 12 40 22 1

12

2 1

40 22

1 2

45 40

1

22

42

3 2

50 42

2

40

2

40

1

45

16

3 2

50 40

3

30

2 3

16 50

16 40

42

Deadline 2

45

...

22

3 07_Scheduling © elsaddik

12

Deadline 1

downwards 20

www.site.uottawa.ca/~elsaddik www.el-saddik.com

2

2

Group Sweeping Scheduling To reduce disk arm movements, the set of n streams is divided in to g groups. Groups are served in fixed order ¾Form groups ™with deadlines lying closely together ™or in round robin manner (in general) ¾Apply SCAN to each group deadline blockno.

3.4 24 3.3 30 2.0 16

deadline 1.1

3.3 2.2 1.2 1.4

1.4

12

1.2 1.1

45 22

50 42 45 12

deadline 2.0

2.4 40 1.1 22

2.0

16

2.2 2.4

42 40

scan

deadline 3.3 3.4 24 3.3 30 3.3 50

scan

scan

4 07_Scheduling © elsaddik

12

22

group 1

45

42

40

16

group 2

24

30

50

group 3

t

2