CS FundamentalsHardGATE CS (PYQ pattern)
Banker's algorithm, a single resource type, 6 processes P0..P5. Allocation: 1, 2, 2, 5, 3, 4. Maximum: 9, 3, 3, 7, 7, 9. Available = 1. How many different safe sequences does this state have?
- A. 92
- B. 84
- C. 75
- D. 168
Correct answer: B. 84
Need = [8, 1, 1, 2, 4, 5]. Depth-first enumeration of every order in which each process's Need fits the current Work gives 84 safe sequences.
More Operating Systems questions
- The head is at cylinder 100 with pending requests 55, 58, 39, 18, 90, 160, 150, 38 and 184 (cylinders 0 to 199; no new requests arrive)…
- A machine uses 4-level paging, a TLB (10 ns lookup, done before every access) and 100 ns memory. On a TLB miss the walk first consults a…
- Memory access takes 200 ns. A page fault takes 8 ms if the victim page is clean and 20 ms if it must first be written back; 60% of victim…
- Free memory consists of three holes (start, size in KB): (0, 300), (400, 200), (700, 500); everything else is allocated. Operations in…
- On a Unix file system with an empty directory /tmp/x (call it X), these commands run: mkdir X/a; mkdir X/a/b; mkdir X/a/c; touch X/a/f; ln…
- A process has 4 threads on a single CPU. Each thread computes for 10 ms, makes a blocking disk read that takes 30 ms, then computes for…