CSCD467 Parallel & Cloud Computing Midterm Study guide.
Author : shawnkoon
.
Web : github.com/shawnkoon
- Concept of barrier and semaphore
-
Barrier - Datastructure that allows threads to wait for each other to reach a same barrier point. CyclicBarrier - barrier that is re-used after the threads are released.
-
Semaphore - Datastructure that maintains a set of permits and it ensures that only N threads can access a certain resource at a given time. Tip : Why getItem() method is not synchronized? A : because semaphore encapsulates the synchronization inside itself.