In practice, almost all lock acquisitions are uncontended, so the most practical measure of a lock’s performance is the number of steps needed for a thread to acquire a lock when no other thread is concurrently trying to acquire the lock. Scientists at Cantaloupe-Melon University have devised the following “wrapper” for an arbitrary lock, They claim that if the base Lock class pro-vides mutual exclusion and is starvation-free, so does the Fast Path lock, but it can be acquired in a constant number of steps in the absence of contention. Sketch an argument why they are right, or give a counterexample.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here