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.
Difference between discount offered by Company B and cost of Company A.
Number of male employees in HR and Production departments together were how much more than the number of female employees in IT department?
Percentage Spent on Travel:Â
Find the average number of surgical masks sold on Monday and Tuesday.
The number of males working in the IT department forms what per cent of the total number of males in the organization?
Total number of burgers sold by Piccolo is approximately what percent of the total number of Veggie burgers sold by all the three cafes?
What is the difference between the total number of male doctor s of hospital A and B together and total number of female doctors  of hospital C an...
The number of Butter cookies baked on Wednesday is how much % of the total number of Chocolate cookies baked on all days?
If 25% of the female employees leave the job from company C and 15% of the male employees joins company A, then find the difference between the number ...
What is ratio between total numbers of employees who are unmarried to total number of female employees who are married?