linux.conf.au, January 2003 PRINCIPLES: Race Conditions Problems: Shared address space: all using the same global & static variables. Other functions can interrupt at any time Maybe more than one CPU (SMP) We need ways to protect data from simultaneous access. We call these multiple accesses at the same time "Race Conditions" foo.c: /* Increment i by 1 */ i++; foo.s: lwz 9,0(3) # Load contents of R3 + 0 into R9 addi 9,9,1 # Add one to R9 stw 9,0(3) # Put contents of R9 back into R3 + 0