Question
Consider three processes P1, P2, and P3 with burst times
10, 5, and 8 respectively. All arrive at time 0. Using the Shortest Job First (SJF) non-preemptive scheduling algorithm, what is the average waiting time?Solution
Processes: P1 (10), P2 (5), P3 (8) Â Â Â Â Â Â Order of execution (SJF non-preemptive): P2, P3, P1 Â Â Â Â Â Â P2: Starts at 0, finishes at 5. Waiting time = 0. Â Â Â Â Â Â P3: Starts at 5, finishes at 13. Waiting time = 5. Â Â Â Â Â Â P1: Starts at 13, finishes at 23. Waiting time = 13. Â Â Â Â Â Â Total waiting time = 0 + 5 + 13 = 18 Â Â Â Â Â Â Average waiting time = 18 / 3 = 6.0
- If the total cost of 6 notebooks and 4 pencils is Rs. 240 and the total cost of 5 notebooks and 3 pencils is Rs. 195, then find the cost of 7 notebooks.
A shopkeeper purchased an article for Rs. ‘a’ and marked it 140% above its cost price and sold it after giving two successive discounts of Rs270 a...
When a product is sold for Rs.750, the profit percentage equals the percentage loss when it is sold for Rs.250. Find the selling price for a 30% profit.
The cost price of two cameras 'C' and 'D' is Rs. 40,000 and Rs. 50,000 respectively. The shopkeeper marked up the prices of camera 'C' and 'D' by 60% an...
An article with cost price of Rs. 1800 is marked 44% above its cost price and sold after two successive discounts of 20% and Rs. ‘X’ respectively su...
'A' purchased an article and sold it to 'B' at 10% profit. 'B' marked it up by 25% above the price at which 'A' has purchased it and then sold it after ...
- A customer bought a refrigerator at a 15% discount. If he had received a 30% discount, he would have saved ₹4500 more.Find the market price of the refrig...
Anita tried her hands on selling a cake that she had baked. She sold half of her cake at 20% profit, but seeing that cake would perish soon, sold half o...
A purchased an article and sold it to B at 25% profit. B marked it up by 20% above the price at which A has purchased it and then sold it after giving a...
A sold an article at 25% profit. If the profit earned had been 320% more, then the profit percentage would have been numerically equal to CP. Find the a...