ALL > Computer and Education > courses > university courses > undergraduate courses > Operating System > zstu-(2021-2022)-1 > online discussion >
online discussion-2 Version 0
👤 Author: by 1436830195qqcom 2021-10-27 03:33:08

Please login to reply. Login

1436830195qqcom • 2021-10-27 11:49:44
a.the four necessary conditions for a deadlock are 1)mutual exclusion; 2)hold-and-wait; 3)no preemption; 4)circular wait.
b. A simple rule that would avoid this traffic deadlock is that a car may not advance into an intersection if it is clear they will not be able to immediately clear the intersection. And a new rule also can add to it, four directions of routes, two parallel routes are opened each time, and the other two routes stop moving forward and wait outside the intersection. PostVer 0

Please login to reply. Login

2351505710qqcom • 2021-10-27 11:51:35
a.
<p class="tgt" data-section="0"><span class="tgt" data-section="0" data-sentence="0" data-group="0-0">1) Mutually exclusive conditions</span></p>
<p class="tgt" data-section="1"><span class="tgt" data-section="1" data-sentence="0" data-group="1-0">2) Request and hold conditions</span></p>
<p class="tgt" data-section="2"><span class="tgt" data-section="2" data-sentence="0" data-group="2-0">3) No deprivation of conditions</span></p>
<p class="tgt" data-section="3"><span class="tgt" data-section="3" data-sentence="0" data-group="3-0">4) Loop waiting conditions</span></p>
<p class="tgt" data-section="3">b.When a process occupies an exclusive resource and then applies for an exclusive resource that cannot be satisfied, it exits the originally occupied resource.</p> PostVer 0

Please login to reply. Login

2990994011qqcom • 2021-10-27 11:54:42
a、Mutual exclusion: Only one car can occupy a space in the roadway.
Hold and wait: a car holding their place is waiting to acquire other place held by other cars.
No preempt:A car cannot be removed from its position in the roadway after other cars remove.
Circular wait: Each car is waiting for a subsequent car to advance.The circular wait condition is also easily observed from the graphic.
b、A simple rule that would avoid this traffic deadlock is that a car may not advance into the intersection if it is clear they will not be able to immediately leave the intersection. PostVer 0

Please login to reply. Login

2972850556qqcom • 2021-10-27 11:58:01
a.(Mutual exclusion)(Hold and wait)(No pre-emption)(Circular wait)

b.When the number of vehicles on one road can lead to congestion of other road sections, a warning signal will be sent to the road section to be blocked to prohibit vehicles from entering the road section. PostVer 0

Please login to reply. Login

rootfreanjacn • 2021-10-27 12:00:01
<b>a )Four necessary conditions for deadlock</b>
<ol>
<li><b>Mutual Exclusion:Only one car can travel on one road</b></li>
<li><b>Hold and wait:Traffic on one road occupies an intersection and is waiting for the next intersection</b></li>
<li><b>No preemption:An intersection can only be occupied by vehicles in one direction at the same time</b></li>
<li><b>Circular wait:The traffic waiting for each other on the four roads just forms a cycle</b></li>
</ol>
&nbsp;

<b>b)When a car on a road cannot pass two intersections at the same time, it will not enter the first intersection</b> PostVer 0

Please login to reply. Login

1436830195qqcom • 2021-10-27 12:00:18
a).the four necessary conditions for a deadlock are 1)mutual exclusion; 2)hold-and-wait; 3)no preemption; 4)circular wait.

The mutually exclusive condition holds because only cars can occupy space on the road. When the car maintains its position on the road, hold-and-wait occurs. The car cannot be removed from its position on the road. Finally, there is indeed a cycle of waiting, because each car is waiting for the next car to move forward. It is also easy to observe the loop waiting condition from the figure.
b). A simple rule that would avoid this traffic deadlock is that a car may not advance into an intersection if it is clear they will not be able to immediately clear the intersection.And a new rule also add to it, four directions of routes, two parallel routes are opened each time, and the other two routes stop moving forward and wait outside the intersection. PostVer 0

Please login to reply. Login

1148873699qqcom • 2021-10-27 12:01:15
a.
<ol>
<li>mutual exclusion: At least one resource is in non-shared mode, i.e. not available for simultaneous use by processes</li>
<li>hold and wait: A process must occupy at least one resource and wait for another</li>
<li>no preemption: Resources cannot be preempted, and requests for resources must wait until the resource is released as free</li>
<li>circular wait: Processes take possession of certain resources among themselves and wait for other processes to release other resources</li>
</ol>
b.
<ul>
<li>The operating system is required to get additional information about car requests for access to the intersection and access to the intersection in advance, and assign the intersection in some order.</li>
<li>The system dynamically detects each resource request sent by the car and decides whether to assign the intersection based on the result of the check - if there is a risk, no resource is assigned.</li>
</ul> PostVer 0

Please login to reply. Login

1223052236qqcom • 2021-10-27 12:01:29
a.
Mutual exclusion
Hold and wait
No preemption
Circular wait
b.A simple rule is that only one direction is allowed at an intersection for a period of time, and different directions are allowed in different periods of time PostVer 0

Please login to reply. Login

1097682897qqcom • 2021-10-27 12:08:58
a.1.mutual exclusion2.hold-and-wait;3.no preemption; 4.circular wait

b.Obtain the vehicle request in advance to prohibit the vehicle from entering, or set the intersection to provide resources PostVer 0

Please login to reply. Login

nintendolinkfoxmailcom • 2021-10-27 12:09:43
a.

If these four traffic line denote four process, then they have four characteristics of deadlock, which prove that this is indeed a deadlock.
<ol>
<li><b>Mutual</b> <b>exclusion</b>: only one process at a time can use a resource. In this case, each car is in each traffic line, it can’t be in two lines.</li>
<li><b>Hold and wait</b>: a process holding at least one resource is waiting to acquire additional resources held by other processes. In here, there each process holds four or five resources(four or five cars) and each process wants the resource of another traffic line(let the road clean).</li>
<li><b>No preemption</b>: a resource can be released only voluntarily by the process holding it, after that process has completed its task. In here, each line of traffic hasn’t finished its task(go through the road), so no resource will be released.</li>
<li><b>Circular wait</b>: there exists a set {P0, P1, …, P0} of waiting processes such that P0 is waiting for a resource that is held by P1, P1is waiting for a resource that is held by P2, …, Pn–1is waiting for a resource that is held by Pn, and P0is waiting for a resource that is held by P0. In here, each traffic line is waiting the front traffic line go off(release resources).</li>
</ol>
b.
<ol>
<li>Simplest and most useful model requires that each process declare the maximum number of resources of each type that it may need.</li>
<li>The deadlock-avoidance algorithm dynamically examines the resource-allocation state to ensure that there can never be a circular-wait condition.</li>
<li>Resource-allocation state is defined by the number of available and allocated resources, and the maximum demands of the processes.</li>
</ol> PostVer 0

Please login to reply. Login

3317097493qqcom • 2021-12-27 21:26:30
<span class="transSent" data-group="0-0">A) The four necessary conditions for deadlock are Mutually exclusive: only one car can drive on one road; Hold and wait: a vehicle on one road occupies one intersection and is waiting for the next intersection; No preemption: an intersection can only be occupied by vehicles in one direction at a time. </span><span class="transSent" data-group="0-1"> Circular waiting: vehicles waiting for each other on four roads form a circle.) When a car on a road cannot pass two intersections at the same time, it does not enter the first intersection.</span>

B) When a car on the road cannot pass both intersections at the same time, it will not enter the first intersection! PostVer 0

Please login to reply. Login

1615379639qqcom • 2021-12-29 18:35:09
a.The four necessary conditions for a deadlock are(①)mutual exclusion;(2)hold-and-wait;(3)no preemption;and(4 circular wait.
-mutual exclusion condition holds as only one car can occupy a space in the roadway.
-Hold-and-wait occurs where a car holds onto their place in the roadway while they wait to advance in the roadway.
-A car cannot be removed (i.e.preempted)from its position in the roadway.
circular wait as each car is waiting for a subsequent car to advance.The circular wait condition is also easily observed from the graphic.
b.A simple rule that would avoid this traffic deadlock is that a carmay not advance into an intersection if it is clear they will not be able to immediately clear the intersection. PostVer 0

Please login to reply. Login

Reversion History

Loading...
No reversions found.