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.
An article was marked 80% above the cost price and sold after a discount of Rs. 780. If the selling price of the article is Rs. 1380 then find the cost ...
A company produces two types of products, A and B. The production cost per unit for product A is ₹600 and for product B is ₹800. The company produce...
A person invests ₹20,000 in a scheme that offers 20% profit in the first year and 25% profit in the second year(On total amount including interest). W...
- If the total cost of 4 chairs and 7 tables is Rs. 410 and the total cost of 3 chairs and 5 tables is Rs. 300, then find the cost of 6 chairs.
'P' sold an item to 'Q' at 12.5% profit, 'Q' sold it to 'R' at 33(1/3)% loss. If 'R' paid Rs. 1,800, then find the price at which 'P' bought the item.
Jagat Singh sold an article for ₹6,000 and incurred a loss. Had be sold it for ₹7,400, his profit would have been 2/3 of the amount of loss that he...
Selling price of article ‘A’ when sold at a profit of 55% is Rs. 200 more than its selling price when sold at a loss of 45%. If the cost price of ar...
- A vendor made a profit of 22% on an article, while another vendor sold the same article for a 19% profit. If the first vendor’s profit was Rs. 45 more th...
- An article is marked 60% above its cost price and sold after allowing a discount of 20%. If the selling price of the article is Rs. 4,800, then find the pr...
A person bought an article and sold it at a loss of 15%. If he had bought it for 20% less and sold it for Rs114 more he would have had profit of 30%. F...