Department of Computer Science & Engineering: University of Asia Pacific (UAP)
Department of Computer Science & Engineering: University of Asia Pacific (UAP)
Instructions:
1. There are Four (4) Questions. Answer all of them. All questions are of equal value. Part marks are
shown in the margins.
2. Non-programmable calculators are allowed.
1. a) Take your student ID, now take the reverse string of your student ID. Now append(join) 30
them. Now, suppose this represent the page requests for a system. Now, apply all the three
page replacement algorithms on this scenario, where window size = 3, and analyze which
algorithm is better and explain why.
2. a) Suppose, there are 5 processes P0 through P4; 3 resource types: P (11 instances), Q (6 30
instances), and R (8 instances).
Snapshot at time T0:
Allocation Max
PQR PQR
P0 121 864
P1 311 433
P2 413 913
P3 322 333
P4 113 544
Here, Available = the last three digits of your ID, BUT, mod each digit with 3. For example
of the last 3 digit of your id is 198, them Available = 102, (1%3 = 1, 9%3 = 0, 8%3 = 2).
Now, perform Bankers and determine if there is any Deadlock present in this scenario.
OR