CS FundamentalsHardGATE CS
Memory holes in address order: 100 KB, 500 KB, 200 KB, 300 KB, 600 KB. Requests in order: 212 KB, 417 KB, 112 KB, 426 KB (a hole that is used shrinks and stays in place). Which placement policies can satisfy ALL four requests?
- A. First fit and best fit
- B. Worst fit only
- C. All three
- D. Best fit only
Correct answer: D. Best fit only
First fit: 212→500 (288 left), 417→600, 112→288, 426 fails. Best fit: 212→300, 417→500, 112→200, 426→600, all placed. Worst fit: 212→600, 417→500, 112→388, 426 fails. Only best fit places all four.
More Operating Systems questions
- A virtual address is 0x00403A7C on a system with 4 KB pages and a two-level page table (10-bit outer index, 10-bit inner index, 12-bit…
- 32-bit addresses, 4 KB pages, 4-byte PTEs, two-level paging (10/10/12). A process uses only 8 MB of code at virtual address 0 and 4 MB of…
- A system has resource types A, B, C. Available = (2,1,0). Allocation: P0 (1,1,0), P1 (0,1,2), P2 (2,0,1), P3 (1,0,0). Max: P0 (3,2,2), P1…
- Banker's algorithm state: Available = (3,3,2). Allocation: P0 (0,1,0), P1 (2,0,0), P2 (3,0,2), P3 (2,1,1), P4 (0,0,2). Max: P0 (7,5,3), P1…
- Two resource types X, Y. Available = (1,1). Allocation: P0 (1,0), P1 (0,1), P2 (1,1). Max: P0 (2,1), P1 (1,2), P2 (2,2). How many of the…
- A system has R identical instances of a resource shared by 4 processes needing at most 3, 4, 5 and 2 instances respectively. What is the…