单选题:Suppose we have four resources, RA, RB, RC and RD. Given below a
Suppose we have four resources, RA, RB, RC and RD. Given below allocation matrix, available vector and maximal requirement matrix.
```
Max
RA RB RC RD
P0 3 2 1 4
P1 0 2 5 2
P2 5 1 0 5
P3 1 5 3 0
P4 3 0 3 3
Allocation
RA RB RC RD
P0 1 0 1 1
P1 0 1 2 1
P2 4 0 0 3
P3 1 2 1 0
P4 1 0 3 0
Available
RA RB RC RD
1 2 2 2
```
Can a request of one instance of RA by Process P0 be granted safely according to Banker’s algorithm?@[A](1)
A. can, but unsafe
B. cannot, deadlock
C. can, safe
D. not sure
A.can, but unsafe
B.cannot, deadlock
C.can, safe
D.not sure
答案:A
```
Max
RA RB RC RD
P0 3 2 1 4
P1 0 2 5 2
P2 5 1 0 5
P3 1 5 3 0
P4 3 0 3 3
Allocation
RA RB RC RD
P0 1 0 1 1
P1 0 1 2 1
P2 4 0 0 3
P3 1 2 1 0
P4 1 0 3 0
Available
RA RB RC RD
1 2 2 2
```
Can a request of one instance of RA by Process P0 be granted safely according to Banker’s algorithm?@[A](1)
A. can, but unsafe
B. cannot, deadlock
C. can, safe
D. not sure
A.can, but unsafe
B.cannot, deadlock
C.can, safe
D.not sure
答案:A