In-Depth Notes on Parallel Processing
Introduction to Parallel Processing
- Definition: Parallel processing refers to the simultaneous use of multiple compute resources to solve computational problems.
- Importance: It allows for faster processing and efficiency by executing multiple instructions at once, contrary to sequential processing where tasks are done one at a time.
Fundamental Concepts
- Parallelism: The practice of running multiple calculations or processes simultaneously.
- Concurrency: A concept in which multiple tasks are making progress within overlapping time periods.
- Distribution: Referring to distributing tasks over multiple systems rather than relying on a single system.
Differences Between Parallel and Sequential Processing
Sequential Processing:
- Involves a single Central Processing Unit (CPU).
- Tasks are executed one at a time, leading to potential bottlenecks.
Parallel Processing:
- Utilizes multiple CPUs to perform tasks.
- Breaks problems into discrete parts and solves them concurrently, leading to greater efficiency.
Early Developments in Parallel Processing
- 1940s-1950s: Conceptual beginnings led by figures like John von Neumann.
- 1960s: Introduction of supercomputing with the CDC 6600.
- 1970s: Rise of multiprocessing and SIMD (Single Instruction, Multiple Data) architectures.
Key Milestones in Parallel Processing
- 1980s: Advent of MIMD (Multiple Instruction, Multiple Data) architectures with systems like the Connection Machine and the development of MPI (Message Passing Interface).
- 1990s: Popularity of multi-core and many-core processors, as introduced by Intel and AMD.
- 2000s-Present: Widespread adoption of parallel processing in consumer CPUs and GPUs, as well as developments in cloud computing and AI.
Types of Parallelism
Data Parallelism: Distributing subsets of the same data across multiple processors to perform operations.
- Example: Image processing where each pixel is processed in parallel.
Task Parallelism: Distribution of different tasks across processors, where each task executes independently.
- Example: Web servers handling multiple requests simultaneously.
Fine-Grained Parallelism:
- Definition: Tasks are divided into small units that can be executed in parallel.
- Advantages: High performance; suitable for detailed tasks.
- Challenges: High overhead from task management; complexity in programming.
Coarse-Grained Parallelism:
- Definition: Larger tasks are divided and handled by different processors.
- Advantages: Reduced overhead; easier implementation.
- Challenges: Less flexibility in task distribution.
Flynn's Taxonomy
- Distinguishes computing architectures based on two dimensions: Instruction (single/multiple) and Data (single/multiple).
- SISD: Single Instruction, Single Data – Traditional computing model (one instruction, one data).
- SIMD: Single Instruction, Multiple Data – Executes the same instruction across multiple data streams.
- MISD: Multiple Instruction, Single Data – Rare architecture where multiple instructions process the same data.
- MIMD: Multiple Instruction, Multiple Data – Most common type of current architecture (each processor may execute different instructions on different data).
Processor Architectures for Parallelism
Multi-Core Processors: Comprise multiple cores on a single chip that can execute threads simultaneously, sharing memory and I/O.
- Examples: Dual-core, quad-core configurations.
Many-Core Processors: Feature a significantly higher number of cores, designed for parallel processing tasks.
GPU Architectures: Graphics Processing Units optimized for handling numerous parallel tasks, particularly extensive data processing fields like image and video rendering.
Review Questions
- What are the main differences between parallel processing and sequential processing?
- Explain data parallelism vs. task parallelism with examples.
- Describe Flynn's Taxonomy classifications and provide examples.
- Discuss advantages and challenges of fine-grained and coarse-grained parallelism.
- Differentiate multi-core from many-core processors regarding architecture and use cases.
Summary of Main Points
- Understanding parallel processing fundamentals: data parallelism, task parallelism, granularity, and types of architectures.
- Categories of parallel architectures based on Flynn's framework (SISD, SIMD, MISD, MIMD).
- Processor architectures including multi-core, many-core processors, and GPUs often utilized in parallel processing.