CS FundamentalsHardWipro · Cognizant pattern
Memory holes, in order, are 150 KB, 450 KB, 250 KB, 350 KB and 500 KB. Requests arrive in order: 240 KB, 410 KB, 130 KB, 380 KB. Which placement strategy satisfies ALL four requests?
- A. First fit only
- B. Worst fit only
- C. Best fit only
- D. First fit and worst fit
Correct answer: C. Best fit only
First fit: 240→450, 410→500, 130→150, then 380 finds no hole ≥ 380 (largest is 350). Worst fit: 240→500, 410→450, 130→350, then 380 fails. Best fit: 240→250, 410→450, 130→150, 380→500, so all fit.
More Operating Systems questions
- What does this program print? (Assume fork() succeeds; the order of the two lines may vary.) c int x = 5; int main() { if (fork() == 0)…
- A resource-allocation graph contains a cycle. Which conclusion is correct?
- Reference string (times 1 to 14): 3, 5, 3, 1, 4, 4, 2, 1, 1, 6, 6, 6, 2, 5. With working-set window Δ = 4 references, what is the working…
- Processes: A (arrival 0, burst 5), B (arrival 1, burst 3), C (arrival 2, burst 8), D (arrival 3, burst 6). Priorities: A = 3, B = 1, C =…
- Cylinders 0–199, head at 72 moving towards higher cylinders. Requests: 110, 25, 160, 47, 130, 8, 95, 185. Under C-LOOK, counting the jump…
- In the first readers–writers problem (readers get priority: a reader never waits if the resource is already being read), which problem can…