Difference between revisions of "Team Darth Vector"

From CDOT Wiki
Jump to: navigation, search
Line 14: Line 14:
 
'''Containers Comparison'''
 
'''Containers Comparison'''
  
'''List of TBB containers:''' concurrent_queue, concurrent_vector, concurrent_hash_map
+
'''List of TBB containers:'''  
 +
 
 +
concurrent_queue: Multiple threads may simultaneously push and pop elements from the
 +
queue.
 +
 
 +
concurrent_vector, concurrent_hash_map
  
 
'''quotes''': ''Intel Threaded Building Blocks book.''  
 
'''quotes''': ''Intel Threaded Building Blocks book.''  
Line 20: Line 25:
 
(STL) containers generally are not concurrency-friendly, and attempts to modify
 
(STL) containers generally are not concurrency-friendly, and attempts to modify
 
them concurrently can easily corrupt the containers.
 
them concurrently can easily corrupt the containers.
 
  
  
Line 41: Line 45:
 
'''Efficiency Comparison Parallel for and concurrent_vector'''
 
'''Efficiency Comparison Parallel for and concurrent_vector'''
 
----
 
----
 +
 +
'''Concept:''' Fine-grained locking
 +
 +
Multiple threads operate on the container by locking only those portions they
 +
really need to lock.
 +
 +
'''Concept:''' Lock-free algorithms
 +
 +
'''Bits of knowledge:'''
 +
 +
STL interfaces are inherently not thread-safe.
 +
 +
Threading Building Blocks containers are not templated with
 +
an allocator argument.

Revision as of 12:55, 23 November 2017

Members


Alistair Godwin

Giorgi Osadze

Leonel Jara


TBB Background


Containers Comparison

List of TBB containers:

concurrent_queue: Multiple threads may simultaneously push and pop elements from the queue.

concurrent_vector, concurrent_hash_map

quotes: Intel Threaded Building Blocks book. Highly concurrent containers are very important because Standard Template Library (STL) containers generally are not concurrency-friendly, and attempts to modify them concurrently can easily corrupt the containers.


Algorithms

Threads


STL Background


Containers Comparison

Algorithms

TBB Threads


Efficiency Comparison Parallel for and concurrent_vector


Concept: Fine-grained locking

Multiple threads operate on the container by locking only those portions they really need to lock.

Concept: Lock-free algorithms

Bits of knowledge:

STL interfaces are inherently not thread-safe.

Threading Building Blocks containers are not templated with an allocator argument.