search
Log In
0 votes
192 views
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 number of resources it is currently holding, the IDs of resources it is holding, the number of resources it is currently requesting, the IDs of resources it is requesting. The output of program should indicate if there is a deadlock in the system. In case there is, the program should print out the identities of all processes that are deadlocked.
in Operating System 192 views

Please log in or register to answer this question.

Related questions

0 votes
1 answer
1
2 votes
1 answer
2
208 views
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 208 views
0 votes
0 answers
3
0 votes
0 answers
4
68 views
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 68 views
...