This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: that uses the AtomicInteger class to provide lock-free access to the seed. Part 3 Modify the test driver so that it invokes each of these implementations in turn. Measure the performance of the two implementations by varying the number of threads that invoke the generator from within the driver. How does performance vary as contention increases? Contention is inversely correlated to the percentage of time spent performing thread-local computation. Part 4 Following our general description of implementing a lock-free queue, implement a non-blocking lock-free concurrent stack algorithm using the AtomicReference class to represent the top element in the stack. You need to provide operations to concurrently push and pop elements off the stack; since this is a lock-free algorithm, your solution should not involve the use of locks or synchronization (other than compareAndSet) ....
View Full Document
This note was uploaded on 03/26/2012 for the course CS 390 taught by Professor Staff during the Spring '08 term at Purdue University.
- Spring '08