CS FundamentalsHardTCS Digital · Infosys
Free partitions in memory order are 100, 500, 200, 300 and 600 KB. Processes of 212, 417, 112 and 426 KB arrive in that order. Which statement is correct?
- A. First-fit cannot place the 426 KB process, while best-fit places all four.
- B. Both first-fit and best-fit place all four processes.
- C. First-fit places all four, while best-fit cannot place the 426 KB process.
- D. Neither first-fit nor best-fit can place the 417 KB process.
Correct answer: A. First-fit cannot place the 426 KB process, while best-fit places all four.
First-fit: 212 -> 500 (288 left), 417 -> 600 (183 left), 112 -> 288 (176 left), and 426 finds no partition. Best-fit: 212 -> 300, 417 -> 500, 112 -> 200, 426 -> 600.
More Operating Systems questions
- A spinlock is built with an atomic test-and-set instruction. Which property does the plain version of this lock NOT guarantee?
- How many processes (including the original one) exist after this program runs to completion? c fork(); if (fork()) { fork(); }
- A file system uses 4 KB blocks and 4-byte block pointers. An inode has 12 direct pointers, one single-indirect and one double-indirect…
- How many page faults occur under the Optimal replacement policy with 3 frames (initially empty) for the reference string 7, 0, 1, 2, 0, 3…
- A system has 48-bit virtual addresses, 4 KB pages and 8-byte page-table entries. The page table is organised as a multi-level tree in…
- Deadlock detection with 3 resource types, Available = (0, 0, 0). Allocation: P0 (0,1,0), P1 (2,0,0), P2 (3,0,3), P3 (2,1,1), P4 (0,0,2)…