Process synchronization:
In the multi-channel program system, because of the resource sharing or the process cooperation, it is necessary to coordinate the two restrictive relations by the process mutual exclusion and synchronization mechanism, which indirectly restricts or restricts the process to each other.
In a multi-channel program system, many processes can share various resources, the critical resources can only be used by one process at a time, so the process must be mutually exclusive use of critical resources, each process before entering the critical section, must first apply, after allowing access to
The guidelines that the synchronization mechanism should follow:
Idle let in
Busy is waiting
Limited wait
The right to wait
To resolve mutually exclusive locking mechanisms:
Before the process enters the critical section, the lock variable is used to determine if the critical resource is occupied.
Semaphore mechanism:
Semaphore mechanism is a kind of effective process synchronization tool, which is widely used in single processor and multiprocessor, as well as in computer network.
Operating Systems (47-60)