Critical Regious

The section of code or set of operation in which process may be changing shared variable, updating, a common file or a table, etc is know as critical section of the process. The process in critical section of it executes code that manipulate shared data resource. Critical section is that overlapping portion of each process, where share data and resource are accessed.

E.g. Consider the following two processes process 1 and process 2. Modifying global variable: i
Global int i=0;
Process 1
Read: i
Increment: i by 1
Store: The result into i
Process 2
Read: i
Increment: i by 2
Store: The result into i