Consider Three binary Semaphore Q = R = 1 , S = 0;
Process P1:-
P(Q);
P(R);
/* CRITICAL SECTION */
V(Q);
V(R);
Process P2:-
P(R);
P(Q);
/* CRITICAL SECTION */
V(Q);
V(R);
Process P3:-
P(S);
/* CRITICAL SECTION */
Q1 Give the status (ie. satisfied or not satisfied) of following :-
1. Mutual Exclusion.
2. Bounded Waiting
3. Progress
4. Deadlock
5. Starvation.
Q2 Consider the Scenario in which process p1 and p2 only with above code and process p3 is not present, now here Process P1 is in critical section for INFINITE AMOUNT OF TIME then process P2 is also trying to enter into critical section,
1. then Bounded Wait is satisfied or not.
2. then Starvation is satisfied or not.