Consider the following scenario and suggest an appropriate synchronization mechanism using semaphores.
Two processes P1 and P2 share a resource in critical section.
P1 always enter critical section first regardless of runtime order.
P1 enters critical section two times consecutively, then only P2 is allowed.
P2 enters critical section once and then P1 is allowed.
Sample run —> P1 P1 P2 P1 P1 P2 P1 P1 P2 . . . continues
Answers
Answered by
1
Answer:
please follow me ☺☺☺☺☺☺☺
Attachments:
Similar questions