Question

In: Computer Science

What are the disadvantages of disabling interrupts as a strategy for achieving mutual exclusion?

What are the disadvantages of disabling interrupts as a strategy for achieving mutual exclusion?

Solutions

Expert Solution

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.


Related Solutions

There are three ways to provide mutual exclusion in a system. Explain how mutual exclusion can...
There are three ways to provide mutual exclusion in a system. Explain how mutual exclusion can be guaranteed using hardware approach and software approach.
software approach to mutual exclusion
Consider the following program which provides a software approach to mutual exclusion:Integer array control [1: N]; integer kWhere 1 ≤ k ≤ N, and each element of “control” is either 0, 1, Or 2. All elements of “control” are initially zero; the initial valueof k is immaterial.The program of the ith process (1 ≤ i ≤ N) isbegin integer j;L0: control [i] := l;LI: for j:=k step l until N, l step l until k dobeginif j = i then...
mutual exclusion is Lamport’s bakery
A software approach to mutual exclusion is Lamport’s bakery algorithm [LAMP74], so called because it is based on the practice in bakeries and other shops in which every customer receives a numbered ticket on arrival, allowing each to be served in turn. The algorithm is as follows:boolean choosing[n];int number[n];while (true) {choosing[i] = true;number[i] = 1 + getmax(number[], n);choosing[i] = false;for (int j = 0; j < n; j++){while (choosing[j]) { };while ((number[j] != 0) && (number[j],j) < (number[i],i)) { };}/*...
Consider the four distributed mutual exclusion algorithms Permission Based ---#1: Centralized Mutual Exclusion ---#2: Decentralized Mutex...
Consider the four distributed mutual exclusion algorithms Permission Based ---#1: Centralized Mutual Exclusion ---#2: Decentralized Mutex Algorithm ---#3: Distributed Mutual Exclusion #4: A Token Ring Algorithm Discuss their relative fault tolerance – basically the effect of processor crashes on the performance of the algorithm. You don’t have to come up with a 1-2-3-4 ordering.
Write a program to simulate the Distributed Mutual Exclusion in ‘C’.
Write a program to simulate the Distributed Mutual Exclusion in ‘C’.
What are the advantages and disadvantages of Blue Ocean Strategy? Is this a viable strategy for...
What are the advantages and disadvantages of Blue Ocean Strategy? Is this a viable strategy for companies today? Why or why not?
analysis to identify and define the solution in achieving high consumer's expectation, what culture, strategy and...
analysis to identify and define the solution in achieving high consumer's expectation, what culture, strategy and stucture does samsung company have? and explain the reasons
What role does the design of a comprehensive learning strategy play in the firm achieving its...
What role does the design of a comprehensive learning strategy play in the firm achieving its strategic goals?
What role does the design of a total rewards strategy play in the firm achieving its...
What role does the design of a total rewards strategy play in the firm achieving its strategic goals?
What are the primary disadvantages and advantages of a reverse merger strategy? What are the primary...
What are the primary disadvantages and advantages of a reverse merger strategy? What are the primary differences between a forward and a reverse triangular merger? Give some examples. (From Mergers, Acquisitions, and Other Restructuring Activities Solutions Manual)
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT