Web Page

$$\small{\overset{{\large{\textbf{Mark Distribution in Previous GATE}}}}{\begin{array}{|c|c|c|c|c|c|c|c|}\hline \textbf{Year}&\textbf{2019}&\textbf{2018}&\textbf{2017-1}&\textbf{2017-2}&\textbf{2016-1}&\textbf{2016-2}&\textbf{Minimum}&\textbf{Average}&\textbf{Maximum} \\\hline\textbf{1 Mark Count}&2&3&2&2&1&1&1&2&3 \\\hline\textbf{2 Marks Count}&4&3&2&2&4&3&3&3&4 \\\hline\textbf{Total Marks}&10&9&6&6&9&7&\bf{6}&\bf{7.8}&\bf{10}\\\hline \end{array}}}$$

# Previous GATE Questions in Operating System

1
The following C program is executed on a Unix/Linux system : #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 ________________ .
2
Consider three concurrent processes $P1$, $P2$ and $P3$ as shown below, which access a shared variable $D$ that has been initialized to $100$ ... 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 ____
3
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 addressible. 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 ... without any TLB miss? $16 \times 2^{10}$ $256 \times 2^{10}$ $4 \times 2^{20}$ $8 \times 2^{20}$
4
Consider the following snapshot of a system running $n$ concurrent processes. Process $i$ is holding $X_i$ instances of a resource $R$, $1 \leq i \leq n$. Assume that all instances of $R$ are currently in use. Further, for all $i$, process $i$ can place a request for at most $Y_i$ additional instances ... $\text{Min}(X_p,X_q) \leq \text{Max} \{Y_k \mid 1 \leq k \leq n, k \neq p, k \neq q\}$
5
Consider the following four processes with arrival times (in milliseconds) and their length of CPU bursts (in milliseconds) as shown below: ... Shortest Remaining Time First scheduling algorithm. If the average waiting time of the processes is $1$ millisecond, then the value of $Z$ is _____
6
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
7
In this question:- https://gateoverflow.in/8561/gate2015-3-52 In options II III and IV i am not understanding how its violating the rule of circular wait. Rather i feel its creating a circular wait condition. Please Explain…. Any Example would be appreciated.
8
Original Question - https://gateoverflow.in/8405/gate2015-3-10 Answer is A) Yes, there's no ME (That's fine) Also there's no Deadlock, but for no deadlock, can we give reason as - There's no deadlock, because there's no circular wait as both processes X and ... shared variables. X on varP and Y on VarQ. So, there's no dependency there. And hence No deadlock? Is this reasoning for deadlock valid?
9
Original question - Click here My question is how deadlock is possible in that question. I've read the discussion and folks are saying that this below line is not an atomic execution, fair enough!! And more than one process can have same t[i] value and can stuck at while loop mentioned ... if you don't preempt P1 then P1 will have t[1] = 1. So, how two processes has same t[i] value at any time?
10
The functionality of atomic TEST-AND-SET assembly language instruction is given by the following C function int TEST-AND-SET (int *x) { int y; A1: y=*x; A2: *x=1; A3: return y; } Complete the following C functions for implementing code for entering and ... and starvation-free? For the above solution, show by an example that mutual exclusion is not ensured if TEST-AND-SET instruction is not atomic?
11
Consider the following solution to the producer-consumer problem using a buffer of size 1. Assume that the initial value of count is 0. Also assume that the testing of count and assignment to count are atomic operations. Producer: Repeat Produce an item; if count = ... Producer); Consume item; Forever; Show that in this solution it is possible that both the processes are sleeping at the same time.
12
Consider a storage disk with $4$ platters (numbered as $0, 1, 2$ and $3$), $200$ cylinders (numbered as $0, 1, , 199$), and $256$ sectors per track (numbered as $0, 1, 255$). The following $6$ disk requests of the ... platters is negligible. The total power consumption in milliwatts to satisfy all of the above disk requests using the Shortest Seek Time First disk scheduling algorithm is _____
13
In a system, there are three types of resources: $E, F$ and $G$. Four processes $P_0$, $P_1$, $P_2$ and $P_3$ ... of $F$ were available The system is not in $safe$ state, but would be $safe$ if one more instance of $G$ were available
14
Consider the following solution to the producer-consumer synchronization problem. The shared buffer size is $N$. Three semaphores $empty$, $full$ and $mutex$ are defined with respective initial values of $0, N$ and $1$. Semaphore $empty$ denotes the number of available slots in the buffer, for the consumer to read ... $P: empty, \ \ \ Q:full, \ \ \ R:full, \ \ \ S:empty$
15
Consider a system with $3$ processes that share $4$ instances of the same resource type. Each process can request a maximum of $K$ instances. Resources can be requested and releases only one at a time. The largest value of $K$ that will always avoid deadlock is ___
16
The following are some events that occur after a device controller issues an interrupt while process $L$ is under execution. P. The processor pushes the process status of $L$ onto the control stack Q. The processor finishes the execution of the current instruction ... value based on the interrupt Which of the following is the correct order in which the events above occur? QPTRS PTRSQ TRPQS QTPRS
Consider a process executing on an operating system that uses demand paging. The average time for a memory access in the system is $M$ units if the corresponding memory page is available in memory, and $D$ units if the memory access causes a page fault. It has been experimentally measured that the average time taken for a memory ... . $(D-M) / X-M)$ $(X-M) / D-M)$ $(D-X) / D-M)$ $(X-M) / D-X)$