Professional Documents
Culture Documents
OS-CO2-Session 12 Implicit Threading
OS-CO2-Session 12 Implicit Threading
Implicit Threading
Dr. Elangovan G
Associate Professor
Department of Artificial Intelligence and Data Science
Koneru Lakshmaiah Education Foundation
(Deemed to be University)
Green fields, Vaddeswaram, AP-522502, India
Session : 12
Implicit Threading
• Thread Pools
• Fork-Join
• OpenMP
• Grand Central Dispatch
• Intel Threading Building Blocks
• Threading Issues
• Signal Handling
• Thread Cancellation
• Thread-Local Storage
• Scheduler Activations
• Operating System Examples
8/24/2022 Operating Systems - CO2 2
Implicit Threading
• Growing in popularity as numbers of threads increase, program
correctness more difficult with explicit threads
• Creation and management of threads done by compilers and run-
time libraries rather than programmers
• Five methods explored
– Thread Pools
– Fork-Join
– OpenMP
– Grand Central Dispatch
– Intel Threading Building Blocks
8/24/2022 Operating Systems - CO2 3
Thread Pools
• Create a number of threads in a pool where they await work
• Advantages:
– Usually slightly faster to service a request with an existing thread than
create a new thread
– Allows the number of threads in the application(s) to be bound to the
size of the pool
– Separating task to be performed from mechanics of creating task
allows different strategies for running task
• i.e,Tasks could be scheduled to run periodically
• Windows API supports thread pools:
ˆ{ printf("I am a block"); }