Log In

Web Page

Processes, Threads, Inter‐process communication, Concurrency and synchronization. Deadlock. CPU scheduling. Memory management and Virtual memory. File systems. Disks is also under this

$$\small{\overset{{\large{\textbf{Mark Distribution in Previous GATE}}}}{\begin{array}{|c|c|c|c|c|c|c|c|}\hline
\\\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

Previous GATE Questions in Operating System

13 votes
8 answers
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 ________________ .
asked Feb 7, 2019 in Operating System Arjun 6.3k views
12 votes
6 answers
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 ____
asked Feb 7, 2019 in Operating System Arjun 5.7k views
26 votes
4 answers
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}$
asked Feb 7, 2019 in Operating System Arjun 6.2k views
8 votes
7 answers
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\}$
asked Feb 7, 2019 in Operating System Arjun 4k views
13 votes
4 answers
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 _____
asked Feb 7, 2019 in Operating System Arjun 6.9k views
7 votes
3 answers
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
asked Feb 7, 2019 in Operating System Arjun 6.7k views
0 votes
1 answer
In this question:- 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.
asked Jan 6, 2019 in Operating System Shamim Ahmed 133 views
0 votes
1 answer
Original Question - 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?
asked Aug 7, 2018 in Operating System iarnav 238 views
0 votes
0 answers
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?
asked Jul 28, 2018 in Operating System iarnav 259 views
5 votes
3 answers
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?
asked Feb 28, 2018 in Operating System jothee 1.1k views
2 votes
2 answers
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.
asked Feb 28, 2018 in Operating System jothee 883 views
30 votes
2 answers
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 _____
asked Feb 14, 2018 in Operating System gatecse 6.3k views
15 votes
5 answers
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$
asked Feb 14, 2018 in Operating System gatecse 5.5k views
18 votes
3 answers
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 ___
asked Feb 14, 2018 in Operating System gatecse 5.8k views
15 votes
5 answers
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
asked Feb 14, 2018 in Operating System gatecse 3.8k views
13 votes
2 answers
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)$
asked Feb 14, 2018 in Operating System gatecse 4.1k views
2 votes
1 answer
2 votes
1 answer
In a database system, unique timestamps are assigned to each transaction using Lamport's logical clock. Let TS(T1)TS(T1) and TS(T2)TS(T2) be the timestamps of transactions T1T1 and T2T2 respectively. Besides, T1T1holds a lock on the resource R, and T2T2 has ... is actually not making a difference but it is discussed that if T1 starts again with new timestamp then there would be
asked Oct 25, 2017 in Operating System A_i_$_h 286 views
2 votes
0 answers
A multithreaded program P executes with x number of threads and uses y number of locks for ensuring mutual exclusion while operating on shared memory locations. All locks in the program are non-reentrant, i.e., if a thread holds a lock l, then it cannot re-acquire lock lGATE2017-1-27 without ... y = 2 (D) x = 1, y = 1 If non- re entrant was not part of question then it would be OPTION - C?
asked Oct 24, 2017 in Operating System A_i_$_h 239 views