Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using the narrow staircase example from the beginning of this chapter, create a

ID: 3796556 • Letter: U

Question

Using the narrow staircase example from the beginning of this chapter, create a list of actions or tasks that could be implemented by the building manager that would allow people to use the staircase without risking a deadlock or starvation. If a deadlock occurs at a combination of downtown intersections, as shown in the figure below, explain in detail how you would identify that a deadlock has occurred, how you would resolve it after it happens, and how you would act to prevent it from happening again. A classic case of traffic deadlock on four one-way streets. This is 'gridlock, ' where no vehicles can move forward to clear the traffic jam.

Explanation / Answer

DEADLOCK:-

deadlock is the situation where one gets stucked or get locked from all the sides,and there is no pathway to pass out from.now if we say it technically,then,dealock is the situation where situation in which two computer programs sharing the same resource are effectively preventing each other from accessing the resource, resulting in both programs ceasing to function.

STARVATION:-

it is the situation which is mostly caused due to the deadlock,starvation occurs when one process has to wait for the other process to complete for a very long time,because both the process have to use the same resource and only one cau use at a time,so untill the first completes the task,other has to wait and this waiting forlong time is known as starvation

for example: we can say that., there is a telephone booth,only one,and all have to use that,but untill and unless the first one completes the call,second will not enter the booth,and sometimes it is possible that the persoon waiting outside dont know weather there is any person inside,and he is waiting unnecessarly.

------------------

now when we use a narro staircase problem ,there is a narrow fire exti staircase,whic is used by most of the person in the building in order to avoid waiting for slow eelevators,which inresult increased the traffic in the fire exit,where only one person can pass at atime,but as there is a broad place in between of the staircase,that could be used to avoid deadlock or starvation.

now what one can do is,whene starting from the downward of the staircase,they should starting stepping,and if they get any space between any of the floor landings,they should reserve the place and should wait there for some time in order to check that is anyone is coming from upward side,or else they can leave the place and move forward,similarly wahen a person coming from upward direction should also repeat the similar task,when coming downward,if they get any wide space between the two floors landing,he should reserve the place,and wait for some times,but as he feels that its taking longtime,then he should move forward,and complete his task.this could avoid deadlock and starvation.