Computer Science and Information Technology
GATE CSE topic:operating-system PYQs
Build your understanding with focused practice from past exam papers.
How to practice topic:operating-system
Attempt a question, record the concept and assumptions, then check the available answer. Rework mistakes after revising the relevant concepts. Topic tags can overlap; review the question context.
Questions 1–10 of 65. Imported answers require independent review unless marked reviewed.
Question 23
Open questionCS2MCQ1 markNeeds review
Which one of the following CPU scheduling algorithms cannot be preemptive?
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 29
Open questionCSMSQ1 markNeeds review
With respect to deadlocks in an operating system, which of the following statements is/are FALSE?
Your answerSelect all correct options. You can choose more than one.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 35
Open questionCSNAT1 markNeeds review
Consider a system consisting of
instances of a resource
, being shared by 5 processes. Assume that each process requires a maximum of two instances of resource
and a process can request or release only one instance at a time. Further, a process can request the second instance of the resource only after acquiring the first instance.The minimum value of
for the system to be deadlock-free is ________. (answer in integer)Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 51
Open questionCS2MSQ2 marksNeeds review
Consider three processes P1, P2, and P3 running identical code, as shown in the pseudocode below. A and B are two binary semaphores initialized to 1 and 0, respectively. X is a shared variable initialized to 0. Each line in the pseudocode is executed atomically.
Pseudocode of P1, P2, and P3
Wait(A);
Print(*);
X = X+1;
If (X == 2)
{
Print($);
Signal(B);
}
Signal(A);
Wait(B);
Print(#);
Signal(B);
Assume that any of the three processes can start to execute first and context switching can happen between these processes at any arbitrary time and in any arbitrary order.
Which of the following patterns is/are possible to be generated as an outcome of the execution of these three processes?
Your answerSelect all correct options. You can choose more than one.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 53
Open questionCS2NAT2 marksNeeds review
To keep track of free blocks in a file system, one of the two approaches is generally used – using bitmaps (bit vectors) or using linked lists. Consider that the linked list approach is used to keep track of free blocks in a file system. Assume that the disk size is 16 GB, block size is 2 KB, and block numbers used are 32-bit long. A single pointer of size 4 bytes is used in each block of the list to point to the next block of the list. The number of blocks required to hold the free disk block numbers is __________. (answer in integer)
Note: 1K=2¹⁰ and 1G=2³⁰
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 55
Open questionCS2NAT2 marksNeeds review
Consider contiguous allocation of physical memory to processes using variable partitioning scheme. Suppose there are 8 holes in the memory of sizes 20 KB, 4 KB, 25 KB, 18 KB, 7 KB, 9 KB, 15 KB, and 12 KB. Assume that no two holes are adjacent. Two processes P1 of size 16 KB and P2 of size 9 KB arrive in that order, and they are allocated memory using the best-fit technique. After allocating space to P1 and P2, the number of holes of size less than 8 KB is __________. (answer in integer)
Note: 1K=2¹⁰
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 63
Open questionCSNAT2 marksNeeds review
Consider the following program snippet. Assume that the program compiles and runs successfully. Further, assume that the fork() system call is always successful in creating a process.
int main () {
int i;
for (i = 0; i < 3; i++){
if (fork() == 0)
continue;
break;
}
printf("Hello!");
return 0;
}
The total number of times that the printf statement gets executed is ________. (answer in integer)
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 64
Open questionCSNAT2 marksNeeds review
Consider a CPU that has to execute two types of processes. The first type, Actuators (A), requires a CPU burst of 6 seconds. The second type, Controllers (C), requires a CPU burst of 8 seconds. A new process of type A arrives at time
and
(in seconds). Similarly, a new process of type C arrives at time
and
(in seconds). The CPU scheduling policy is First Come First Serve (FCFS). The first process of type A starts running at
seconds. The average waiting time (in seconds) for the 10 processes is __________. (rounded off to one decimal place)Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 14
Open questionCSMCQ1 markNeeds review
Consider a demand paging memory management system with 32-bit logical address, 20-bit physical address, and page size of 2048 bytes. Assuming that the memory is byte addressable, what is the maximum number of entries in the page table?
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 26
Open questionCSMCQ1 markNeeds review
Processes
arrive in that order at times 0, 1, 2, and 8 milliseconds respectively, and have execution times of 10, 13, 6, and 9 milliseconds respectively. Shortest Remaining Time First (SRTF) algorithm is used as the CPU scheduling policy. Ignore context switching times.Which ONE of the following correctly gives the average turnaround time of the four processes in milliseconds?
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer