search
Log In
1 vote
85 views

How to solve it ?

in Operating System 85 views
0

P2 will never run 

after running 3 times it will print "CCC" and deadlock.

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.

1
No one is signaling L. Okay that causes deadlock.

But what if L1 gets preempted after Signal(R)? A will be printed, right?
0
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
How is 0 answer but .
0
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.
1
okk got it :o

Please log in or register to answer this question.

Related questions

0 votes
1 answer
1
65 views
How to get answer ....I am getting different answer which is not matching with any options
asked Jan 31, 2018 in Mathematical Logic Harikesh Kumar 65 views
0 votes
1 answer
2
102 views
What is mean here by word size=4 Byte ? Please solve the below question
asked Jan 30, 2018 in CO and Architecture Harikesh Kumar 102 views
...