Interrupt disabling and enabling is a common approach to implementing mutual exclusion,
what are its advantages and disadvantages?
Answer:
Advantages:
- It actually succeeds in enforcing mutual exclusion.
Disadvantages:
- You have the result of busy waiting again, a poor approach. All other processes must simply wait for the currently running one to finish, and any IRQs sent to the CPU during that period will be ignored. Which, y’know, impedes progress.
- Obviously, only works in kernel mode.
- Does not work on multiprocessor systems