search
Log In

Recent questions tagged deadlock-prevention-avoidance-detection

0 votes
0 answers
3
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?
asked Oct 30, 2019 in Operating System Lakshman Patel RJIT 37 views
0 votes
0 answers
5
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?
asked Oct 30, 2019 in Operating System Lakshman Patel RJIT 53 views
0 votes
0 answers
6
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?
asked Oct 30, 2019 in Operating System Lakshman Patel RJIT 72 views
0 votes
2 answers
7
One way to prevent deadlocks is to eliminate the hold-and-wait condition. In the text it was proposed that before asking for a new resource, a process must first release whatever resources it already holds (assuming that is possible). However, doing so introduces ... that it may get the new resource but lose some of the existing ones to competing processes. Propose an improvement to this scheme.
asked Oct 30, 2019 in Operating System Lakshman Patel RJIT 105 views
0 votes
1 answer
8
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.)
asked Oct 30, 2019 in Operating System Lakshman Patel RJIT 84 views
0 votes
1 answer
9
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?
asked Oct 30, 2019 in Operating System Lakshman Patel RJIT 69 views
2 votes
0 answers
10
0 votes
1 answer
12
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?$
asked Oct 30, 2019 in Operating System Lakshman Patel RJIT 91 views
0 votes
1 answer
14
0 votes
1 answer
23
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.
asked Oct 30, 2019 in Operating System Lakshman Patel RJIT 213 views
0 votes
0 answers
24
0 votes
1 answer
25
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?
asked Oct 30, 2019 in Operating System Lakshman Patel RJIT 61 views
1 vote
1 answer
26
0 votes
0 answers
27
Suppose four cars each approach an intersection from four different directions simultaneously. Each corner of the intersection has a stop sign. Assume that traffic regulations require that when two cars approach adjacent stop signs at the same time, the car on the left must ... (indefinitely) for the car on the left to proceed. Is this anomaly a communication deadlock? Is it a resource deadlock?
asked Oct 28, 2019 in Operating System Lakshman Patel RJIT 74 views
0 votes
0 answers
28
City streets are vulnerable to a circular blocking condition called gridlock, in which intersections are blocked by cars that then block cars behind them that then block the cars that are trying to enter the previous intersection, etc. All intersections ... the intersection is also available. Which prevention algorithm is this? Can you provide any other prevention algorithms for gridlock?
asked Oct 28, 2019 in Operating System Lakshman Patel RJIT 67 views
1 vote
3 answers
29
A computer has six tape drives with $n$ processes competing for them. Each process may need two drives. What is the maximum value of $n$ for the system to be deadlock free? $5$ $4$ $3$ $6$
asked Jul 2, 2019 in Operating System Arjun 640 views
1 vote
1 answer
30
Consider the following snapshot of a system: $Allocation$ $Max$ $Available$ $A$ $B$ $C$ $D$ $A$ $B$ $C$ $D$ $A$ $B$ $C$ $D$ $P_0$ $2$ $0$ $0$ $1$ $4$ $2$ $1$ $2$ $3$ $3$ $2$ $1$ $P_1$ $3$ $1$ $2$ $1$ $5$ $2$ $5$ $2$ $P_2$ ... for $(1, 1, 0, 0)$, can the request be granted immediately ? $c$. If a request from process $P_4$ arrives for $(0, 0, 2, 0)$, can the request be granted immediately?
asked Mar 21, 2019 in Operating System akash.dinkar12 285 views
...