Does no mutual exclusion always imply no deadlock?
Answers
Answered by
1
Hi there!
Here's the answer:
•°•°•°•°•<><><<><>><><>°•°•°•°•°
Conditions favouring Deadlock situations ( Called 'Coffman Conditions' ) are:
• Mutual Exclusion,
• Hold & wait,
• No resource preemption,
• Circular wait.
A 'Deadlock' can occur if all the 4 Coffman conditions hold SIMULTANEOUSLY in a system.
Out of 4 Conditions, the first three are necessary but not enough for the existence of a deadlock. The fourth condition actually results from the first three conditions.
•°•°•°•°•<><><<><>><><>°•°•°•°•°
Mutual Exclusion:
Only for Non-sharable resources, the mutual exclusion concept should be applied.
Eg: Printer is a Non-sharable resource.
- If one program is using printer then the other programs must wait for the printer.
- This waiting may lead to indefinite waiting, but to overcome this, the non-sharable resource may be made sharable resource, then the concept of Mutual exclusion is not required.
- However, by making the printer as sharable, we get error output.
• In general, it is not possible to prevent deadlock by denying mutual exclusion principle, since some resources should be maintained as non-sharable resources i.e., when one program is accessing it, other programs cannot access it.
•°•°•°•°•<><><<><>><><>°•°•°•°•°
¢#£€®$
:)
Hope it helps
Here's the answer:
•°•°•°•°•<><><<><>><><>°•°•°•°•°
Conditions favouring Deadlock situations ( Called 'Coffman Conditions' ) are:
• Mutual Exclusion,
• Hold & wait,
• No resource preemption,
• Circular wait.
A 'Deadlock' can occur if all the 4 Coffman conditions hold SIMULTANEOUSLY in a system.
Out of 4 Conditions, the first three are necessary but not enough for the existence of a deadlock. The fourth condition actually results from the first three conditions.
•°•°•°•°•<><><<><>><><>°•°•°•°•°
Mutual Exclusion:
Only for Non-sharable resources, the mutual exclusion concept should be applied.
Eg: Printer is a Non-sharable resource.
- If one program is using printer then the other programs must wait for the printer.
- This waiting may lead to indefinite waiting, but to overcome this, the non-sharable resource may be made sharable resource, then the concept of Mutual exclusion is not required.
- However, by making the printer as sharable, we get error output.
• In general, it is not possible to prevent deadlock by denying mutual exclusion principle, since some resources should be maintained as non-sharable resources i.e., when one program is accessing it, other programs cannot access it.
•°•°•°•°•<><><<><>><><>°•°•°•°•°
¢#£€®$
:)
Hope it helps
Similar questions