CS FundamentalsVery hardGATE CS (PYQ pattern)
A single resource has 9 units and three processes have maximum claims 6, 5 and 4. Consider every possible current allocation (a0, a1, a2) with 0 <= ai <= maxi and a0 + a1 + a2 <= 9. How many of these allocations are SAFE states?
- A. 155
- B. 142
- C. 152
- D. 130
Correct answer: B. 142
Enumerate all 155 feasible allocations and run the safety test (a process can finish if its remaining need fits in the available units); 142 are safe.
More Operating Systems questions
- An ext3-style file system appends one data block to a file; the update also modifies the inode and the block bitmap. In ORDERED journaling…
- A RAID 0 array has 5 disks and a chunk size of 4 blocks (chunk k is on disk k mod 5, as the (k div 5)-th chunk on that disk). On which…
- An inode has 12 direct pointers, one single-, one double- and one triple-indirect pointer; blocks are 2048 bytes and pointers are 4 bytes…
- A parent creates a pipe, forks, and the child loops on read(fd[0], buf, 1) until it returns 0. The parent writes 3 bytes into fd[1] and…
- A system uses segmentation with paging (1024-byte pages). Segment table: seg 0: limit 3000, page frames [7, 2, 9]; seg 1: limit 1500…
- A process on a 4-level, 48-bit paging system (9 index bits per level, 4 KB pages, 4 KB page-table pages) maps three regions: 2 MB at…