Vous êtes sur la page 1sur 31

A

SEMINAR
ON
Study of D-SCAN Algorithm

PRESENTED BY:-
SIDDHARTH TAYADE
FINAL YR. CSE
B.N.C.O.E. PUSAD

GUIDED BY:
PROF. S.Y.AMDANI
CONTENTS:-
1. Overview of conventional algorithms
2. SCAN
3. EDF (Earliest deadline first)
4. D-SCAN (Earliest deadline SCAN)
5. Example-1
6. Flow
7. Example-2
8. Advantages & disadvantages

9. Conclusion & References


Overview of conventional Algorithms:-
FCFS

SCAN

drawbacks
C-SCAN

SSTF
SCAN Algorithm:-

Requests are served on the basis of


their track locations

High disk throughput

Violate real time contraints


EDF Algorithm:-

Requests are served on the basis of their


deadlines

 Deadlines in ascending order

Good real time scheduler

drawback

Poor disk throughput


D-SCAN Algorithm:-

Modification of EDF using SCAN

Request with the earliest deadline


determines the scan direction

The head seeks in the direction of the


request with the earliest deadline
servicing all requests along the way
EXAMPLE
• EDF Order: T1 T4 T2 T3 T6 T5 T0

• DATA LOCATIONS

Scan order is T3 T4 T5 T2 T1 T0 T6.


EXAMPLE
• EDF Order: T1 T4 T2 T3 T6 T5 T0
EXAMPLE
• EDF Order: T1 T4 T2 T3 T6 T5 T0
EXAMPLE
• EDF Order: T1 T4 T2 T3 T6 T5 T0
EXAMPLE
• EDF Order: T1 T4 T2 T3 T6 T5 T0
EXAMPLE
• EDF Order: T1 T4 T2 T3 T6 T5 T0
EXAMPLE
• EDF Order: T1 T4 T2 T3 T6 T5 T0
EXAMPLE
• EDF Order: T1 T4 T2 T3 T6 T5 T0
EXAMPLE
• D-SCAN Order: T1 T4 T2 T3 T6 T5 T0

• DATA LOCATIONS
EXAMPLE
• D-SCAN Order: T1 T4 T2 T3 T6 T5 T0
EXAMPLE
• EDF Order: T1 T4 T2 T3 T6 T5 T0
EXAMPLE
• EDF Order: T1 T4 T2 T3 T6 T5 T0
EXAMPLE
• D-SCAN Order: T1 T4 T2 T3 T6 T5 T0

Service order of D-SCAN is


T2 T1 T3 T4 T0 T6 T5
Flow of Algorithm:-
Example:-
Assumptions:-
i)Transaction ID
ii)Released Time
iii)Block Location
iv)Block Size
v)Start Index
vi)End Index
vii)Slack Factor(2)
viii)Current head position=3
Example:-
Transaction Released Block Block Start End Average Deadline Transfer
ID Time Location Size Index Index Execution (ri + slack Time
(ri) (BS) Time(AET) factor * AET) (0.6*BS)
(1.5*BS)

T1 1 2 3 2 4 4.5 10 1.8

T2 0 7 2 7 8 3 6 1.2

T3 3 9 2 9 10 3 9 1.2

T4 5 14 5 14 18 7.5 20 3

T5 4 19 3 19 21 4.5 13 1.8

T6 0 6 1 6 6 1.5 3 0.6

T7 1 5 1 5 5 1.5 4 0.6

T8 2 12 2 12 13 3 8 1.2
SERVICE TABLE:-
Cj,i T1 T2 T3 T4 T5 T6 T7 T8

T1 - 2.7 3.3 4.8 6.3 2.4 2.1 4.2

T2 3.0 - 1.5 3.0 4.5 1.8 2.1 2.4

T3 3.6 2.1 - 2.4 3.9 2.4 2.7 1.8

T4 7.8 6.3 5.7 - 3.3 6.6 6.9 4.8

T5 7.5 6.0 5.4 3.9 - 6.3 6.6 4.5

T6 1.8 0.9 1.5 3.0 4.5 - 0.9 2.7

T7 1.5 1.2 1.8 3.3 4.8 0.9 - 2.7

T8 4.5 3.0 2.4 1.5 3.0 3.3 3.6 -

Cj,i- Time required for executing ith


transaction after servicing jth transaction
TIMING DIAGRAM USING EDF

T6 T7 T2 T8 T3 T1 T5 T4

1.5 2.4 4.2 6.6 9.0 13.2 19.8 24.9

NO. OF HITS: 5 NO.OF MISS: 3


TIMING DIAGRAM USING D-SCAN

T7 T6 T2 T3 T8 T1
T4 T5

1.2 2.1 3.6 5.1 6.9 12.0


18 20.1

•NO.OF HITS: 6 NO.OF MISS: 2


•Advantages
Disk head movement is reduced.

Throughput is improved as compared to EDF


•Disadvantages
Chances of missing the deadline.

Fails in overloaded condition.

Fails when deadlines are same.


Conclusion
In this way by modifying the EDF using
SCAN algorithm, we can conclude that D-SCAN is
better to reschedule the transaction in which
the disk head movement is reduced which leads
to improvement in disk throughput.
References
[l] Abbott, Robert and Hector Garcia-Molina,
"Scheduling Real-Time Transactions: a Performance
Evaluation," Proceedings of the 14th VLDB Conference,
pp. 1-12, 1988.
[2] Abbott, Robert and Hector Garcia-Molina,
"Scheduling Real-Time Transactions with Disk Resident
Data," Proceedings of the 15th VLDB Conference,
1989.
[3] Coffman, E.G., and M. Hofri, "On the Expected
Performance of Scanning Disks," SIAM Journal of
Computing, Vol. 11, No. 1, Feb. 1982, pp. 60-70.
[4] Coffman, E.G., L. Klimko and B. Ryan, "Analysis
of Scanning Policies for Reducing Disk Seek Times,"
SIAM Journal of Computing, Sept. 1972, pp. 269-279.
Thank you
ANY QUERIES???

Vous aimerez peut-être aussi