In: Computer Science
A critical section problem can be solved by satisfying which of
the following condition,
a. Mutual Exclusion
b. Progress
c. Bounded Waiting
d. All of the mentioned
Give a logical reason with an example for it why and how you selected it?
The answer is d. All of the mentioned
A proper solution of critical section problem must satisfy all the three condition of mutual exclusion, progress and bounded waiting.
Mutual exclusion means that when a process enters critrical section no other process should be allowed to enter critical section at that time. example if process p1 is running in critical section then another process p2 that wants to enter critical section will have to wait until p1 is finished executing. If mutual exclution is violated there might arise race conditon and we might not get proper output.
Progress means that when a process is not entering its critical section it must not stop other process from entering it. example suppose there are three process p1, p2 and p3. If p1 here doesn't want to enter critical section it must stop p2 and p3 from entering it. The same goes for p2 and p3 as well.
Bounded waiting means that when a process is running in critical section it must not make another process wait for a long time. There is a limit to the amount of request processes make. example if there are 100 processes and the limit for request is 50, so now if process 1 is in critical section and other processes are requesting to enter their critical section then the limit for stacking up requests will be 50 after which process 2's request must be granted.