What is the meaning of process synchronization
Race Condition Problem: It occurs when there are two or more processes, each of which is trying to read or write data in shared region , and the final result will be dependent precisely on who did this operation and when.
Example to explain the meaning of Race Condition Problem
Example to explain time diagram of critical sections between two processes
* Message Passing Methods
The secret behind the methods that solve the race condition problem is the achieving of mutual exclusion on the critical sections. This is done by monitoring the entrance and the exit of these sections. Activities before entering monitoring Critical section Activities after leaving Noncritical section (Safe part)
1-
1- Busy waiting 2- Strict Alternation Disadvantages of strict altenation method: 1- Busy waiting 2- Strict Alternation
2-
Disadvantages of peterson’s method: It solves the strict alternation disadvantage, but it still suffering from the Busy waiting