Conditions to Avoid Race Condition

Q1. What are the necessary conditions to avoid race condition?

Ans. Although critical section’s requirement avoids race conditions, it is not sufficient for having parallel process cooperate correctly and efficiently using shared data. We need four conditions to hold to have a good solution:

  1. No two processes may be simultaneously inside their critical regions.
  2. No assumptions may be made about speeds or the number of CPUs.
  3. No process running outside its critical region may block other processes.
  4. No process should have to wait forever to enter its critical region.


Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: