PDC 3
PDC 3
Computing
By
Mrs.SD.Shareefunnisa
Course Description & Objectives
• This course addresses the challenges involved in developing parallel
and distributed applications. It explores various implementation
strategies, paradigms, architectures, and parallel algorithms.
Additionally, it highlights current trends in parallel and distributed
computing, such as Open MP, POSIX Threads, and Apache Hadoop
(DFS).
Course Outcomes
• Apply the fundamentals of parallel and parallel computing including
architectures and paradigms.
• Analyse the various design principles of parallel algorithms.
• Learn the intricacies of distributed programming.
• Develop and execute basic parallel and distributed applications using
basic programming models and tools.
MODULE-1
UNIT-1 12L+8T+0P=20 Hours
PROGRAMMING
Need for communication and coordination/synchronization, Scheduling and
contention, Independence and partitioning, Task- Based Decomposition, Data
Parallel Decomposition, Characteristics of task and interaction, Load balancing,
Data Management, parallel algorithm models, Sources of overhead in parallel
programs, Performance metrics for parallel algorithm implementations, Parallel
algorithmic patterns like divide and conquer, Map and Reduce, Specific
algorithms like parallel Merge Sort, Parallel graph Algorithms.
Parallelism
• Parallelism refers to the process of performing multiple tasks or computations
simultaneously by dividing them into smaller, independent parts that can be
executed concurrently.
• This approach is commonly used to increase computational speed and efficiency,
particularly in systems with multiple processors, cores, or threads.
Types of Parallelism
• Data Parallelism: Dividing data across processors to apply the same operation
concurrently
Ex: Matrix multiplication
• Task Parallelism: Assigning different tasks or processes to different processors
Ex: executing different functions simultaneously.
• Bit-Level Parallelism: Performing operations on smaller data sizes simultaneously.
Ex: Add two 8-bit numbers using a processor
• Instruction-Level Parallelism: Executing multiple instructions simultaneously
within a single CPU.
Ex: Loop Unrolling
Parallel computing
• It is a type of computation in which multiple tasks or calculations are carried out
Key Characteristics:
• Parallel Software: Programming models like MPI, OpenMP, CUDA, or multithreading libraries.
• Efficient Resource Utilization: Makes use of multiple processors, cores, or machines to achieve higher efficiency
and throughput.
• Scalability: Can handle larger datasets or more complex problems by adding more processing units.
•Cost Efficiency: Distributed systems can use many low-cost machines instead of relying on a single, expensive
high-performance system.
•Real-Time Processing: Ideal for time-sensitive applications like autonomous vehicles, medical diagnostics, or
financial trading.
•Energy Efficiency: Performing computations in parallel can reduce energy consumption compared to
sequential processing over an extended period.
•Fault Tolerance: Some parallel systems can continue processing even if one processor or node fails
(redundancy in distributed systems).
•Solving Larger Problems: Enables tackling problems that are too large or complex for a single
processor to handle.
•Improved Performance in AI/ML: Speeds up training of machine learning models and processing of
large datasets in applications like natural language processing or image recognition.
•Diverse Application Areas: Widely used in fields like scientific simulations, big data analytics,
weather forecasting, video rendering, and cryptography.
Parallel Processing Examples
Parallel
Processing
Why Use Parallel Computing?
• Save time and money:
In theory, throwing more resources at a task will shorten its time to completion, with potential cost
savings. Parallel clusters can be built from cheap, commodity components.
• Solve larger problems:
Many problems are so large and complex that it is impractical or impossible to solve them on a single
computer, especially given limited computer memory.
• Provide concurrency:
A single compute resource can only do one thing at a time. Multiple computing resources can be doing
many things simultaneously.
• Use of non-local resources:
Using computer resources on a wide area network, or even the Internet, when local computer resources
are scarce.
• Parallel computing allows one to solve problems that don't fit on a single CPU and solve problems that
can't be solved in a reasonable time.
Other Reasons Might Include:
1.Taking advantage of non-local resources:
Using available compute resources on a wide area network or even the Internet when local compute
resources are scarce.
2.Cost savings:
Using multiple "cheap" computing resources instead of paying for time on a supercomputer.
3.Overcoming memory constraints:
Single computers have very finite memory resources. For large problems, using the memories of
multiple computers may overcome this obstacle.
1.3 Motivating Parallelism
Importance of Parallelism:
•Parallelism has been essential for speeding up computing by handling multiple tasks simultaneously.
•It helps manage large amounts of data and provides faster access to storage in commercial applications.
Scalability and Cost Efficiency:
•Parallel computing systems offer better performance and are cost-effective.
•However, developing parallel hardware and software traditionally requires time and effort.
Challenges with Uniprocessors:
•While uniprocessors are improving, they may not keep up with the growing demand for faster and more
powerful computing.
•This highlights the need for parallel computing to overcome the limitations of single-processor systems.
•Advancements in Parallel Computing:
•Standardized programming tools, libraries, and hardware have made parallel computing more accessible
and efficient.
• From 1975, he revised the doubling period to 18 months, which came to be known as Moore's Law.
With more devices in a chip, the pressing issue is achieving increasing operations per second. A logical
solution is to rely on parallelism, both implicit and explicit.
Most serial processors rely extensively on implicit parallelism.
• Moore's Law:
• In 1965, Gordon Moore observed that the number of transistors on a chip doubles approximately every
two years, leading to faster and cheaper computing.
• In 1975, this doubling rate was adjusted to every 18 months, a trend known as Moore's Law.
• Challenge:
• As chips get more transistors, the key challenge is achieving more operations per second.
• Solution:
• Parallelism is the answer:
• Implicit Parallelism: Automatically managed by the processor.
• Explicit Parallelism: Designed directly into software and algorithms.
• Most processors today rely heavily on implicit parallelism for better performance.
2. The Memory / Disk Speed Argument
•Problem: Processors are getting faster (40% improvement per year), but memory (DRAM) is not keeping up (only 10%
improvement per year). This causes delays in performance.
•Solution: Parallel computing helps by:
• Increasing memory bandwidth (faster data flow between memory and processor).
• Using larger caches (temporary storage for quicker access).
• Optimizing how data is accessed (locality of reference) to reduce delays.
•Key Use: Parallel computing excels at moving data quickly between memory and storage, which is critical for modern
applications.
3. The Data Communication Argument
•Problem: Large-scale applications, like databases and data mining, generate enormous data volumes that cannot be
easily moved for analysis.
•Solution: Parallel computing enables analysis directly over the network, reducing the need to transfer data.
•Example: SETI@home, which uses the Internet as a global computing platform to search for extraterrestrial intelligence.
Difference between Parallel Computing and Distributed Computing:
Parallel and Distributed Computing Applications
•Scientific Simulations: Weather forecasting, climate modeling, and astrophysics
simulations leverage high-performance computing for faster results.
•Big Data Processing: Platforms like Apache Spark and Hadoop enable distributed
data processing for large-scale analytics.
•Machine Learning and AI: Training large neural networks and deep learning
models using GPU clusters and distributed frameworks (e.g., TensorFlow, PyTorch).
•Genomic Research: Genome sequencing and analysis rely on distributed systems
for processing massive biological datasets.
• Financial Modeling: Risk analysis, stock market predictions, and algorithmic trading utilize
parallel algorithms for real-time computations.
• Image and Video Processing: Parallel techniques process high-resolution images and videos
for tasks like object detection and rendering.
• Cryptography and Blockchain: Distributed systems provide the backbone for secure data
transmission and decentralized ledgers.
• Search Engines: Companies like Google use parallel and distributed computing for indexing
and retrieving vast amounts of web data.
• Healthcare Systems: Distributed computing aids medical imaging, telemedicine, and drug
discovery simulations.
• Gaming and Virtual Reality: Multiplayer gaming and VR use distributed computing to
synchronize data across networks in real time.