what is the difference between race condition and deadlock?
A deadlock is when two (or more) threads are blocking each other. Usually this has something to do with threads trying to acquire shared resources. ... Race conditions occur when two threads interact in a negatve (buggy) way depending on the exact order that their different instructions are executed.