When two or more processes try to access one shared resource, process synchronization is required. The piece of code that access shared resource is known as critical section. Only one process can enter into its critical section. A critical section has enter section and may have exit section.