Skip to content

GATE CS Operating System questions

Practise Operating System questions for GATE CS. Explore official PYQs and original subject-wise quizzes, check answers and view available solutions. Free, no sign-in.

Trace the state changes explicitly. For scheduling, memory and synchronisation questions, record the given policy before calculating the result.

Subject, topic, year and type filter the full library. Match any choice within a filter, and all selected filter categories. Search, source and sort apply to this page.

20 on this page
Official PYQ2026Operating SystemDeadlockMSQ · 1 mark
With respect to deadlocks in an operating system, which of the following statements is/are FALSE?
Official PYQ2026Operating SystemDeadlockNAT · 1 mark
Consider a system consisting of kk instances of a resource RR, being shared by 55 processes. Assume that each process requires a maximum of two instances of resource RR 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 …
Official PYQ2026Operating SystemSystem CallsNAT · 2 marks
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 …
Official PYQ2026Operating SystemCPU SchedulingNAT · 2 marks
Consider a CPU that has to execute two types of processes. The first type, Actuators (A), requires a CPU burst of 66 seconds. The second type, Controllers (C), requires a CPU burst of 88 seconds. A new process of type A arrives at time t=10t=10, 20,30,4020, 30, 40, and 5050 (in seconds). Similarly, a new process of type C arrives at time t=t= …
Official PYQ2026Operating SystemCPU SchedulingMCQ · 1 mark
Which one of the following CPU scheduling algorithms cannot be preemptive?
Official PYQ2026Operating SystemConcurrency and SynchronizationMSQ · 2 marks
Consider three processes P1, P2\text{P1, P2}, and P3\text{P3} running identical code, as shown in the pseudocode below. A\text{A} and B\text{B} are two binary semaphores initialized to 11 and 00, respectively. X\text{X} is a shared variable initialized to 00. Each line in the pseudocode is executed atomically. Pseudocode of P1, P2, and P3 …
Official PYQ2026Operating SystemMemory Management and Virtual MemoryNAT · 2 marks
A system has a Translation Lookaside Buffer (TLB) that has a reach of 11 MB. TLB reach is defined as the total amount of physical memory that can be accessed through the TLB entries. The paging system uses pages of size 44 KB. The virtual address space is 6464 GB and physical address space is 11 GB. If each TLB entry stores a 44-bit process id, …
Official PYQ2026Operating SystemMemory Management and Virtual MemoryNAT · 2 marks
Consider contiguous allocation of physical memory to processes using variable partitioning scheme. Suppose there are 88 holes in the memory of sizes 20KB,4 KB20 \mathrm{KB}, 4 \mathrm{~KB}, 25 KB,18 KB,7 KB,9 KB,15 KB25 \mathrm{~KB}, 18 \mathrm{~KB}, 7 \mathrm{~KB}, 9 \mathrm{~KB}, 15 \mathrm{~KB}, and 1212 KB. Assume that no two holes are adjacent. Two processes P1\text{P1} of …
Official PYQ2025Operating SystemMemory Management and Virtual MemoryMCQ · 1 mark
Consider a demand paging memory management system with 3232-bit logical address, 2020-bit physical address, and page size of 20482048 bytes. Assuming that the memory is byte addressable, what is the maximum number of entries in the page table?
Official PYQ2025Operating SystemCPU SchedulingNAT · 1 mark
Suppose in a multiprogramming environment, the following C program segment is executed. A process goes into I/O queue whenever an I/O related operation is performed. Assume that there will always be a context switch whenever a process requests for an I/O, and also whenever the process returns from an I/O. The number of times the process will enter the ready …
Official PYQ2025Operating SystemCPU SchedulingMCQ · 2 marks
A computer has two processors, M1M_{1} and M2M_{2}. Four processes P1,P2,P3,P4P_{1}, P_{2}, P_{3}, P_{4} with CPU bursts of 20,16,2520,16,25, and 1010 milliseconds, respectively, arrive at the same time and these are the only processes in the system. The scheduler uses non-preemptive priority scheduling, with priorities decided as follows: M1M_{1} uses priority …
Official PYQ2025Operating SystemFile SystemsNAT · 2 marks
A disk of size 512 M512 \text{ M} bytes is divided into blocks of 64 K64 \text{ K} bytes. A file is stored in the disk using linked allocation. In linked allocation, each data block reserves 44 bytes to store the pointer to the next data block. The link part of the last data block contains a NULL pointer (also of 44 bytes). Suppose a file of …
Official PYQ2025Operating SystemMemory Management and Virtual MemoryNAT · 2 marks
In optimal page replacement algorithm, information about all future page references is available to the operating system (OS). A modification of the optimal page replacement algorithm is as follows: The OS correctly predicts only up to next 44 page references (including the current page) at the time of allocating a frame to a page. A process accesses the …
Official PYQ2025Operating SystemMemory Management and Virtual MemoryNAT · 2 marks
A computer system supports a logical address space of 2322^{32} bytes. It uses two-level hierarchical paging with a page size of 40964096 bytes. A logical address is divided into a bb-bit index to the outer page table, an offset within the page of the inner page table, and an offset within the desired page. Each entry of the inner page table uses eight …
Official PYQ2025Operating SystemCPU SchedulingMCQ · 1 mark
​​​Processes P1,P2,P3,P4P 1, P 2, P 3, P 4 arrive in that order at times 0,1,20,1,2, and 8 milliseconds respectively, and have execution times of 10,13,610,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 …
Official PYQ2025Operating SystemMemory Management and Virtual MemoryMCQ · 2 marks
​Consider a demand paging system with three frames, and the following page reference string: 1 2 3 4 5 4 1 6 4 5 1 3 2 . The contents of the frames are as follows initially and after each reference (from left to right): …
Official PYQ2025Operating SystemDeadlockMSQ · 2 marks
P={P1,P2,P3,P4}P=\left\{P_{1}, P_{2}, P_{3}, P_{4}\right\} consists of all active processes in an operating system. R={R1,R2,R3,R4}R=\left\{R_{1}, R_{2}, R_{3}, R_{4}\right\} consists of single instances of distinct types of resources in the system. The resource allocation graph has the following assignment and claim edges. Assignment edges: …
Official PYQ2024Operating SystemProcesses and ThreadsMCQ · 1 mark
Which of the following statements about threads is/are TRUE?
Official PYQ2024Operating SystemCPU SchedulingMSQ · 1 mark
Which of the following process state transitions is/are NOT possible?
Official PYQ2024Operating SystemProcesses and ThreadsMCQ · 2 marks
​​​Consider the following two threads T1\mathrm{T} 1 and T2\mathrm{T} 2 that update two shared variables a\mathrm{a} and b\mathrm{b}. Assume that initially a=b=1\mathrm{a}=\mathrm{b}=1. Though context switching between threads can happen at any time, each statement of T1\mathrm{T} 1 or T2\mathrm{T} 2 is executed atomically without interruption. …