Você está na página 1de 5

CSNB 224

QUIZ!!!
Answer these questions and submit by today.
DEADLINE 3/8/2017
5PM
QUESTION 1:
1. Draw a RESOURCE GRAPH based on the following specification [6 marks]:
a. Process A is in possession of Resource 1 and Resource 3, it is requesting for Resource 5
b. Process B is in possession of Resource 2 and Resource 4, it is requesting for Resource 6
c. Process C is in possession of Resource 7 and Resource 8, it is requesting for Resource 1

2. Based on the RESOURCE GRAPH you have drawn in 1, is there a deadlock? Justify
your answer. [4 marks]
QUESTION 2:
R1 R2 R3 R1 R2 R3 R1 R2 R3
P1 4 2 3 P1 3 2 2 9 9 9
P2 2 1 3 P2 2 1 2 Resource Vector
P3 3 1 4 P3 3 1 1 R1 R2 R3
P4 1 2 0 P4 1 2 2 ? ? ?
Claim Matrix Allocation Matrix Available Vector

1. Based on Initial state of the Resources and the Process Request, calculate the Available
Vector [2 marks] and the Need Matrix [2 marks].

2. Determine whether the process request and the resources available will result in a SAFE
STATE or an UNSAFE STATE. Show your calculation to justify your answer [6 marks]
QUESTION 3:
A B C D E

20M 30M 40M 50M 35M 40M 50M 20M 10M 10M

Consider that dynamic partitioning technique is being used and the


diagram above shows the memory blocks at a given point in time.
The shaded areas are allocated blocks, and the white areas are free
blocks.
The last placement is at 40M.
The next FIVE memory requests are for 20M, 10M, 20M, 30M and 40M.
Determine which free block would be allocated to each of the five block
request using the following placement algorithms:
1. Best Fit [5 marks]
2. Next Fit [5 marks]
QUESTION 4:
REQUEST ORDER FOR TRACKS
F
E
65, 35, 77, 12, 90, 100, 93, 87, 115 G
D 92

C H

B I
A 0

Refer to disk track figure on the upper right corner. With current read location at
track 92.
Draw a proper the access graph above according to the following scheme: (10 marks)
a) SSTF
b) SCAN

Você também pode gostar