Question: Suppose that there are 2 processes running in parallel to perform 2 different tasks repeatedly. P1 P2 while(true) while(true) T1; T2; > Using synchronization tools

Suppose that there are 2 processes running in parallel to perform 2 different tasks repeatedly. P1 P2 while(true) while(true) T1; T2; > Using synchronization tools (semaphore or mutex), provide a solution so that the tasks will be mutual exclusive. Your solution should also satisfy following requirements; a. Strict ordering required. i.e. running order of the tasks should be in this order T1, T2, T1, T2, ... b. Strict ordering NOT required. However, in order a process to advance to next iteration the other task must be executed once. i.e. running order of the tasks might be in this order T2, T1, T1, T2, T1, T2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
