lecture 7: interprocess communications RACE CONDITION discussion of print spooler (pg 101) protecting CRITICAL REGIONS with MUTUAL EXCLUSION (MUTEX) the 4 assumptions: 1. no two procs may be simultaneously inside their crit regions 2. no assumptions about speed/# of CPUs. 3. no proc OUTSIDE its crit region may block others 4. no proc should have to wait forever to enter its crit region pg 103 diagram of proc B waiting for proc A to exit its crit region mutex with BUSY WAITING -disabling ints? what if u-proc "forgets" turn back on? what if multi-CPU? limited OK for kernel. -lock variables -- requires disabling ints to accomplish. SPIN LOCK btw BUSY WAITING == BAD use only if waits expected to be short -strict alternation (pg 105 code) buggy if one proc is much faster/slower than the other -peterson's solution -TSL instruction