Suppose the only mutual exclusion primitive provided to user-level threads is a command that disables interrupts for the next 32 instructions, then reenables interrupts. Explain the benefits and drawbacks of this approach.

What will be an ideal response?


The benefits are that the system can provide mutual exclusion without much computation. There is no possibility of indefinite postponement in this approach. However, an obvious drawback is that there is a limit to the size of the critical section.

Computer Science & Information Technology

You might also like to view...

To place a node in the left of a BorderPane p, use ___________.

a. p.setEast(node); b. p.placeLeft(node); c. p.setLeft(node); d. p.left(node);

Computer Science & Information Technology

On a laptop computer, a touchpad can often substitute for a mouse

Indicate whether the statement is true or false

Computer Science & Information Technology

Which statement instructs a program to run the garbage collector?

A. System.clearGarbage(); B. System.flushGarbage(); C. System.out(); D. System.gc();

Computer Science & Information Technology

The ____ handles the overall activity of the computer and provides services.

A. central processing unit B. operating system C. arithmetic logic unit D. control unit

Computer Science & Information Technology