Question
Which I/O scheduling algorithm prevents starvation of
requests?Solution
The SCAN scheduling algorithm, also called the Elevator Algorithm , prevents starvation by servicing requests in one direction until it reaches the end, then reversing direction. This ensures that every request, regardless of its position, gets serviced within a predictable timeframe.
- How SCAN Works: Requests are arranged based on their positions. The disk arm moves in a single direction, servicing requests, and reverses once it reaches the last request in that direction.
- Prevents Starvation: Since SCAN covers all requests in its path, even those far from the initial direction of the disk arm are eventually served.
- Requests: 98, 183, 37, 122, 14, 124, 65, 67 (Initial Head: 53)
- SCAN Movement: 53 → 37 → 14 → Reverse → 65 → 67 → 98 → 122 → 124 → 183
- This ensures fairness in servicing requests.
- While fair, FCFS can lead to high seek times due to requests being served in the order of arrival without considering their proximity.
- SSTF selects the closest request but may cause starvation for distant requests.
- LOOK is similar to SCAN but does not traverse to the end of the disk; however, it also prevents starvation.
- CLOOK further optimizes LOOK but may still involve longer wait times for requests on the other side of the disk.
How many students passed in first class?
I. 75% of the students who appeared in the examination have passed in first or second or third class....
In how many days 8 boys and 6 girls can complete the work working together?
Statement I: The ratio of efficiency of boy to girl is 3:1
...
Janaki leaves her home everyday at 7:55 a.m and reaches at 9: 25 a.m. However, one day she left her home at 7:55 a.m. but reached office at 09:20:30 a.m...
A shopkeeper sells a homogeneous mixture of A and B at a rate of Rs 320 per kg. Find the profit percentage of the shopkeeper.
Statement I : he b...
How much profit did the company earn in the year 2016?
Statement I : The company earned 45% more profit in the year 2017 than that in the year 2...
Calculate the total time it takes for a ship to cover a distance of 120 km downstream and 80 km upstream.
Statement I: The ship can travel 1300 ...
What is the profit percent or loss percent incurred in the transaction?
I. 5% discount is given on the marked price.
II. Cost price is 10%...
The question consists of two statements numbered "I and II" given below it. You have to decide whether the data provided in the statements are suicient ...
What is the ratio of IT employees to HR employees in A?
Statement I: The ratio of IT to Sales employees in A is 4:5, and the ratio of Finance to ...
What is the probability of getting two white balls from a box containing only white and blue balls?
Statement I : There are total 72 balls in th...