I am getting ready for my end of year exams and I got stuck on this question.
Consider the following 3-process concurrent program which uses semaphores S1,
Process 1 L1: P(S3); print("N"); V(S2); goto L1; Process 2 L2: P(S1) printf("O"); V(S3); goto L2; Process 3 L3: P(S2); print("C"); V(S1); gotoL3;
Are there initial values that can be given to the semaphores so that the processes cooperate to print the string CONCONCONCO? If so, give the initial values (identify which value is to be used for which semaphore) and explain how the string is printed.
I really don't understand the question, thank you for your help.