CS FundamentalsHardGATE CS
Four processes need at most 3, 4, 5 and 2 units of one resource type and request them one at a time in any order. What is the smallest number of units that makes deadlock impossible?
- A. 14
- B. 11
- C. 10
- D. 12
Correct answer: B. 11
Worst case: each process holds one less than its maximum, (3−1) + (4−1) + (5−1) + (2−1) = 10, and one more unit lets someone finish: 11. 14 is the total of the maxima, which is sufficient but not minimal.
More Operating Systems questions
- Semaphores s = 0 and t = 0. P1: print A; signal(s); wait(t); print B. P2: wait(s); print C; signal(t); wait(s); print D. P3: print E…
- How many processes exist at the end, including the original? (Every fork() succeeds.) c fork() && (fork() || fork()); fork();
- f.txt does not exist at the start. Program X: fd = open("f.txt", OWRONLY|OCREAT, 0644); then fork(); the child writes "cd" and exits; the…
- Cylinders 0–299; the head is at 140 and moving toward higher numbers. Requests: 45, 210, 160, 12, 275, 98, 130, 190. Which of SSTF and…
- A disk spins at 7200 RPM, has an average seek of 6 ms and 500 sectors of 512 bytes per track. A 1 MB file is read as 256 blocks of 4 KB…
- A Unix-style inode has 12 direct pointers, one single-indirect and one double-indirect pointer; blocks are 4 KB and block pointers 4…