Critical section problem

CRITICAL SECTION:

Critical section problem is a problem when a process access shared resource is called critical section. And we wants system should not fall in inconsistency even after multiple processes.

For example:
In above image,
In  section of codes there are two types of resources, private resources and shared resources.

Accessing private resources: When accessing private resources there is no requirement of any order or schedule, because it's private and used by its private member.

Accessing shared resources: But when accessing shared resources there is the requirements of a order, a fashion, because it's shared process but accessing must be in mutual exclusive fashion.
Only one processes can access that shared resource at a time, so scheduling is must.

Shared resources section is denoted as Critical section.


So what is critical about it ?

We needed a proper mechanism to access shared resources.

So here problem is how to access critical section so there should not be any problem or inconsistency.


The solution of Critical section problem depends/ judge on the basis of these three criterias-


1) Mutual Exclusion - means only one process will access critical section at a time. Mutual exclusion is a mandatory criteria,

2) Progress- Only those processes should compete which actually wants to enter critical section.
For example: Out Of process P1, P2, P3 only P1 and P2 wants to enter in critical section. Than only P1, P2 should be considered in any solution. Progress is a mandatory criteria.
3) Bounded Wait- There must be a maximum bound up to which a process can wait. Means there should be a time limit after which we can guarantee that process will get enter in critical section. Bounded wait is an optional criteria, because its not possible to fulfill this criteria every time.
Only those critical solutions are acceptable which are satisfied by above three criterias.

Related topics

Please use contact page in this website if you find anything incorrect or you want to share more information about the topic discussed above.