Question

In: Computer Science

What do you understand by Circular wait? Is it possible to create a deadlock using only...

What do you understand by Circular wait? Is it possible to create a deadlock using only the Mutual exclusion? Explain in your own way.

Solutions

Expert Solution

Q) What do you understand by Circular wait?

Ans: Circular wait: each process must be waiting for a resource which is being held by another process, which in turn is waiting for the first process to release the resource.

Q) Is it possible to create a deadlock using only the Mutual exclusion?

Ans: No, it is not possible to create a deadlock using only the Mutual exclusion condition.

A deadlock situation on a resource can arise if and only if all of the following conditions hold simultaneously in a system:

  1. Mutual exclusion: At least one resource must be held in a non-shareable mode. Otherwise, the processes would not be prevented from using the resource when necessary. Only one process can use the resource at any given instant of time.[6]
  2. Hold and wait or resource holding: a process is currently holding at least one resource and requesting additional resources which are being held by other processes.
  3. No preemption: a resource can be released only voluntarily by the process holding it.
  4. Circular wait: each process must be waiting for a resource which is being held by another process, which in turn is waiting for the first process to release the resource. In general, there is a set of waiting processes, P = {P1, P2, …, PN}, such that P1 is waiting for a resource held by P2, P2 is waiting for a resource held by P3 and so on until PN is waiting for a resource held by P1.[3][7]

These four conditions are known as the Coffman conditions from their first description in a 1971 article by Edward G. Coffman, Jr.

Thus all of the conditions are necessary for a deadlock to occur because even with one condition missing, some of the resources can be successfully passed to the processes to execute either partially or completely so for complete deadlock to occur, we need all the 4 conditions to take place simultaneously, so that every process keeps waiting for its corresponding resource for its execution.

Hope this answers your questions, please leave a upvote if you find this helpful.


Related Solutions

Please create using only For loops, as simple as possible as I am attending Java1 Create...
Please create using only For loops, as simple as possible as I am attending Java1 Create two Java programs that do the following: a. Use a for loop to print the numbers below on a single line as shown. 1 2 4 8 16 32 64 128. b. Ask the user to enter numbers using the for loop.  First ask the user how many numbers they will be entering in. Print the sum and average of the entered numbers. c. Write...
What do you understand by intelligence?
What do you understand by intelligence? what are the types of intelligence.
What do you understand by learning.
What do you understand by learning. State the features of learning.
What do you understand by emotions.
What do you mean by emotions. Explain the characteristic and types of emotions.
What do you understand by learning.
What do you understand by learning. Describe it's laws and characteristics.
What do you understand by the term development?
What do you understand by the term development? What are the main laws of development.
What do you understand by backward children.
What do you understand by back ward children? How to remove backwardness.
What do you understand by Cost of Production in Economics?
What do you understand by Cost of Production in Economics?
Create a 6 by 6 checkered pattern without using a loop. Also use the wait and...
Create a 6 by 6 checkered pattern without using a loop. Also use the wait and offset properties. Create every checkered spot with a 1 second wait time. VBA Excel
It is possible to create partnerships in which a partner has only limited liability. Is such...
It is possible to create partnerships in which a partner has only limited liability. Is such an arrangement consistent with partnership law? Or, should the advantages of a limited partner be extended to all partners?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT