Inter Process communication (IPC): Communication between processes is known as Inter Process communication. IPC is used for sending information from one process to another.
Race condition: Race condition happens when two or more processes which are accessing same shared data and the output depends on the timing of particular processes. For understanding a race condition you have to consider two processes which are accessing the same shared data. In the below given figure there are two processes which share the same data. Say, there is x data value which is stored in the shared location. Now, Process 1 has to finish the task of reading the data value and updating it. When Process 1 reads the location it gets a value x. So it stores the value x in its local variable. Now due to an interrupt Process 1 is blocked. On the other hand when Process 2 reads the value, it also gets x. So Process 2 also stores the value in their local variables. Then, Process 2 writes a value changing the value of x to y and saving the value in its local variable. Then, Process 2 starts doing other tasks. Meanwhile, Process 1 starts again from where it has left off. So it updates the data y which was written to the location with a new value of z. Now, the problem is that when Process 2 looks in the location it will never find the desired output.