-3
$\begingroup$

The interrupt disable method to achieve mutual exclusion works for uniprocessor systems. Why does the interrupt disable method to achieve mutual exclusion not work for multiprocessor systems?

$\endgroup$
4
$\begingroup$

Mutual exclusion means that during some time, a certain piece of code (called a critical section) has exclusive control over a resource. Interrupts can break that because they cause control to be transferred from critical section to the interrupt handler. Code running on other processors can break that because they can access the resource at the same time. Therefore, on a multiprocessor machine, disabling interrupts is not sufficient to achieve multiple exclusion. There also needs to be a way to prevent the other processors from accessing the resource.

Disabling interrupts is sufficient when it's the only way for the critical section to lose control. On a multiprocessor machine, the critical section does not have exclusive control in the first place.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.