disk head scheduling Flashcards
what is the aim of disk scheduling and what three things are we trying to improve
ordering requests to the disk so its moving its head in an optimal way
fairness, throughput and response time
what are some of the disk scheduling techniques
fcfs: first come first served
sstf/ssf: shortest seek time first
scan/elevator scheduling
cscan: circular scan
edf: earliest deadline first
scan + edf
scan + edf
priority based with the head moving in one direction
how does fcfs work
always completing the first request in the queue
what are 2 positives of fcfs
shortest response time and fair as no request is ever being held back in the queue
what are negatives of fcfs
leads to longer seek times due to the random head movements
also poor throughput as the head may have to travel a while to get the next request
sstf/ssf
find the request closest to the one just serviced so the head moves the shortest distance possible
what are positives of ssft/ssf
smoother head movements
short seek times and high throughput as the head is moving as little as possible
what are negatives of sstf/ssf
each process has longer response times as other processes can jump ahead
the head usually stays around one position (middle)
can lead to starvation as processes not close to the others wont get serviced
scan/elevator
go for the shortest head movement in one direction until no more requests in that direction
what is a positive of scan
no starvation
what is a negative of scan
could be unfair as requests clustered at the edge of the disk may get two chances of data access
cscan
the head should always move in one direction and jumps back to the opposite side when all requests on that side are complete
+ cscan
improves fairness
- cscan
takes longer due to going back
so lower throughput
edf
chooses the request with the highest priority and if there are multiple then it reads the closest one
what is edf used for
real time systems
soft real time system + example
missing the deadline is file
e.g. playing a video
hard real time system
achieving deadlines is critical
- edf
long seek times
long deadlines may have to wait a long time