- Consider three concurrent processes P1, P2 and P3 as shown below, which access a shared variable D that has been initialized to 100. [GATE – 2019]

The process are executed on a uniprocessor system running a time-shared operating system. If the minimum and maximum possible values of D after the three processes have completed execution are X and Y respectively, then the value of Y–X is _______.
a. 10
b. 40
c. 80
d. 60
Answer : c)
- The following C program is executed on a Unix/Linux system: [GATE – 2019]
#include <unistd.h>
int main ()
{
int i ;
for (i=0; i<10; i++)
if (i%2 == 0) fork ( ) ;
return 0 ;
}
The total number of child processes created is _____.
a. 26
b. 31
c. 33
d. 28
Answer : b)
- Assume that in a certain computer, the virtual addresses are 64 bits long and the physical addresses are 48 bits long. The memory is word addressable. The page size is 8 kB and the word size is 4 bytes. The Translation Look-aside Buffer (TLB) in the address translation path has 128 valid entries. At most how many distinct virtual addresses can be translated without any TLB miss? [GATE – 2019]
a. 8×220
b. 4×220
c. 16×210
d. 256×210
Answer : d)
- Consider the following four processes with arrival times (in milliseconds) and their length of CPU bursts (in milliseconds) as shown below: [GATE – 2019]
Process | P1 | P2 | P3 | P4 |
Arrival time | 0 | 1 | 3 | 4 |
CPU burst time | 3 | 1 | 3 | Z |
These processes are run on a single processor using preemptive Shortest Remaining Time First scheduling algorithm. If the average waiting time of the processes is 1 millisecond, then the value of Z is _____.
a. 1
b. 2
c. 4
d. 7
Answer : a)
Operating System | Gate-2019|
- The index node (inode) of a Unix-like file system has 12 direct, one single-indirect and one double-indirect pointers. The disk block size is 4 kB, and the disk block address is 32-bits long. The maximum possible file size is (rounded off to 1 decimal place) ______ GB. [GATE – 2019]
a. 7.0
b. 9.0
c. 2.0
d. 4.0
Answer : d)
Operating System | Gate-2019|
- Consider the following snapshot of a system running n concurrent processes. Process i is holding Xi instances of a resource R, 1 ≤ i ≤ n. Assume that all instances of R are currently in use. Further, for all i, process i can place a request for at most Yi additional instances of R while holding the Xi instances it already has. Of the n processes, there are exactly two processes p and q such that Yp = Yq = 0. Which one of the following conditions guarantees that no other process apart from p and q can complete execution? [GATE – 2019]
a. Min (Xp, Xq) ≥ Min {Yk | 1 ≤ k ≤ n, k ≠ p, k ≠ q}
b. Xp + Xq < Max {Yk | 1 ≤ k ≤ n, k ≠ p, k ≠ q}
c. Min (Xp, Xq) ≤ Max {Yk | 1 ≤ k ≤ n, k ≠ p, k ≠ q}
d. Xp + Xq < Min {Yk | 1 ≤ k ≤ n, k ≠ p, k ≠ q}
Answer : d)