What are the three conditions that must be present for deadl

What are the three conditions that must be present for deadlock to be possible?

What are the four conditions that create deadlock?

Explain how spinlocks are used for protecting a critical section in Linux

Solution

1.

These three conditions of policy should be gift for a stalemate to be possible:

1: Mutual exclusion.

2: Hold-and-wait.

3: No preemption.

2.

Mutual exclusion

The resources concerned should be unshakeable; otherwise, the processes wouldn\'t be prevented from victimisation the resource once necessary.

Hold and wait or partial allocation

The processes should hold the resources they need already been allotted whereas looking forward to alternative (requested) resources. If the method had to unharness its resources once a brand new resource or resources were requested, stalemate couldn\'t occur as a result of the method wouldn\'t forestall others from victimisation resources that it controlled.

No pre-emption

The processes should not have resources got rid of whereas that resource is getting used. Otherwise, stalemate couldn\'t occur since the package may merely take enough resources from running methodes to change any process to end.

Resource waiting or circular wait

A circular chain of processes, with every method holding resources that square measure presently being requested by consequent method within the chain, cannot exist. If it does, the cycle theorem indicated that stalemate may occur.

3. it\'s necessary that every lock is clearly related to what it\'s protection. additional significantly, it\'s necessary that you just defend knowledge and not code. Despite the examples during this chapter explaining the importance of protective the crucial sections, it\'s the particular knowledge within that desires protection and not the code.

What are the three conditions that must be present for deadlock to be possible? What are the four conditions that create deadlock? Explain how spinlocks are use

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site