Computer Science, asked by preetanmol4486, 11 months ago

Algoritm to make call friend

Answers

Answered by vimalraj1217
0

Explanation:

Here is an algorithm for calling a friend on the telephone:

Step1. 2.3.4.5.6.7.OperationDial the phone and wait for either ananswer or a busy signalIf the line is not busy then do Steps 3 and 4Talk as long as you wantHang up the phone, you are doneOtherwise (the line is busy)Wait exactly 1 minuteGo back to Step 1 and try again

During execution, this algorithm could get into a situation where, as in the deadlock problem, no useful work can ever get done. Describe the problem, explain why it occurs, and suggest how it could be solved.

Similar questions