UGC NET Paper 2 (Computer Science)Very hard
Three processes P0, P1, P2 request two resource types X and Y. Available = (2, 1). Allocation: P0 = (0, 0), P1 = (1, 0), P2 = (0, 1). Max: P0 = (2, 2), P1 = (1, 1), P2 = (2, 1). Using the Banker's algorithm, a safe sequence is:
- A. P1, P2, P0
- B. P0, P1, P2
- C. P2, P0, P1
- D. No safe sequence exists
Correct answer: A. P1, P2, P0
Need = Max - Allocation gives P0=(2,2), P1=(0,1), P2=(2,0); starting from Work=(2,1), P1's need is met first, releasing (3,1) for P2, then (3,2) covers P0's need, so P1,P2,P0 is safe.
Practise more UGC NET Computer Science and Applications questionsUGC NET Computer Science and Applications: notes and key points
More UGC NET Computer Science and Applications questions
- Compared to semaphores, a monitor provides:
- The main advantage of a multilevel feedback queue scheduler over a simple multilevel queue scheduler is that it:
- The convoy effect, where a long CPU-bound process causes many short processes to wait behind it, is most characteristic of:
- A relation R(Student, Course, Hobby) has two independent multivalued dependencies, Student ->> Course and Student ->> Hobby, with no…
- In relational query optimisation, the heuristic of pushing selection operations down below joins is beneficial mainly because it:
- Relations R (1000 blocks) and S (500 blocks) are joined with block nested-loop join, R as the outer relation, using 12 buffer blocks in…