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}}}$$

Recent questions in Operating System

1
In an electronic funds transfer system, there are hundreds of identical processes that work as follows. Each process reads an input line specifying an amount of money, the account to be credited, and the account to be debited. Then it locks both accounts and transfers ... . (In other words, solutions that lock one account and then release it immediately if the other is locked are not allowed.)
2
A distributed system using mailboxes has two $IPC$ primitives, send and receive. The latter primitive specifies a process to receive from and blocks if no message from that process is available, even though messages may be waiting from other processes. There are no shared resources, but processes need to communicate frequently about other matters. Is deadlock possible? Discuss.
3
Two processes, $A$ and $B,$ each need three records, $1, 2,$ and $3,$ in a database. If $A$ asks for them in the order $1, 2, 3,$ and $B$ asks for them in the same order, deadlock is not possible. However, if $B$ asks for them ... resources, there are $3!$ or six possible combinations in which each process can request them. What fraction of all the combinations is guaranteed to be deadlock free?
4
One way to eliminate circular wait is to have rule saying that a process is entitled only to a single resource at any moment. Give an example to show that this restriction is unacceptable in many cases.
5
A system has four processes and five allocatable resources. The current allocation and maximum needs are as follows: What is the smallest value of x for which this is a safe state?
6
The banker’s algorithm is being run in a system with $m$ resource classes and $n$ processes. In the limit of large $m$ and $n,$ the number of operations that must be performed to check a state for safety is proportional to $m^{a} n^{b}.$ What are the values of $a$ and $b?$
7
Suppose that process $A$ in Fig. 6-12 requests the last tape drive. Does this action lead to a deadlock?
8
Consider the previous problem again, but now with $p$ processes each needing a maximum of $m$ resources and a total of $r$ resources available. What condition must hold to make the system deadlock free?
9
A system has two processes and three identical resources. Each process needs a maximum of two resources. Is deadlock possible? Explain your answer.
10
Take a careful look at Fig. 6-11(b). If $D$ asks for one more unit, does this lead to a safe state or an unsafe one? What if the request came from $C$ instead of $D?$
1 vote
11
Can a system be in a state that is neither deadlocked nor safe? If so, give an example. If not, prove that all states are either deadlocked or safe.
12
In theory, resource trajectory graphs could be used to avoid deadlocks. By clever scheduling, the operating system could avoid unsafe regions. Is there a practical way of actually doing this?
13
Can the resource trajectory scheme of Fig. 6-8 also be used to illustrate the problem of deadlocks with three processes and three resources? If so, how can this be done? If not, why not?
14
All the trajectories in Fig. 6-8 are horizontal or vertical. Can you envision any circumstances in which diagonal trajectories are also possible?
15
Suppose that in Fig. 6-6 $C_{ij} + R_{ij} > E_{j}$ for some i. What implications does this have for the system?
16
Explain how the system can recover from the deadlock in previous problem using recovery through preemption. recovery through rollback. recovery through killing processes.
17
Consider the following state of a system with four processes$, P1, P2, P3,$ and $P4,$ and five types of resources, $RS1, RS2, RS3, RS4,$ and $RS5:$ Using the deadlock detection algorithm described in Section $6.4.2,$ show that there is a deadlock in the system. Identify the processes that are deadlocked.
In order to control traffic, a network router, $A$ periodically sends a message to its neighbor, $B,$ telling it to increase or decrease the number of packets that it can handle. At some point in time, Router $A$ is flooded with traffic and sends $B$ a message ... size from $0$ to a positive number. That message is lost. As described, neither side will ever transmit. What type of deadlock is this?