Professional Documents
Culture Documents
_________________________________________________________________i-
GATE,B-713, Street 22, Smriti Nagar, Bhilai- 0788-4902937, Contact 98271-62352
[1]
Operating System GATE 2023 – 2024 (CS/IT)
Q.4) Which of the following are safe sequences of above RAG? (MSQ,Medium)
A. P2,P1,P5,P4,P3,P6
B. P2,P1,P5,P3,P4,P6
C. P2,P5,P4,P3,P1,P6
D. None of these
Consider the following request of resources(X,Y and Z) by processes and their current
allocation:
P1 1(high) 2 4 3 0 0 1
_________________________________________________________________i-
GATE,B-713, Street 22, Smriti Nagar, Bhilai- 0788-4902937, Contact 98271-62352
[2]
Operating System GATE 2023 – 2024 (CS/IT)
P2 2 6 7 0 3 2 0
P3 3 2 8 5 4 3 3
P4 4 6 7 5 4 2 4
P5 5(low) 7 7 10 4 1 5
If the deadlock occurs,then OS recover from deadlock by suspending the process which
is holding the resources according to priority and then assigning the lowest priority to
the suspended process.
If current 1 instance of X,3 instance of Y and 2 instance of Z are available,then
Q.7) How many processes are suspended so that all of the request has been satisfied?
(NAT,Hard)
Q. 8) Which of the following process will finish last? (MCQ,Hard)
A. P2
B. P3
C. P4
D. P5
Q.9) Which of the following are true regarding threads? (MSQ,Hard)
A. State is not shared by threads.
B. Open files are not shared by threads
C. Scheduling policy and priority is not shared by threads
D. CPU time consumed is shared by threads.
Q.11) Which of the following are applications in which threads are used?
(MCQ,Medium)
A. Browsers
B. Wordpad
C. Both A and B
D. None of these
_________________________________________________________________i-
GATE,B-713, Street 22, Smriti Nagar, Bhilai- 0788-4902937, Contact 98271-62352
[3]
Operating System GATE 2023 – 2024 (CS/IT)
_________________________________________________________________i-
GATE,B-713, Street 22, Smriti Nagar, Bhilai- 0788-4902937, Contact 98271-62352
[4]
Operating System GATE 2023 – 2024 (CS/IT)
Void main()
{
fork();
for(int i=0;i<10;i++)
{
if(i%2==0)
fork();
}
}
Total number of child process created is____ (NAT,Medium)
Void main()
{
fork();
for(int i=0;i<20;i++)
{
fork();
if(i>10)
{
for(j=i;j<20;j++){
if(i%2==0)
fork();
}
}
}
fork();
}
If the total number of process created in above code is n then log2n
is______(NAT,Hard)
_________________________________________________________________i-
GATE,B-713, Street 22, Smriti Nagar, Bhilai- 0788-4902937, Contact 98271-62352
[5]
Operating System GATE 2023 – 2024 (CS/IT)
Void main()
{
if(fork() && (!fork()))
{
if(fork() || fork())
fork();
}
print(“1”)
return 0;
}
A. 111111
B. 1111111
C. 11111
D. 11111111
Q.18 A system shares 20 instances of a resource. The current allocation and maximum
requirement of this resource for four concurrent processes are shown below in tuple
format as: (process id, current allocation, maximum need).
(P1, 4, 6), (P2, 7, 8), (P3, 2, 4), (P4, 3, 5)
The possible number of safe sequences in this system is:
A. 24
B. 16
C. 18
D. 20
Q.19 Consider the following snapshot of a system. There are no outstanding unsatisfied
requests for resources.
_________________________________________________________________i-
GATE,B-713, Street 22, Smriti Nagar, Bhilai- 0788-4902937, Contact 98271-62352
[6]
Operating System GATE 2023 – 2024 (CS/IT)
Available resources are <R1, R2, R3, R4> = <2, 1, 0, 0>. Consider the following
statements
S1 : The system is currently in safe state.
S2 : If a new request from P2 arrives for [0, 1, 0, 0], this request can be safely granted
immediately.
A. Only S1 is true
B. Only S2 is true
C. Both S1 and S2 are true
D. Neither S1 or S2 is true
Q.20 Consider the resource allocation graphs of systems S1 and S2 given below.
Which of the following system(s) are in deadlock?
_________________________________________________________________i-
GATE,B-713, Street 22, Smriti Nagar, Bhilai- 0788-4902937, Contact 98271-62352
[7]
Operating System GATE 2023 – 2024 (CS/IT)
_________________________________________________________________i-
GATE,B-713, Street 22, Smriti Nagar, Bhilai- 0788-4902937, Contact 98271-62352
[8]