CS FundamentalsHardGATE CS
Free holes (in order) are 150, 400, 220, 350 and 500 KB. Requests of 210, 380, 140 and 330 KB arrive in that order. Which placement strategies satisfy all four requests?
- A. First fit and best fit, but not worst fit
- B. Best fit only
- C. All three: first, best and worst fit
- D. Worst fit and first fit, but not best fit
Correct answer: A. First fit and best fit, but not worst fit
First fit: 210→400, 380→500, 140→150, 330→350. Best fit: 210→220, 380→400, 140→150, 330→350. Worst fit puts 210 in 500 and 380 in 400, then 140 in 350, leaving 150, 20, 220, 210 and 290: nothing fits 330.
More Operating Systems questions
- A buddy allocator manages 1024 KB starting at address 0 and always uses the lowest-addressed free block of the needed size. Requests: A =…
- Periodic tasks (execution time, period = deadline): T1 (1, 4), T2 (2, 6), T3 (3, 12), scheduled by rate-monotonic priorities. Which…
- A Unix-style inode has 10 direct pointers, 1 single-indirect and 1 double-indirect pointer. Blocks are 1 KB and block pointers 4 bytes…
- Same inode (10 direct, 1 single-indirect, 1 double-indirect; 1 KB blocks; 256 pointers per block). The inode is already in memory and…
- A 2 GB partition uses a FAT with 4 KB clusters and 4-byte FAT entries. How large is one copy of the FAT?
- A TLB has 64 entries. What is its reach with 4 KB pages, and with 2 MB huge pages?