search
Log In

Recent questions tagged tanenbaum

2 votes
1 answer
1
In certain countries, when two people meet they bow to each other. The protocol is that one of them bows first and stays down until the other one bows. If they bow at the same time, they will both stay bowed forever. Write a program that does not deadlock.
asked Oct 30, 2019 in Operating System Lakshman Patel RJIT 216 views
0 votes
0 answers
2
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.
asked Oct 30, 2019 in Operating System Lakshman Patel RJIT 207 views
0 votes
0 answers
3
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.
asked Oct 30, 2019 in Operating System Lakshman Patel RJIT 72 views
0 votes
0 answers
5
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.
asked Oct 30, 2019 in Operating System Lakshman Patel RJIT 61 views
0 votes
0 answers
6
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.
asked Oct 30, 2019 in Operating System Lakshman Patel RJIT 117 views
0 votes
0 answers
7
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.
asked Oct 30, 2019 in Operating System Lakshman Patel RJIT 114 views
0 votes
0 answers
8
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.
asked Oct 30, 2019 in Operating System Lakshman Patel RJIT 43 views
0 votes
0 answers
9
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?
asked Oct 30, 2019 in Operating System Lakshman Patel RJIT 44 views
0 votes
0 answers
10
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 30 views
0 votes
0 answers
12
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 41 views
0 votes
0 answers
13
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 60 views
0 votes
1 answer
14
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 57 views
0 votes
1 answer
15
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 68 views
0 votes
0 answers
16
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.
asked Oct 30, 2019 in Operating System Lakshman Patel RJIT 58 views
0 votes
1 answer
17
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 64 views
2 votes
0 answers
18
0 votes
1 answer
20
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 76 views
0 votes
1 answer
22
...