
What is race condition how it can be avoided?
This happens when the result of multiple thread execution in critical section differs according to the order in which the threads execute. Race conditions in critical sections can be avoided if the critical section is treated as an atomic instruction.
What is race condition and deadlock?
A set of waiting processes is in deadlocked state if one process is waiting for a resource held by another process in the set. Race condition occurs when multiple concurrently executing process access a shared data item and result of execution depends on the order in which execution takes place .
What is race condition with example?
A race condition is a condition when there are many processes and every process shares the data with each other and accessing the data concurrently, and the output of execution depends on a particular sequence in which they share the data and access.
What is deadlock condition?
In an operating system, a deadlock occurs when a process or thread enters a waiting state because a requested system resource is held by another waiting process, which in turn is waiting for another resource held by another waiting process.