Critical Section & Race Conditions
This lesson exhibits how incorrect synchronization in a critical section can lead to race conditions and buggy code. The concepts of critical section and race condition are explained in depth. Also included is an executable example of a race condition.
We'll cover the following...
Critical Section & Race Conditions
A program is a set of instructions being executed and multiple threads of a program can be executing different sections of the program code. However, caution should be exercised when threads of the same process attempt to simultaneously execute the same portion of code.
Critical Section
Critical section is any piece of code that has the possibility of being executed concurrently by more than one thread of the application and exposes any ...