Professional Documents
Culture Documents
OS QB U1-U6 IT @SPPUITPro
OS QB U1-U6 IT @SPPUITPro
P5 5 6
P6 7 3
P7 10 2
Draw a Gantt chart and calculate average turnaround time and average waiting time for following
CPU scheduling algorithm.
1.SJF-Non Preemptive
2.SJF-Preemptive
UNIT-3
1 Explain following terms: Race Condition, Critical Section, and Mutual Exclusion.
2 Why there is need of synchronization? What is critical section problem?
3 Which conditions must three requirements for critical section problem.
4 Explain Peterson’s solution for two process.
5 Short note on Locks and Test and Set, swap instruction.
6 Define Semaphore and its use.
7 Define deadlock, explain necessary conditions to occur deadlock.
JOIN @PuneEngineers | Telegram
8 Solution using semaphore for producer consumer problem.
9 Discuss reader writer problem and solution using semaphore.
10 Discuss dinning philosopher’s problem and solution using semaphore.
11 Explain monitor concept in process synchronization.
12 Define deadlock, explain necessary conditions to occur deadlock.
13 Using an example, show how resource allocation graph can be used to detect in a system having only
one instance of each resource type.
14 Explain resource allocation graph. How is it used in detection of deadlock?
15 Explain deadlock prevention in brief.
16 Explain deadlock recovery methods.
17 Consider the following snapshot of a system
Process Allocation Max Available
A B C D A B C D A B C D
P0 0 0 1 1 0 0 1 1 1 4 2 1
P1 1 0 0 1 1 6 5 0
P2 1 2 5 3 2 3 4 6
P3 0 5 3 1 0 5 4 1
P4 0 1 0 2 0 6 4 6
a) Calculate need matrix.
b) Is system in safe state?
c) Can a request from p1 arises for 0 3 1 0, can the request will immediately granted?
21 The operating system contains three resources. The number of instances of each resource type
A=10,B=5,C=7 from the following data:
Process Allocation Max
A B C A B C
P0 0 1 0 7 5 3
P1 2 0 0 3 2 2
P2 3 0 2 9 0 2
P3 2 1 1 2 2 2
P4 0 0 2 4 3 3
a)Calculate the content of need matrix.
b) Is current allocation in safe or unsafe? Why?
13 Consider the following page reference string 7,0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,1 for a memory with
three frames. How many page fault would occur for following page replacement algorithm? a)FIFO
b)Optimal
14 Consider the following page reference string 4,7,6,1,7,6,1,2,7,2 for a memory with three frames. How
many page fault would occur for following page replacement algorithm?a)FIFO b) LRU c)Optimal