CS FundamentalsVery hardGATE CS
Banker's algorithm with 3 resource types. Available = (1,1,1). Allocation rows P0..P3: (1,0,1), (0,2,0), (2,1,0), (1,1,1); Maximum rows: (3,2,2), (1,3,1), (3,2,1), (2,2,2). How many distinct safe sequences exist?
- A. 12
- B. 18
- C. 16
- D. 24
Correct answer: C. 16
Needs: P0 (2,2,1), P1 (1,1,1), P2 (1,1,1), P3 (1,1,1). P0 cannot start (its need exceeds (1,1,1)) and cannot follow P1 alone (available (1,3,1) has only 1 of the first type), which removes 6+2 of the 24 orders, leaving 16.
More Operating Systems questions
- A disk has cylinders 0-199. The head is at cylinder 50 moving towards higher numbers. Pending requests: 176, 79, 34, 60, 92, 11, 41, 114…
- A 1024 KB buddy system (minimum block 32 KB, lowest-address-first allocation) serves A=70 KB, B=35 KB, C=80 KB, D=60 KB in that order…
- A system uses the clock (second-chance) page replacement with 4 frames. Initially all frames are empty; a page has its reference bit set…
- Memory access takes 200 ns. A page fault on a clean victim takes 8 ms to service and on a dirty victim 20 ms; 40% of victims are dirty…
- A system has 48-bit virtual addresses, 8 KB pages and 16 GB of physical memory. An inverted page table has one entry per frame, holding a…
- A FAT file system on a 2 TB partition uses 8 KB blocks. Each FAT entry holds a block number plus 4 control bits and entries are rounded up…