|
Module 3: Fundamentals of Parallel Computers: ILP vs TLP |
|
Lecture 6: Preliminaries of Parallel Programming |
|
Some Definitions
- Task
- Arbitrary piece of sequential work
- Concurrency is only across tasks
- Fine-grained task vs. coarse-grained task: controls granularity of parallelism (spectrum of grain: one instruction to the whole sequential program)
- Process/thread
- Logical entity that performs a task
- Communication and synchronization happen between threads
- Processors
- Physical entity on which one or more processes execute
Decomposition
- Find concurrent tasks and divide the program into tasks
- Level or grain of concurrency needs to be decided here
- Too many tasks: may lead to too much of overhead communicating and synchronizing between tasks
- Too few tasks: may lead to idle processors
- Goal: Just enough tasks to keep the processors busy
- Number of tasks may vary dynamically
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|