In: Computer Science
What are the disadvantages of disabling interrupts as a strategy for achieving mutual exclusion?
Disabling interrupts is one of the way to achieve mutual exclusion.Disadvantages of disabling interrupts are explained below:
1).We must ensure to restore interrupts when leaving the critical section (may not have user level access)
2).It is not useful on multiprocessor systems, where multiple processes can be executing in parallel. Parallel processing execute multiple processes in parallel.
3).We must be very careful while disabling interrupts and we need to ensure that we should not disable i nterrupt for too long; devices that raise interrupts need to be serviced!
4).we must be careful while nesting. Activities that disable interrupts must restore them to their previous settings. In particular, as for example, if interrupts are disabled before entering to critical region, they should remain disabled after leaving the critical region.
5).Disabling interrupts prevents all other activities, sometimes it happens that process may never execute the same critical region. Disabling interrupts is very powerful option but we shoul be careful while using it,sometimes it is not very powerful task that is not required for particular job.
Note:If you have any doubt or query please feel free to ask in the comment.I will solve your query asap.