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...

Strong passwords are at least five characters long.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

In client-side programming, programs that run on the client side directly change the server data.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

What is the hexadecimal number system?

a. How many digits are used in the hexadecimal number system? b. How would you represent 4, 18, 33, and 64 in this number system?

Computer Science & Information Technology

HTML and XHTML are ____ markup languages.

A. differential B. baseline C. tagged D. static

Computer Science & Information Technology