- 海之寻趣
- Ranler
- 2012-06-02 18:18
- CC BY-NC-SA
并行计算(4):并行算法模型
1. Data-parallel
- Mapping of Work
- static
- Tasks -> Processes
- Mapping of Data
- Independent data items assigned to processes (Data Parallelism)
- Computation
- Tasks process data, synchronize to get new data or exchange results, continue until all data processed
- Load Balancing
- Uniform partitioning of data
- Synchronizaion
- Minimal or barrier needed at end of a phase
EX: Ray Tracing
2. Task graph
- Mapping of Work
- static
- Tasks are mapped to nodes in a data dependency task dependency graph (Task parallelism)
- Mapping of Data
- Data moves throught graph
- Computation
- Each node processes input from previous node(s) and send output to next node(s) in the graph
- Load Balancing
- Assign more processes to a given task
- Eliminate graph bottlenecks
- Synchronizaion
- Node data exchange
EX: Parallel Quicksort, Divide and Conquer approaches
3. Work pool
- Mapping of Work/Data
- No desired pre-mapping
- Any task performed by any process
- Computation
- Processes work as data becomes available (or requests arrive)
- Load Balancing
- Dynamic mapping of tasks to processes
- Synchronization
- Adding/removing work from input queue
EX:Web Server
4. Master-slave
- Modification to Worker Pool Model
- One or more Master processes generate and assign work to worker processes
- Load Balancing
- A Master process can better distribute load to worker processes
5. Pipeline
- Mapping of work
- Processes are assigned tasks that correspond to stages in the pipeline
- Static
- Mapping of Data
- Data processed in FIFO order
- Stream parallelism
- Computation
- Data is passed through a succession of processes, each of which will perform some task on it
- Load Balancing
- Insure all stages of the pipeline are balanced (contain the same amount of work)
- Synchronization
- Producer/Consumer buffers between stages
Ex: Processor pipeline, graphics pipeline
6. Hybrid
Reference
支持牛逼冉 于 2012-06-02 16:33 时评论:
支持牛逼冉