Mutual exclusion primitives
Disabling interrupts
-
simple solution. Works because it prevents other processes from running
& therefore prevents other processes entering their critical sections.
-
requires access to hardware registers (only in kernel mode)
-
may interfere with higher-priority tasks and interrupts
-
doesn't work with multiple CPUs
In practice, the OS may disable interrupts for very short periods of time,
within the kernel code. For example, the Amiga OS disables interrupts while
updating various internal structures, but provides signals, message-passing and semaphores for
user-level processes to achieve mutual exclusion.
last updated 13 February 1998