Process Synchronization is a way to coordinate processes that use shared data.
Critical section is a segment of code that can be accessed by only one signal process at a certain instance in time. This section consists of shared data resources that need to be accessed by other processes. The entry to the critical section is handled by the wait() function, represented as P(). The exit from a critical section is controlled by the signal() function, represented as V(). Only one process can be executed inside the critical section at a time. Other processes waiting to execute their critical sections have to wait until the current process finishes executing its critical section.

This protected section is the critical section or critical region. It cannot be executed by more than one process at a time.
Solution to Critical Section Problem :
Any solution to the critical section problem must satisfy three requirements:
- Mutual Exclusion –
Only one process can be in its critical section at a given point of time. - Progress –
If no process is in its critical section, and if one or more threads want to execute their critical section then any one of these threads must be allowed to get into its critical section. - Bounded Waiting –
Bounded waiting means that each process must have a limited waiting time. It should not wait endlessly to access the critical section.
Please write comments if you find anything incorrect. A gentle request to share this topic on your social media profile.
