Operating Systems questions

Q29

GATE CS 2026 CS-1DeadlocksMSQ1 mark
With respect to deadlocks in an operating system, which of the following statements is/are FALSE?
More than one option can be correct.
Show answer without attempting

Answer: A, C

Q35

GATE CS 2026 CS-1DeadlocksNAT1 mark
Consider a system consisting of kk instances of a resource RR, being shared by 5 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 minimum value of kk for the system to be deadlock-free is ________. (answer in integer)
Show answer without attempting

Answer: 6

Q54

GATE CS 2026 CS-1Memory ManagementMSQ2 marks
Consider a system that has a cache memory unit and a memory management unit (MMU). The address input to the cache memory is a physical address. The MMU has a translation lookaside buffer (TLB). Assume that when a page is evicted from the main memory, the corresponding blocks in the cache are marked as invalid.

For a given memory reference, which of the following sequences of events can NEVER happen?
More than one option can be correct.
Show answer without attempting

Answer: B, C

Q59

GATE CS 2026 CS-1File SystemsNAT2 marks
Consider a hard disk with a rotational speed of 15000 rpm. The time to move the read/write head from a track to its adjacent track is 1 millisecond. Initially, the head is on track 0. The number of sectors per track is 400. The sector size is 1024 bytes. It is necessary to transfer data from 10 randomly located sectors in each of the following tracks in the order: 5, 12 and 7.

The total time for the data transfer (in milliseconds) from the hard disk is _________. (rounded off to one decimal place)
Show answer without attempting

Answer: 77.3

Q63

GATE CS 2026 CS-1Processes and ThreadsNAT2 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 executed is ________. (answer in integer)
Show answer without attempting

Answer: 4

Q64

GATE CS 2026 CS-1SchedulingNAT2 marks
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 t=10,20,30,40,and 50t = 10, 20, 30, 40, \text{and } 50 (in seconds). Similarly, a new process of type C arrives at time t=11,22,33,44,and 55t = 11, 22, 33, 44, \text{and } 55 (in seconds). The CPU scheduling policy is First Come First Serve (FCFS). The first process of type A starts running at t=10t = 10 seconds. The average waiting time (in seconds) for the 10 processes is ___________. (rounded off to one decimal place)
Show answer without attempting

Answer: 9.5

Q23

GATE CS 2026 CS-2SchedulingMCQ1 mark−1/3 if wrong
Which one of the following CPU scheduling algorithms cannot be preemptive?
Show answer without attempting

Answer: B

Q51

GATE CS 2026 CS-2Concurrency and SynchronizationMSQ2 marks
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?
More than one option can be correct.
Show answer without attempting

Answer: A, B, C

Q53

GATE CS 2026 CS-2File SystemsNAT2 marks
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=2101\text{K}=2^{10} and 1G=2301\text{G}=2^{30}
Show answer without attempting

Answer: 16417

Q54

GATE CS 2026 CS-2Memory ManagementNAT2 marks
A system has a Translation Lookaside Buffer (TLB) that has a reach of 1 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 4 KB. The virtual address space is 64 GB and physical address space is 1 GB. If each TLB entry stores a 4-bit process id, page number, frame number, and a 2-bit control field, then the size of the TLB (in bytes) is ___________. (answer in integer)

Note: 1K=210,1M=220,1G=2301\text{K}=2^{10}, 1\text{M}=2^{20}, 1\text{G}=2^{30}
Show answer without attempting

Answer: 1536

Q55

GATE CS 2026 CS-2Memory ManagementNAT2 marks
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=2101\text{K}=2^{10}
Show answer without attempting

Answer: 3

0/110 correct0 marks

Related topics in GATE CS