Home / Expert Answers / Computer Science / nbsp-question-5-in-operating-systems-a-situation-in-which-two-or-more-processes-are-blocked-wh-pa736

(Solved):   QUESTION 5 In operating systems, a situation in which two or more processes are blocked wh ...



QUESTION 5
In operating systems, a situation in which two or more
processes are blocked while waiting for resources that the

 

QUESTION 5 In operating systems, a situation in which two or more processes are blocked while waiting for resources that the other controls so that none of the affected processes can continue to execute are defined as deadlock. a) A deadlock can be detected using a resource allocation graph. Assume three processes A, B and C are competing for three resources R, S and T. In the beginning all three processes holds nothing. The following sequence of processes takes place. 1. A requests R 2. B requests S 3. C requests T 4. A requests S 5. B requests T 6. C requests R Draw a resource allocation graph and explain whether a deadlock exists or does not exist in the situation given above. Justify your answer. (4 marks) b) Two processes, P1 and P2 each want to record a scanned document on a CD. To carry out the work both processes need to lock two devices: Scanner and CD recorder. Explain how a deadlock situation might take place in the above scenario. (4 marks) c) State whether a deadlock exists or does not exist in the situation given below. Explain your answer. A system has 32 MB of user memory and a printer attached to it. Two processes A and B, with the size of 32 MB each want to print something. Process A requests and get the printer, then start to compute the values to print. Before it has finished with its computation, it exceeds its time quantum and is swapped out. Process B now runs and tries to acquire the printer. (4 marks)


We have an Answer from Expert

View Expert Answer

Expert Answer


a) Deadlock Prevention : We can prevent Deadlock by eliminating any of the following four conditions. If a deadlock is there, following 4-conditions must be TRUE and if anyone fails, deadlock is not there. Mutual Exclusion Hold and Wait No preemption
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe