1 votes 1 votes How to solve it ? Operating System operating-system + – Harikesh Kumar asked Feb 1, 2018 Harikesh Kumar 398 views answer comment Share Follow See all 6 Comments See all 6 6 Comments reply Mk Utkarsh commented Feb 1, 2018 reply Follow Share P2 will never run after running 3 times it will print "CCC" and deadlock. A goto statement in C programming provides an unconditional jump from the 'goto' to a labeled statement in the same function. NOTE − Use of goto statement is highly discouraged in any programming language because it makes difficult to trace the control flow of a program, making the program hard to understand and hard to modify. Any program that uses a goto can be rewritten to avoid them. 0 votes 0 votes gauravkc commented Feb 1, 2018 reply Follow Share No one is signaling L. Okay that causes deadlock. But what if L1 gets preempted after Signal(R)? A will be printed, right? 1 votes 1 votes Mk Utkarsh commented Feb 1, 2018 reply Follow Share Oh yeah, in that case it will print "AB" and keeps on printing until R exhausts or P2 is preempted. thanks for pointing out 0 votes 0 votes gauravkc commented Feb 1, 2018 reply Follow Share How is 0 answer but . 0 votes 0 votes Mk Utkarsh commented Feb 1, 2018 reply Follow Share they are asking smallest number of A's that might be printed. they mean there exist that scenario where no "A" is printed. If there is no preemption then there will be no A's. 0 votes 0 votes gauravkc commented Feb 1, 2018 reply Follow Share okk got it :o 1 votes 1 votes Please log in or register to add a comment.