2079 5

BIT204 ยท 2079 ยท 5 marks

What is race condition? Explain critical problem solution using lock variable.

What is race condition? Explain critical problem solution using lock variable. [5]

Operating SystemsChapter 5: Concurrency and SynchronizationLock variable solution

A race condition occurs when two or more processes access shared data concurrently, and the final result depends on the order or timing of their execution. Because the processes "race" against each other, the outcome is unpredictable and may lead to data inconsistency. Example: Suppose two proces...