What is race condition in operating system?
A situation, where several processes access and manipulate a shared data
concurrently and the output of the execution depends on a particular order in
which the access takes place, is called race condition.
How can we prevent a race condition?
To prevent the race condition., we need to ensure that only one process can
access and manipulate the share data at a time. For this purpose, the processes
must be synchronized in a proper way.
|