Why use a queued spin lock in preference to a generic spin lock?
What will be an ideal response?
A queued spin lock enforces FIFO ordering of requests and is more efficient than a
normal spin lock, because it reduces the processor-to-memory bus traffic associated with the
spin lock.With a normal spin lock, a thread continually attempts to acquire the lock by executing
a test-and-set instruction on the memory line associated with the spin lock. This creates
bus traffic on the processor-to-memory bus. With a queued spin lock, a thread that
releases the lock notifies the next thread waiting for it.Threads waiting for queued spin locks
do not create unnecessary bus traffic by repeating test-and-set. Queued spin locks also
increase fairness by guaranteeing FIFO ordering of requests, because the releasing thread
uses a queue associated with the spin lock to notify the appropriate waiting thread.Windows
XP supports both spin locks (for legacy compatibility) and queued spin locks, but recommends
the use of the latter.
You might also like to view...
When defining a ____________ server, it is possible to override the integrated authentication with a stored username and password.
Fill in the blank(s) with the appropriate word(s).
What are the two types of system performance metrics that are useful for troubleshooting SQL Server performance issues?
What will be an ideal response?