Operating System Gate Questions

Here, We will see Operating System GATE Questions from previous year’s papers and the syllabus of Operating System for GATE Exam.

1. Operating System in Gate CSE Exam

Operating System (OS) is a pivotal subject in the GATE Computer Science (CSE) exam. GATE questions in this domain test conceptual clarity and problem-solving skills across core OS functionalities, including process management, memory allocation, synchronization, and file systems. For instance, recurring topics involve CPU scheduling algorithms (e.g., Round Robin, Shortest Job First), deadlock handling (Banker’s Algorithm), semaphore operations, and paging mechanisms in virtual memory. Recent trends also emphasize multithreading, resource allocation graphs, and page replacement strategies like LRU and FIFO.

2. Operating System Syllabus

The syllabus for Operating System in GATE CSE includes:

  1. Process Management: Processes, threads, inter-process communication, CPU scheduling, and concurrency control (semaphores, monitors).
  2. Memory Management: Paging, segmentation, virtual memory, and address translation.
  3. Deadlocks: Detection, prevention, avoidance (Banker’s Algorithm), and recovery.
  4. File Systems: Disk scheduling (SCAN, C-SCAN), file organization, and I/O management.
  5. Advanced Topics: Real-time OS basics, system calls, and synchronization mechanisms.

Q. The process of loading the operating system into memory is called :

  1. Booting
  2. Spooling
  3. Thrashing
  4. Formatting
Answer

Booting
NIELIT 2017 DEC Scientific Assistant A

Q. The process executes the following code and after execution _________ number of child process get created

fork();
fork();
fork();
fork();
  1. 4
  2. 1
  3. 15
  4. 16
Answer

15
NIELIT 2018

Q. The Banker’s algorithm is used:

  1. to rectify deadlock.
  2. to prevent deadlock.
  3. to detect deadlock.
  4. to detect and solve deadlock.
Answer

to prevent deadlock.
NIELIT 2016 DEC Scientist B (IT)

Q. The principle of locality of reference justifies the use of

  1. Non reusable
  2. Cache memory
  3. Virtual memory
  4. None of the above
Answer

Cache memory
NIELIT 2016 DEC Scientist B (CS)

Q. In a particular system it is observed that, the cache performance gets improved as a result of increasing the block size of the cache. The primary reason behind this is :

  1. Programs exhibits temporal locality
  2. Programs have small working set
  3. Read operation is frequently required rather than write operation
  4. Programs exhibits spatial locality
Answer

Programs exhibits spatial locality
NIELIT 2017 DEC Scientific Assistant A

Q. The time taken to switch between user and kernel modes of execution be t1 while the time taken to switch between two processes be t2. Which of the following is TRUE?

  1. t1>t2
  2. t1=t2
  3. t1<t2
  4. nothing can be said about the relation between t1 and t2
Answer

t1<t2
NIELIT 2017 DEC Scientist B

Q. SPAM usually __________ .

  1. Contains no valuable content.
  2. Contains valuable content.
  3. Contains content about website and is an operating system.
  4. Is a module of operating system that handles scheduling of a process.
Answer

Contains no valuable content.
NIELIT 2021 Dec Scientist B

Q. The address sequence generated by tracing a particular program executing in a pure demand paging system with 100 records per page, with 1 free main memory frame is recorded as follows. What is the number of Page Faults?
0100,0200,0430,0510,0530,0560,0120,0220,0240,0260,0320,0370

  1. 15,4
  2. 6,4
  3. 7,2
  4. 4,6
Answer

7,2
NIELIT 2017 OCT Scientific Assistant A (CS)

Q. What is the elapsed time of P if records of F are organized using a blocking factor of 2(i.e. each block on D contains two records of F) and P uses one buffer?

  1. 12 sec.
  2. 14 sec.
  3. 17 sec.
  4. 21 sec.
Answer

12 sec.
NIELIT 2016 MAR Scientist B

Q. When we move from the outermost track to the innermost track in a magnetic disk, then density(bits per linear inch)

  1. increases.
  2. decreases.
  3. remains the same.
  4. either remains constant or decreases.
Answer

increases.
NIELIT 2016 MAR Scientist B

Q. A protected variable which can be accessed and changed by particular set of operation is called

  1. interrupt
  2. monitor
  3. semaphore
  4. IPC
Answer

semaphore
NIELIT 2021 Dec Scientist B

Q. The operating system stores an ________ in order to decide to which user to grant which access rights to which file?

  1. File allocation table
  2. Process control block
  3. Access control matrix
  4. File control matrix
Answer

Access control matrix
NIELIT 2021 Dec Scientist B

Q. The seek time of a disk is 30 ms. It rotates at the rate of 30 rotations/second. The capacity of each track is 300 words. The access time is (approximately

  1. 62 ms
  2. 60 ms
  3. 50 ms
  4. 47 ms
Answer

47 ms
NIELIT 2016 MAR Scientist C

Q. More than one word is put in one cache block to:

  1. exploit the temporal locality of reference in a program
  2. exploit the spatial locality of reference in a program
  3. reduce the miss penalty
  4. none of the option
Answer

exploit the spatial locality of reference in a program
NIELIT 2021 Dec Scientist A

Q. Which access method is used for obtaining a record from cassette tape?

  1. Direct
  2. Sequential
  3. Random
  4. Parallel
Answer

Sequential
NIELIT 2017 July Scientist B (CS)

Q. In the disk, swap space is used to___________.

  1. save XML files
  2. save process data
  3. save drivers
  4. save HTML files
Answer

save process data
NIELIT 2018

Q. A disk has 200 tracks (numbered 0 through 199). At a given time, it was servicing the request of reading data from track 120, and at the previous request, service was for track 90. The pending requests (in order of their arrival) are for track numbers.
30 70 115 130 110 80 20 25
How many times will the head change its direction for the disk scheduling policies SSTF(Shortest Seek Time First) and FCFS (First Come First Serve)?

  1. 2 and 3
  2. 3 and 3
  3. 3 and 4
  4. 4 and 4
Answer

3 and 4
NIELIT 2017 July Scientist B (CS)

Q. What is the appropriate pairing of items in the two columns listing various activities encountered in a software life cycle?

P. Requirements Capture1. Module Development and Integration
Q. Design2. Domain Analysis
R. Implementation3. Structural and Behavioral Marketing
S. Maintenance4. Performance Tunit
  1. (P)-(3), (Q)-(2) , (R)-(4) , (S)-(1)
  2. (P)-(2), (Q)-(3) , (R)-(1) , (S)-(4)
  3. (P)-(3), (Q)-(2) , (R)-(1) , (S)-(4)
  4. (P)-(2), (Q)-(3) , (R)-(4) , (S)-(1)
Answer

(P)-(2), (Q)-(3) , (R)-(1) , (S)-(4)
NIELIT 2022 April Scientist B

Q. Disk request come to a disk driver for cylinders in the order 10,22,20,2,40,6 and 38, at a time when the disk drive is reading from cylinder 20. The seek time is 6ms per cylinder. The total seek time, if the disk arm scheduling algorithm is first-come-first-served is

  1. 900 ms
  2. 850 ms
  3. 360 ms
  4. 876 ms
Answer

876 ms
NIELIT 2017 OCT Scientific Assistant A (CS)

Q. The file structure that redefines its first record at a base of zero uses the term

  1. relative organization.
  2. key fielding.
  3. dynamic reallocation.
  4. all of these.
Answer

relative organization.
NIELIT 2016 MAR Scientist B

Q. The open file table has a/an ________ associated with each file.

  1. file content
  2. file permission
  3. open count
  4. close count
Answer

open count
NIELIT 2017 DEC Scientific Assistant A

Q. The file manager is responsible for

  1. naming files
  2. saving files
  3. deleting files
  4. all of these
Answer

all of these
NIELIT 2016 MAR Scientist C

Q. Choose the correct sequence of items mentioned in List-1 out of items mentioned in List-2 :

List-1List-2
(a) Threads(i) operating system
(b) Non pre-emptive(ii) first come first serve
(c) Pre-emptive(iii) round robin algorithm
(d) Scheduling(iv) Context switch
(e)Process switch(v) light weight process with in reduced time
  1. (a)-(v),(b)-(iii),(c)-(iv),(d)-(ii),(e)-(i)
  2. (a)-(ii),(b)-(iii),(c)-(v),(d)-(iv),(e)-(i)
  3. (a)-(v),(b)-(ii),(c)-(iii),(d)-(i),(e)-(iv)
  4. (a)-(ii),(b)-(iv),(c)-(v),(d)-(i),(e)-(ii)
Answer

(a)-(v),(b)-(ii),(c)-(iii),(d)-(i),(e)-(iv)
NIELIT 2021 Dec Scientist B

Q. If file size is large and if it is to be accessed randomly then which of the following allocation strategy should be best to use in a system?

  1. Linked allocation
  2. Indexed allocation
  3. Contiguous allocation
  4. None of the options
Answer

Indexed allocation
NIELIT 2017 DEC Scientific Assistant A

Q. What is Compaction?

  1. a technique for overcoming internal fragmentation
  2. a paging technique
  3. a technique for overcoming external fragmentation
  4. a technique for overcoming fatal error
Answer

a technique for overcoming external fragmentation
NIELIT 2017 DEC Scientific Assistant A

Q. Determine the number of page faults when references to pages occur in the following order: 1,2,4,5,2,1,2,4. Assume that the main memory can accommodate 3 pages and the main memory already has the pages 1 and 2, with page 1 having been brought earlier than page 2.(LRU algorithm is used).

  1. 3
  2. 5
  3. 4
  4. None of these
Answer

4
NIELIT 2016 MAR Scientist B

Q. Copying a process from memory to disk to allow space for other processes is called:

  1. Swapping
  2. Demand Paging
  3. Deadlock
  4. Page Fault
Answer

Swapping
NIELIT 2016 DEC Scientist B (IT)

Q. If there are 32 segments, each of size 1K byte, then the logical address should have

  1. 13 bits
  2. 14 bits
  3. 15 bits
  4. 16 bits
Answer

15 bits
NIELIT 2016 MAR Scientist C

Q. If a processor has 32-bit virtual address, 28-bit physical address, 2 kb pages. How many bits are required for the virtual, physical page number?

  1. 17,21
  2. 21,17
  3. 6,10
  4. None
Answer

21,17
NIELIT 2017 OCT Scientific Assistant A (CS)

Q. Find the effective access time for the memory for the given data.
Page fault service time = 8ms
Average memory access time = 20ns
One page fault is generated for every memory access = 106

  1. 29 ns
  2. 33 ns
  3. 28 ns
  4. 30 ns
Answer

28 ns
NIELIT 2018

Q. Efficiency in a software product does not include:

  1. responsiveness
  2. processing time
  3. memory utilization
  4. licensing
Answer

licensing
NIELIT 2021 Dec Scientist B

Q. A computer has a single cache (off-chip) with a 3ns hit time and a 95% hit rate. Main memory has a 50ns access time. If we add an on-chip cache with a 0.6ns hit time and a 98% hit rate, the computer’s effective access time:

  1. 2.8 ns
  2. 5.5 ns
  3. 0.7 ns
  4. None of the options
Answer

0.7 ns
NIELIT Scientific Assistant A 2020 November

Q. A long-term monitor

  1. should show any immediate performance problems
  2. should show I/O, paging and processor activity
  3. need show only the I/O and processor activity
  4. usually reports only on terminal displays
Answer

should show I/O, paging and processor activity
NIELIT 2016 MAR Scientist B

Q. Page fault frequency in an operating system is reduced when the

  1. Process tend to be I/O bound
  2. Locality of reference is applicable to the process
  3. Size of pages is reduced
  4. Processes tend to be CPU bound
Answer

Locality of reference is applicable to the process
NIELIT 2017 DEC Scientific Assistant A

Q. The total number of page faults for the reference string 1,2,3,4,5,6,7,8,9,10 using FIFO page replacement policy for a process, if 3 frames are allocated to it are

  1. 9
  2. 10
  3. 8
  4. 11
Answer

10
NIELIT 2017 DEC Scientist B

Q. In an operating system, processes that are terminated but, for some reason must have its task structure in the process table are referred as _________.

  1. Zombies
  2. Orphans
  3. Parent Process
  4. Child Process
Answer

Zombies
NIELIT Scientist B 2020 November

Q. On computers where there are multiple operating system, the decision to load a particular one is done by ____________ .

  1. PCB
  2. Inode
  3. File Control Block
  4. Boot Loader
Answer

Boot Loader
NIELIT Scientist B 2020 November

Q. In which one of the following pages replacement policies, Belady’s anomaly may occur?

  1. FIFO
  2. LRU
  3. Optimal
  4. MRU
Answer

FIFO
NIELIT 2016 DEC Scientist B (CS)

Q. Working set (t,k) at an instant of time, t ,is

  1. The set of k future references that the operating system will make
  2. The set of future references that the operating system will make in the next ‘k’ time units
  3. The set of k references with high frequency
  4. The set of pages that have been referenced in the last k time units
Answer

The set of pages that have been referenced in the last k time units
NIELIT 2016 MAR Scientist B

Q. Which of the following is added to the page table in order to track whether a page of cache has been modified since it was read from the memory?

  1. Reference bit
  2. Dirty bit
  3. Tag bit
  4. Valid bit
Answer

Dirty bit
NIELIT 2017 DEC Scientist B

Q. Which two are valid constructions for Thread?
1. Thread(Runnable r, String name)
2. Thread()
3. Thread(int priority)
4. Thread(Runnable r, ThreadGroup g)
5. Thread(Runnable r, int priority)

  1. 1 and 3
  2. 2 and 4
  3. 1 and 2
  4. 2 and 5
Answer

1 and 2
NIELIT 2017 OCT Scientific Assistant A (IT)

Q. The degree of multi programming is controlled by:

  1. CPU Scheduler
  2. Long-term Scheduler
  3. Context Switching
  4. Medium term Scheduler
Answer

Long-term Scheduler
NIELIT 2016 DEC Scientist B (IT)

Q. In ___________, other nodes verify the validity of the block by checking that the hash of the data of the block is less than a present number.

  1. Proof of Burn
  2. Proof of STAKE
  3. Proof of Work
  4. All of the options
Answer

Proof of Work
NIELIT Scientist B 2020 November

Q. In real-time operating systems, which of the following is the most suitable scheduling scheme?

  1. round-robin
  2. first-come-first-served
  3. preemptive
  4. random scheduling
Answer

preemptive
NIELIT 2016 MAR Scientist C

Q. Process is in a ready state _______ .

  1. when process is scheduled to run after some execution
  2. when process is unable to run until some task has been completed
  3. when process is using the CPU
  4. none of the options
Answer

when process is scheduled to run after some execution
NIELIT 2017 DEC Scientific Assistant A

Q. Starvation can be avoided by which of the following statements:
i. By using shortest job first resource allocation policy .
ii. By using first come first serve resources allocation policy.

  1. (i) only
  2. (i) and (ii) only
  3. (ii) only
  4. None of the options
Answer

(ii) only
NIELIT 2017 DEC Scientific Assistant A

Q. Consider the following four processes with their corresponding arrival time and burst time:

ProcessArrival timeBurst time(in ms)
P10.08
P20.66
P33.84
P44.42

What is the average turn around time (in ms) for these processes using FCFS scheduling algorithm?

  1. 15
  2. 12.8
  3. 13
  4. None of the options
Answer

12.8
NIELIT 2017 DEC Scientist B

Q. Consider three processes (process id 0,1,2 respectively) with compute time bursts 2,4 and 8 time units. All processes arrive at time zero. Consider the Longest Remaining Time First (LRTF) scheduling algorithm. In LRTF ties are broken by giving priority to the process with the lowest process i1. The average turn around time is

  1. 13 units
  2. 14 units
  3. 15 units
  4. 16 units
Answer

13 units
NIELIT 2017 July Scientist B (IT)

Q. Consider three processes, all arriving at time zero, with total execution time of 10,20 and 30 units, respectively. Each process spends the first 20% of execution time doing I/O, the next 70% of time doing
computation, and the last 10% of time doing I/O again. The operating system uses a shortest remaining compute time first scheduling algorithm and schedules a new process either when the running process gets blocked on I/O or when the running process finishes its compute burst. Assume that all I/O operations can be overlapped as much as possible. For what percentage of time does the CPU remain idle?

  1. 0%
  2. 10.6%
  3. 30.0%
  4. 89.4%
Answer

10.6%
NIELIT 2017 July Scientist B (IT)

Q. Consider three CPU-intensive processes, which require 10,20 and 30 time units and arrive at times 0,2 and 6, respectively. How many context switches are needed if the operating system implements a shortest remaining time first scheduling algorithm? Do not count the context switches at time zero and at the end.

  1. 1
  2. 2
  3. 3
  4. 4
Answer

2
NIELIT 2017 July Scientist B (IT)

Q. Which of the following process scheduling algorithm may lead to starvation?

  1. FIFO
  2. Round Robin
  3. Shortest Job Next
  4. None of the option
Answer

Shortest Job Next
NIELIT 2017 July Scientist B (IT)

Q. A scheduling algorithm assigns priority proportional to the waiting time of a process. Every process starts with priority zero (the lowest priority). The scheduler re-evaluates the process priorities every T time units and decides the next process to schedule. Which one of the following is TRUE if the processes have no I/O operations and all arrive at time zero?

  1. This algorithm is equivalent to the first come first serve algorithm.
  2. This algorithm is equivalent to the round-robin algorithm.
  3. This algorithm is equivalent to the shortest-job-first algorithm.
  4. This algorithm is equivalent to the shortest-remaining time-first algorithm.
Answer

This algorithm is equivalent to the round-robin algorithm.
NIELIT 2017 July Scientist B (IT)

Q. Which of the following scheduling algorithms could result in starvation?

  1. Priority
  2. Round Robin
  3. FCFS
  4. None of the above
Answer

Priority
NIELIT 2017 OCT Scientific Assistant A (IT)

Q. Identify the true statement from the given statements.
1. FIFO is non-preemptive
2. Round robin is non-preemptive
3. Multilevel Queue Scheduling is non-preemptive

  1. 1
  2. 1 and 2
  3. 1,2 and 3
  4. 2
Answer

1
NIELIT 2018

Q. A process that is based on IPC mechanism which executes on different systems and can communicate with other processes using message based communication is called ________.

  1. Local Procedure Call
  2. Remote Procedure Call
  3. Inter Process Communication
  4. Remote Machine Invocation
Answer

Remote Procedure Call
NIELIT 2016 DEC Scientist B (CS)

Q. Which of the following statements about semaphores is true?

  1. P and V operations should be indivisible operations.
  2. A semaphore implementation should guarantee that threads do not suffer indefinite postponement.
  3. If several threads attempt a P(S) operation simultaneously, only one thread should be allowed to procee1.
  4. All of the above.
Answer

All of the above.
NIELIT 2016 DEC Scientist B (IT)

Q. Consider a system with m resources of same type being shared by n processes. Resources can be requested and released by processes only one at a time. The system is deadlock free if and only if

  1. The sum of all max needs is < m+n
  2. The sum of all max needs is > m+n
  3. Both of above
  4. None
Answer

The sum of all max needs is < m+n
NIELIT 2016 DEC Scientist B (CS)

Q. A system has 3 processes sharing 4 resources. If each process needs a maximum of 2 units then, deadlock

  1. Can never occur
  2. Has to occur
  3. May occur
  4. None of the options
Answer

Can never occur
NIELIT 2017 DEC Scientist B

Q. Consider the following snapshot of a system running n processes. Process i is holding Xi instances of a resource R, 1≤i≤n. Currently, all instances of R are occupied. Further, for all i, process i has placed a
request for an additional Yi instances while holding the Xi instances it already has. There are exactly two processes p and q and such that Yp=Yq=0. Which one of the following can serve as a necessary condition to guarantee that the system is not approaching a deadlock?

  1. min(Xp,Xq) < max(Yi) where i!=p and i!=q
  2. Xp+Xq ≥ min(Yi) where i!=p and i!=q
  3. max(Xp,Xq) > 1
  4. min(Xp,Xq) > 1
Answer

Xp+Xq ≥ min(Yi) where i!=p and i!=q
NIELIT 2017 July Scientist B (CS)

Q. A system has n resources R0,…,Rn-1, and k processes P0,…,Pk-1. The implementation of the resource request logic of each process Piis as follows:

if(i%2==0){
if(i<n) request Ri;
if(i+2<n) request Ri+2;
}
else{
if(i<n) request Rn−i;
if(i+2<n) request Rn−i−2;
}

In which of the following situations is a deadlock possible?

  1. n=40, k=26
  2. n=21, k=12
  3. n=20, k=10
  4. n=41, k=19
Answer

n=21, k=12
NIELIT 2017 July Scientist B (CS)

Q. A system contains three programs and each requires three tape units for its operation. The minimum number of tape units which the system must have such that deadlocks never arise is ______.

  1. 6
  2. 7
  3. 8
  4. 9
Answer

6
NIELIT 2017 July Scientist B (CS)

Q. Consider a system having ‘m’ resources of the same type. These resources are shared by 3 processes A,B,C; which have peak time demands of 3,4,6 respectively. The minimum value of ‘m’ that ensures that deadlock will never occur is

  1. 11
  2. 12
  3. 13
  4. 14
Answer

11
NIELIT 2017 OCT Scientific Assistant A (IT)

Q. Non-contiguous memory allocation splits program into blocks of memory called ________ that can be loaded in non-adjacent holes in main memory.

  1. Pages
  2. Frames
  3. Partition
  4. Segments
Answer

Segments
NIELIT 2017 DEC Scientific Assistant A

Q. In a system, counting semaphore was initialized to 10, then 6P(wait) operations and 4V(signal) operations were completed on this semaphore. So ________ is the final value of the semaphore.

  1. 7
  2. 8
  3. 13
  4. 12
Answer

8
NIELIT 2018

Q. How many times the word “PROCESS” will be printed when executing the following program?

main(){
printf("PROCESS");
fflush();
fork();
fork();
}
  1. 8
  2. 4
  3. 6
  4. 7
Answer

4
NIELIT 2017 DEC Scientific Assistant A

Q. Operating System maintains the page table for :

  1. each process
  2. each thread
  3. each instruction
  4. each address
Answer

each process
NIELIT 2017 DEC Scientific Assistant A

Q. A CPU generates 32-bit virtual addresses. The page size is 4KB. The processor has a Translation Lookaside Buffer (TLB) which can hold a total of 128 page table entries and is 4-way set associative. The minimum size of the TLB tag is

  1. 11 bits
  2. 13 bits
  3. 15 bits
  4. 20 bits
Answer

15 bits
NIELIT 2017 July Scientist B (CS)

Q. A computer uses 46-bit virtual address, 32-bit physical address, and a three–level paged page table organization. The page table base register stores the base address of the first-level table (T1), which occupies exactly one page. Each entry of T1 stores the base address of a page of the second-level table (T2). Each entry of T2 stores the base address of a page of the third-level table (T3). Each entry of T3 stores a Page Table Entry (PTE). The PTE is 32 bits in size. The processor used in the computer has a 1MB 16 way set associative virtually indexed physically tagged cache. The cache block size is 64 bytes.
What is the size of a page in KB in this computer?

  1. 2
  2. 4
  3. 8
  4. 16
Answer

8
NIELIT 2017 July Scientist B (CS)

Q. Decreasing the RAM causes

  1. fewer page faults
  2. more page faults
  3. virtual memory gets increased
  4. virtual memory gets decreased
Answer

more page faults
NIELIT 2018

Scroll to Top