A spin lock (see Bacon [2002]) is a boolean variable accessed via an atomic test-and-set
instruction, which is used to obtain mutual exclusion. Would you use a spin lock to obtain mutual
exclusion between threads on a single-processor computer?

What will be an ideal response?

The problem that might arise is the situation in which a thread spinning on a lock uses up its timeslice, when
meanwhile the thread that is about to free the lock lies idle on the READY queue. We can try to avoid this
problem by integrating lock management with the scheduling mechanism, but it is doubtful whether this would
have any advantages over a mutual exclusion mechanism without busy-waiting.

Computer Science & Information Technology

You might also like to view...

A sensitivity analysis is another name for a(n) ____________________.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

You can use ________ to find information about tasks or commands in Office or to search for general information on a topic.

A. Live Preview B. Smart Lookup C. Backstage view D. the Thesaurus

Computer Science & Information Technology