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

# Questions without answers in Operating System

1
Suppose you have a Linux file system where the block size is $2K$ bytes, a disk address is $32$ bits, and an $i-$node contains the disk addresses of the first $12$ direct blocks of file, a single indirect block and a double indirect block. Approximately, what is the largest file that can be represented by an $i-$node? $513$ Kbytes $513$ MBytes $537$ Mbytes $537$ KBytes
2
What is the elapsed time of $P$ if records of $F$ are organized using a blocking factor of $2$(i.e. each block on $D$ contains two records of $F$) and $P$ uses one buffer? $12$ sec. $14$ sec. $17$ sec. $21$ sec.
3
A computer uses $46-bit$ virtual address, $32-bit$ physical address, and a three-level paged page table organization. The page table base register stores the base address of the first-level table ($T1$), which occupies exactly one page. Each entry of $T1$ stores the base ... needed to guarantee that no two synonyms map to different sets in the processor cache of this computer? $2$ $4$ $8$ $16$
4
A system has $n$ resources $R_0, \dots,R_{n-1}$, and $k$ processes $P_0, \dots, P_{k-1}$. The implementation of the resource request logic of each process $P_i$ is as follows: if(i%2==0){ if(i<n) request Ri; if(i+2<n) request Ri+2; } else{ if(i<n) request Rn−i; if(i+2<n) ... ; } In which of the following situations is a deadlock possible? $n=40,\: k=26$ $n=21,\:k=12$ $n=20,\:k=10$ $n=41,\:k=19$
5
The aging algorithm with a = $0.5$ is used to predict run times. The previous four runs from oldest to most recent are $40, 20, 20,$ and $15$ msec. The prediction for the next time will be : $15$ msec. $25$ msec. $39$ msec. $40$ msec.
6
Which statements is not correct about “init” process in Unix? It is generally the parent of the login shell. It has PID $1$. It is the first process in the system. Init forks and execs a ‘getty’ process at every port connected to a terminal.
7
Names of some of the Operating Systems are given below: MS-DOS XENIX OS/$2$ In the above list, following operating systems didn’t provide multiuser facility. (a) only (a) and (b)only (b) and (c) only (a),(b) and (c)
1 vote
8
9
Write a program that detects if there is a deadlock in the system by using a resource allocation graph. Your program should read from a file the following inputs: the number of processes and the number of resources. For each process if should read four numbers: the ... is a deadlock in the system. In case there is, the program should print out the identities of all processes that are deadlocked.
10
Write a program to implement the deadlock detection algorithm with multiple resources of each type. Your program should read from a file the following inputs: the number of processes, the number of resource types, the number of resources of each type in existence ... a deadlock in the system. In case there is, the program should print out the identities of all processes that are deadlocked.
11
Program a simulation of the banker’s algorithm. Your program should cycle through each of the bank clients asking for a request and evaluating whether it is safe or unsafe. Output a log of requests and decisions to a file.
12
Repeat the previous problem, but now avoid starvation. When a baboon that wants to cross to the east arrives at the rope and finds baboons crossing to the west, he waits until the rope is empty, but no more westward-moving baboons are allowed to start until at least one baboon has crossed the other way.
13
A student majoring in anthropology and minoring in computer science has embarked on a research project to see if African baboons can be taught about deadlocks. He locates a deep canyon and fastens a rope across it, so the baboons can cross hand-overhand ... semaphores that avoids deadlock. Do not worry about a series of eastward-moving baboons holding up the westward-moving baboons indefinitely.
14
Cinderella and the Prince are getting divorced. To divide their property, they have agreed on the following algorithm. Every morning, each one may send a letter to the other's lawyer requesting one item of property. Since it takes a day for letters to ... When they come back from vacation, the computers are still negotiating. Why? Is deadlock possible? Is starvation possible? Discuss your answer.
15
A program contains an error in the order of cooperation and competition mechanisms, resulting in a consumer process locking a mutex (mutual exclusion semaphore) before it blocks on an empty buffer. The producer process blocks on the mutex before it can place a ... waiting for a signal from the producer. Is this a resource deadlock or a communication deadlock? Suggest methods for its control.
16
Local Area Networks utilize a media access method called CSMA/CD, in which stations sharing a bus can sense the medium and detect transmissions as well as collisions. In the Ethernet protocol, stations requesting the shared channel do not transmit frames if they sense ... this a resource deadlock or a livelock? Can you suggest a solution to this anomaly? Can starvation occur with this scenario?
17
Assume two processes are issuing a seek command to reposition the mechanism to access the disk and enable a read command. Each process is interrupted before executing its read, and discovers that the other has moved the disk arm. Each then reissues the seek ... . This sequence continually repeats. Is this a resource deadlock or a livelock? What methods would you recommend to handle the anomaly?
18
Main memory units are preempted in swapping and virtual memory systems. The processor is preempted in time-sharing environments. Do you think that these preemption methods were developed to handle resource deadlock or for other purposes? How high is their overhead?
19
A computer science student assigned to work on deadlocks thinks of the following brilliant way to eliminate deadlocks. When a process requests a resource, it specifies a time limit. If the process blocks because the resource is not available, a timer is started. If the ... the process is released and allowed to run again. If you were the professor, what grade would you give this proposal and why?
20
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.
21
Suppose that process $A$ in Fig. 6-12 requests the last tape drive. Does this action lead to a deadlock?
22
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?
23
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?
24
All the trajectories in Fig. 6-8 are horizontal or vertical. Can you envision any circumstances in which diagonal trajectories are also possible?
25
Suppose that in Fig. 6-6 $C_{ij} + R_{ij} > E_{j}$ for some i. What implications does this have for the system?
26
The discussion of the ostrich algorithm mentions the possibility of process-table slots or other system tables filling up. Can you suggest a way to enable a system administrator to recover from such a situation?
27
Consider Fig. 6-4. Suppose that in step $(o)\: C$ requested $S$ instead of requesting $R.$ Would this lead to deadlock? Suppose that it requested both $S$ and $R.$