SlideShare una empresa de Scribd logo
1 de 22
PARALLEL
AGORITHMS
ABILITIES AND LIMITATIONS
MURTADHA AL-SABBAGH
PARALLEL ALGORITHMS ABILITES
THROGHPUT AND
LATENCY
• Throughput: Is the number of operations done per time
unit.
• Latency : Is the time needed to complete one operation.
EXAMPLE (THROUGHPUT
AND LATENCY)
Suppose we have two vehicles a car that can carry two
persons with an average speed of 200 km/h and a bus that can
carry 40 persons with a speed of 50 km/h , find the latency and
throughput if they both used to carry a group of people for a
distance of 4500 km ?
Car
• Latency =22.5
• Throughput=0.089
Bus
• Latency =90
• Throughput=0.45
THROUGHPUT AND
LATENCY
• We can use parallelism to increase throughput by using
a larger number of lower clocked processing units (as
in the GPU) which is well suited for computation intensive
applications ( applications with need of large number of
calculations such as image processing applications).
• Also we can use it in latency sensitive applications which
are applications with need of fast response (e.g.
Windows applications which many parts running together
at the same time). In this case we use a more powerful
processing units such as (Intel core i7).
• Throughput and latency often contradictory .
WHY USE PARALLEL
COMPUTING?
1) The Real World is Massively Parallel:
In the natural world, many complex, interrelated events are
happening at the same time, yet within a temporal sequence.
Compared to serial computing, parallel computing is much better
suited for modeling, simulating and understanding complex, real
world phenomena.
For example, imagine modeling these serially:
WHY USE PARALLEL
COMPUTING?
2)SAVE TIME AND/OR MONEY:
• In theory, throwing more resources at a task will shorten its time to
completion, with potential cost savings.
• Parallel computers can be built from cheap, commodity
components.
3) SOLVE LARGER / MORE COMPLEX PROBLEMS:
• Many problems are so large and/or complex that it is impractical
or impossible to solve them on a single computer, especially
given limited computer memory.
• Example: Web search engines/databases processing millions of
transactions per second
• Using compute resources on a wide area network, or even the
Internet when local compute resources are scarce or insufficient.
4) TAKE ADVANTAGE OF NON-LOCAL RESOURCES:
PARALLEL ALGORITHMS LIMITS
THE LIMITATIONS
We Face the following limitations when designing a parallel
program:
1. Amadahl’s law.
2. Complexity.
3. Portability.
4. Resource Requirements.
5. Scalability.
6. Parallel Slowdown
AMDAHL’S LAW
Amdahl’s law provides an upper bound on the speedup that can be
obtained by a parallel program
Let us suppose that a processor need an ‘n’ time units to complete ‘n’
operations .
And we have a program that have a ‘p’ part of parallizable code and ‘1-p’
or ‘s’ un-paralleizable part of code.
Then the processing time for a ‘N’ number of processors is :
𝑻 = 𝒏𝒔 +
𝒏𝒑
𝑵
=𝒏 𝟏 − 𝒑 +
𝒏𝒑
𝑵
And hence the speed up ratio will be calculated as a ratio between a
single processor time ‘Ts’ and an ‘N’ processors processing time ‘Tp’.
𝑺𝒑𝒆𝒆𝒅 𝒖𝒑 =
𝒏
𝒏 𝟏 − 𝒑 +
𝒏𝒑
𝑵
=
𝟏
𝟏 − 𝒑 +
𝒑
𝑵
AMDAHL’S LAW
Introducing the number of processors performing the parallel
fraction of work, the relationship can be modeled by:
𝑺𝒑𝒆𝒆𝒅 𝒖𝒑 =
𝟏
(𝟏 − 𝒑) +
𝒑
𝑵
N = number of processors and S = serial fraction
AMDAHL’S LAW
If we consider N is very large then :
𝑺𝒑𝒆𝒆𝒅 𝒖𝒑 = 𝟏
(𝟏 − 𝑷)
COMPLEXITY
The costs of complexity are measured in every aspect of the
software development cycle:
1. Design
2. Coding
• Data dependency
• Race conditions
3. Debugging
4. Tuning
5. Maintenance
DATA DEPENDENCY
Results from multiple use of the same location(s) in storage by
different tasks.
e.g.
for (int i=0;i<100;i++)
array[i]=array[i-1]*20;
How to Handle Data Dependencies:
• Distributed memory architectures - communicate required data at
synchronization points.
• Shared memory architectures -synchronize read/write operations
between tasks.
RACE CONDITION
Thread A Thread B
1A: Read variable V 1B: Read variable V
2A: Add 1 to variable V 2B: Add 1 to variable V
3A: Write back to variable V 3B: Write back to variable V
If instruction 1B is executed between 1A and 3A, or if
instruction 1A is executed between 1B and 3B, the program
will produce incorrect data. This is known as a race
condition.
SYCNCHRONIZATION
• Our program often requires "serialization" of segments of
the program.
• Synchronization is the solution for the above problems.
• To implement synchronization we use:
• Barrier .
• Locks .
• Synchronous communication operations .
PORTABILITY
Although there is several standardization APIs, such as MPI,
POSIX threads, and OpenMP, portability issues with parallel
programs are not as serious as in years past. However...
Operating systems can play a key role in code portability issues.
Hardware architectures are characteristically highly variable and
can affect portability.
RESOURCE
REQUIREMENTS
• The primary intent of parallel programming is to decrease
execution wall clock time, however in order to accomplish
this, more CPU time is required. For example, a parallel code
that runs in 1 hour on 8 processors actually uses 8 hours of
CPU time.
• The amount of memory required can be greater for parallel
codes than serial codes, due to the need to replicate data and
for overheads associated with parallel support libraries and
subsystems.
• For short running parallel programs, there can actually be a
decrease in performance compared to a similar serial
implementation. The overhead costs associated with setting
up the parallel environment, task creation, communications
and task termination can comprise a significant portion of the
total execution time for short runs.
SCALABILITY
Two types of scaling based on time to solution:
• Strong scaling: The total problem size stays fixed as more
processors are added.
• Weak scaling: The problem size per processor stays fixed as
more processors are added.
Hardware factors play a significant role in scalability. Examples:
• Memory-CPU bus bandwidth
• Amount of memory available on any given machine or set
of machines
• Processor clock speed
PARALLEL
SLOWDOWN
• Not all parallelization results in speed-up.
• Once task split up into multiple threads those threads
spend a large amount of time communicating among each
other resulting degradation in the system.
• This is known as parallel slowdown.
THANK YOU ~_^

Más contenido relacionado

La actualidad más candente

Stuart russell and peter norvig artificial intelligence - a modern approach...
Stuart russell and peter norvig   artificial intelligence - a modern approach...Stuart russell and peter norvig   artificial intelligence - a modern approach...
Stuart russell and peter norvig artificial intelligence - a modern approach...Lê Anh Đạt
 
HCI - Chapter 6
HCI - Chapter 6HCI - Chapter 6
HCI - Chapter 6Alan Dix
 
Algorithm and pseudocode conventions
Algorithm and pseudocode conventionsAlgorithm and pseudocode conventions
Algorithm and pseudocode conventionssaranyatdr
 
Distributed computing
Distributed computingDistributed computing
Distributed computingshivli0769
 
Dichotomy of parallel computing platforms
Dichotomy of parallel computing platformsDichotomy of parallel computing platforms
Dichotomy of parallel computing platformsSyed Zaid Irshad
 
Feng’s classification
Feng’s classificationFeng’s classification
Feng’s classificationNarayan Kandel
 
HCI 3e - Ch 13: Socio-organizational issues and stakeholder requirements
HCI 3e - Ch 13:  Socio-organizational issues and stakeholder requirementsHCI 3e - Ch 13:  Socio-organizational issues and stakeholder requirements
HCI 3e - Ch 13: Socio-organizational issues and stakeholder requirementsAlan Dix
 
HCI 3e - Ch 14: Communication and collaboration models
HCI 3e - Ch 14:  Communication and collaboration modelsHCI 3e - Ch 14:  Communication and collaboration models
HCI 3e - Ch 14: Communication and collaboration modelsAlan Dix
 
Limitations of memory system performance
Limitations of memory system performanceLimitations of memory system performance
Limitations of memory system performanceSyed Zaid Irshad
 
Distributed & parallel system
Distributed & parallel systemDistributed & parallel system
Distributed & parallel systemManish Singh
 
HCI - Chapter 3
HCI - Chapter 3HCI - Chapter 3
HCI - Chapter 3Alan Dix
 
Virtual reality in hci
Virtual reality in hciVirtual reality in hci
Virtual reality in hcijeet patalia
 
Operating system 02 os as an extended machine
Operating system 02 os as an extended machineOperating system 02 os as an extended machine
Operating system 02 os as an extended machineVaibhav Khanna
 
Human computer interaction -Input output channel
Human computer interaction -Input output channelHuman computer interaction -Input output channel
Human computer interaction -Input output channelN.Jagadish Kumar
 
Parallel computing
Parallel computingParallel computing
Parallel computingVinay Gupta
 

La actualidad más candente (20)

Parallel Computing
Parallel ComputingParallel Computing
Parallel Computing
 
Stuart russell and peter norvig artificial intelligence - a modern approach...
Stuart russell and peter norvig   artificial intelligence - a modern approach...Stuart russell and peter norvig   artificial intelligence - a modern approach...
Stuart russell and peter norvig artificial intelligence - a modern approach...
 
Parallel Algorithms
Parallel AlgorithmsParallel Algorithms
Parallel Algorithms
 
HCI - Chapter 6
HCI - Chapter 6HCI - Chapter 6
HCI - Chapter 6
 
Algorithm and pseudocode conventions
Algorithm and pseudocode conventionsAlgorithm and pseudocode conventions
Algorithm and pseudocode conventions
 
Distributed computing
Distributed computingDistributed computing
Distributed computing
 
Dichotomy of parallel computing platforms
Dichotomy of parallel computing platformsDichotomy of parallel computing platforms
Dichotomy of parallel computing platforms
 
Feng’s classification
Feng’s classificationFeng’s classification
Feng’s classification
 
HCI 3e - Ch 13: Socio-organizational issues and stakeholder requirements
HCI 3e - Ch 13:  Socio-organizational issues and stakeholder requirementsHCI 3e - Ch 13:  Socio-organizational issues and stakeholder requirements
HCI 3e - Ch 13: Socio-organizational issues and stakeholder requirements
 
HCI 3e - Ch 14: Communication and collaboration models
HCI 3e - Ch 14:  Communication and collaboration modelsHCI 3e - Ch 14:  Communication and collaboration models
HCI 3e - Ch 14: Communication and collaboration models
 
Limitations of memory system performance
Limitations of memory system performanceLimitations of memory system performance
Limitations of memory system performance
 
Component level design
Component   level designComponent   level design
Component level design
 
Distributed & parallel system
Distributed & parallel systemDistributed & parallel system
Distributed & parallel system
 
Parallel Processing Concepts
Parallel Processing Concepts Parallel Processing Concepts
Parallel Processing Concepts
 
HCI - Chapter 3
HCI - Chapter 3HCI - Chapter 3
HCI - Chapter 3
 
Virtual reality in hci
Virtual reality in hciVirtual reality in hci
Virtual reality in hci
 
Operating system 02 os as an extended machine
Operating system 02 os as an extended machineOperating system 02 os as an extended machine
Operating system 02 os as an extended machine
 
Human computer interaction -Input output channel
Human computer interaction -Input output channelHuman computer interaction -Input output channel
Human computer interaction -Input output channel
 
Flowshop scheduling
Flowshop schedulingFlowshop scheduling
Flowshop scheduling
 
Parallel computing
Parallel computingParallel computing
Parallel computing
 

Similar a Parallel Algorithms Advantages and Disadvantages

System models for distributed and cloud computing
System models for distributed and cloud computingSystem models for distributed and cloud computing
System models for distributed and cloud computingpurplesea
 
Simulation of Heterogeneous Cloud Infrastructures
Simulation of Heterogeneous Cloud InfrastructuresSimulation of Heterogeneous Cloud Infrastructures
Simulation of Heterogeneous Cloud InfrastructuresCloudLightning
 
Cloud Computing System models for Distributed and cloud computing & Performan...
Cloud Computing System models for Distributed and cloud computing & Performan...Cloud Computing System models for Distributed and cloud computing & Performan...
Cloud Computing System models for Distributed and cloud computing & Performan...hrmalik20
 
Cloud computing system models for distributed and cloud computing
Cloud computing system models for distributed and cloud computingCloud computing system models for distributed and cloud computing
Cloud computing system models for distributed and cloud computinghrmalik20
 
Scalable analytics for iaas cloud availability
Scalable analytics for iaas cloud availabilityScalable analytics for iaas cloud availability
Scalable analytics for iaas cloud availabilityPapitha Velumani
 
ICS 2410.Parallel.Sytsems.Lecture.Week 3.week5.pptx
ICS 2410.Parallel.Sytsems.Lecture.Week 3.week5.pptxICS 2410.Parallel.Sytsems.Lecture.Week 3.week5.pptx
ICS 2410.Parallel.Sytsems.Lecture.Week 3.week5.pptxjohnsmith96441
 
Unit 1 Computer organization and Instructions
Unit 1 Computer organization and InstructionsUnit 1 Computer organization and Instructions
Unit 1 Computer organization and InstructionsBalaji Vignesh
 
Multicore_Architecture Book.pdf
Multicore_Architecture Book.pdfMulticore_Architecture Book.pdf
Multicore_Architecture Book.pdfSwatantraPrakash5
 
5.7 Parallel Processing - Reactive Programming.pdf.pptx
5.7 Parallel Processing - Reactive Programming.pdf.pptx5.7 Parallel Processing - Reactive Programming.pdf.pptx
5.7 Parallel Processing - Reactive Programming.pdf.pptxMohamedBilal73
 
Parallel Computing-Part-1.pptx
Parallel Computing-Part-1.pptxParallel Computing-Part-1.pptx
Parallel Computing-Part-1.pptxkrnaween
 
01-MessagePassingFundamentals.ppt
01-MessagePassingFundamentals.ppt01-MessagePassingFundamentals.ppt
01-MessagePassingFundamentals.pptHarshitPal37
 
Parallel Computing - Lec 6
Parallel Computing - Lec 6Parallel Computing - Lec 6
Parallel Computing - Lec 6Shah Zaib
 
Parallel Computing - Lec 5
Parallel Computing - Lec 5Parallel Computing - Lec 5
Parallel Computing - Lec 5Shah Zaib
 
Performance Tuning by Dijesh P
Performance Tuning by Dijesh PPerformance Tuning by Dijesh P
Performance Tuning by Dijesh PPlusOrMinusZero
 
Task allocation on many core-multi processor distributed system
Task allocation on many core-multi processor distributed systemTask allocation on many core-multi processor distributed system
Task allocation on many core-multi processor distributed systemDeepak Shankar
 
3. Potential Benefits, Limits and Costs of Parallel Programming.pdf
3. Potential Benefits, Limits and Costs of Parallel Programming.pdf3. Potential Benefits, Limits and Costs of Parallel Programming.pdf
3. Potential Benefits, Limits and Costs of Parallel Programming.pdfMohamedAymen14
 
Chap 2 classification of parralel architecture and introduction to parllel p...
Chap 2  classification of parralel architecture and introduction to parllel p...Chap 2  classification of parralel architecture and introduction to parllel p...
Chap 2 classification of parralel architecture and introduction to parllel p...Malobe Lottin Cyrille Marcel
 

Similar a Parallel Algorithms Advantages and Disadvantages (20)

System models for distributed and cloud computing
System models for distributed and cloud computingSystem models for distributed and cloud computing
System models for distributed and cloud computing
 
Simulation of Heterogeneous Cloud Infrastructures
Simulation of Heterogeneous Cloud InfrastructuresSimulation of Heterogeneous Cloud Infrastructures
Simulation of Heterogeneous Cloud Infrastructures
 
Cloud Computing System models for Distributed and cloud computing & Performan...
Cloud Computing System models for Distributed and cloud computing & Performan...Cloud Computing System models for Distributed and cloud computing & Performan...
Cloud Computing System models for Distributed and cloud computing & Performan...
 
Cloud computing system models for distributed and cloud computing
Cloud computing system models for distributed and cloud computingCloud computing system models for distributed and cloud computing
Cloud computing system models for distributed and cloud computing
 
Scalable analytics for iaas cloud availability
Scalable analytics for iaas cloud availabilityScalable analytics for iaas cloud availability
Scalable analytics for iaas cloud availability
 
Lecture1
Lecture1Lecture1
Lecture1
 
ICS 2410.Parallel.Sytsems.Lecture.Week 3.week5.pptx
ICS 2410.Parallel.Sytsems.Lecture.Week 3.week5.pptxICS 2410.Parallel.Sytsems.Lecture.Week 3.week5.pptx
ICS 2410.Parallel.Sytsems.Lecture.Week 3.week5.pptx
 
Unit 1 Computer organization and Instructions
Unit 1 Computer organization and InstructionsUnit 1 Computer organization and Instructions
Unit 1 Computer organization and Instructions
 
Multicore_Architecture Book.pdf
Multicore_Architecture Book.pdfMulticore_Architecture Book.pdf
Multicore_Architecture Book.pdf
 
Resisting skew accumulation
Resisting skew accumulationResisting skew accumulation
Resisting skew accumulation
 
5.7 Parallel Processing - Reactive Programming.pdf.pptx
5.7 Parallel Processing - Reactive Programming.pdf.pptx5.7 Parallel Processing - Reactive Programming.pdf.pptx
5.7 Parallel Processing - Reactive Programming.pdf.pptx
 
Parallel Computing-Part-1.pptx
Parallel Computing-Part-1.pptxParallel Computing-Part-1.pptx
Parallel Computing-Part-1.pptx
 
01-MessagePassingFundamentals.ppt
01-MessagePassingFundamentals.ppt01-MessagePassingFundamentals.ppt
01-MessagePassingFundamentals.ppt
 
Parallel Computing - Lec 6
Parallel Computing - Lec 6Parallel Computing - Lec 6
Parallel Computing - Lec 6
 
Parallel Computing - Lec 5
Parallel Computing - Lec 5Parallel Computing - Lec 5
Parallel Computing - Lec 5
 
Performance Tuning by Dijesh P
Performance Tuning by Dijesh PPerformance Tuning by Dijesh P
Performance Tuning by Dijesh P
 
Task allocation on many core-multi processor distributed system
Task allocation on many core-multi processor distributed systemTask allocation on many core-multi processor distributed system
Task allocation on many core-multi processor distributed system
 
Chap2 slides
Chap2 slidesChap2 slides
Chap2 slides
 
3. Potential Benefits, Limits and Costs of Parallel Programming.pdf
3. Potential Benefits, Limits and Costs of Parallel Programming.pdf3. Potential Benefits, Limits and Costs of Parallel Programming.pdf
3. Potential Benefits, Limits and Costs of Parallel Programming.pdf
 
Chap 2 classification of parralel architecture and introduction to parllel p...
Chap 2  classification of parralel architecture and introduction to parllel p...Chap 2  classification of parralel architecture and introduction to parllel p...
Chap 2 classification of parralel architecture and introduction to parllel p...
 

Último

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Último (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Parallel Algorithms Advantages and Disadvantages

  • 3. THROGHPUT AND LATENCY • Throughput: Is the number of operations done per time unit. • Latency : Is the time needed to complete one operation.
  • 4. EXAMPLE (THROUGHPUT AND LATENCY) Suppose we have two vehicles a car that can carry two persons with an average speed of 200 km/h and a bus that can carry 40 persons with a speed of 50 km/h , find the latency and throughput if they both used to carry a group of people for a distance of 4500 km ? Car • Latency =22.5 • Throughput=0.089 Bus • Latency =90 • Throughput=0.45
  • 5. THROUGHPUT AND LATENCY • We can use parallelism to increase throughput by using a larger number of lower clocked processing units (as in the GPU) which is well suited for computation intensive applications ( applications with need of large number of calculations such as image processing applications). • Also we can use it in latency sensitive applications which are applications with need of fast response (e.g. Windows applications which many parts running together at the same time). In this case we use a more powerful processing units such as (Intel core i7). • Throughput and latency often contradictory .
  • 6. WHY USE PARALLEL COMPUTING? 1) The Real World is Massively Parallel: In the natural world, many complex, interrelated events are happening at the same time, yet within a temporal sequence. Compared to serial computing, parallel computing is much better suited for modeling, simulating and understanding complex, real world phenomena.
  • 7. For example, imagine modeling these serially:
  • 8. WHY USE PARALLEL COMPUTING? 2)SAVE TIME AND/OR MONEY: • In theory, throwing more resources at a task will shorten its time to completion, with potential cost savings. • Parallel computers can be built from cheap, commodity components. 3) SOLVE LARGER / MORE COMPLEX PROBLEMS: • Many problems are so large and/or complex that it is impractical or impossible to solve them on a single computer, especially given limited computer memory. • Example: Web search engines/databases processing millions of transactions per second • Using compute resources on a wide area network, or even the Internet when local compute resources are scarce or insufficient. 4) TAKE ADVANTAGE OF NON-LOCAL RESOURCES:
  • 10. THE LIMITATIONS We Face the following limitations when designing a parallel program: 1. Amadahl’s law. 2. Complexity. 3. Portability. 4. Resource Requirements. 5. Scalability. 6. Parallel Slowdown
  • 11. AMDAHL’S LAW Amdahl’s law provides an upper bound on the speedup that can be obtained by a parallel program Let us suppose that a processor need an ‘n’ time units to complete ‘n’ operations . And we have a program that have a ‘p’ part of parallizable code and ‘1-p’ or ‘s’ un-paralleizable part of code. Then the processing time for a ‘N’ number of processors is : 𝑻 = 𝒏𝒔 + 𝒏𝒑 𝑵 =𝒏 𝟏 − 𝒑 + 𝒏𝒑 𝑵 And hence the speed up ratio will be calculated as a ratio between a single processor time ‘Ts’ and an ‘N’ processors processing time ‘Tp’. 𝑺𝒑𝒆𝒆𝒅 𝒖𝒑 = 𝒏 𝒏 𝟏 − 𝒑 + 𝒏𝒑 𝑵 = 𝟏 𝟏 − 𝒑 + 𝒑 𝑵
  • 12. AMDAHL’S LAW Introducing the number of processors performing the parallel fraction of work, the relationship can be modeled by: 𝑺𝒑𝒆𝒆𝒅 𝒖𝒑 = 𝟏 (𝟏 − 𝒑) + 𝒑 𝑵 N = number of processors and S = serial fraction
  • 13. AMDAHL’S LAW If we consider N is very large then : 𝑺𝒑𝒆𝒆𝒅 𝒖𝒑 = 𝟏 (𝟏 − 𝑷)
  • 14. COMPLEXITY The costs of complexity are measured in every aspect of the software development cycle: 1. Design 2. Coding • Data dependency • Race conditions 3. Debugging 4. Tuning 5. Maintenance
  • 15. DATA DEPENDENCY Results from multiple use of the same location(s) in storage by different tasks. e.g. for (int i=0;i<100;i++) array[i]=array[i-1]*20; How to Handle Data Dependencies: • Distributed memory architectures - communicate required data at synchronization points. • Shared memory architectures -synchronize read/write operations between tasks.
  • 16. RACE CONDITION Thread A Thread B 1A: Read variable V 1B: Read variable V 2A: Add 1 to variable V 2B: Add 1 to variable V 3A: Write back to variable V 3B: Write back to variable V If instruction 1B is executed between 1A and 3A, or if instruction 1A is executed between 1B and 3B, the program will produce incorrect data. This is known as a race condition.
  • 17. SYCNCHRONIZATION • Our program often requires "serialization" of segments of the program. • Synchronization is the solution for the above problems. • To implement synchronization we use: • Barrier . • Locks . • Synchronous communication operations .
  • 18. PORTABILITY Although there is several standardization APIs, such as MPI, POSIX threads, and OpenMP, portability issues with parallel programs are not as serious as in years past. However... Operating systems can play a key role in code portability issues. Hardware architectures are characteristically highly variable and can affect portability.
  • 19. RESOURCE REQUIREMENTS • The primary intent of parallel programming is to decrease execution wall clock time, however in order to accomplish this, more CPU time is required. For example, a parallel code that runs in 1 hour on 8 processors actually uses 8 hours of CPU time. • The amount of memory required can be greater for parallel codes than serial codes, due to the need to replicate data and for overheads associated with parallel support libraries and subsystems. • For short running parallel programs, there can actually be a decrease in performance compared to a similar serial implementation. The overhead costs associated with setting up the parallel environment, task creation, communications and task termination can comprise a significant portion of the total execution time for short runs.
  • 20. SCALABILITY Two types of scaling based on time to solution: • Strong scaling: The total problem size stays fixed as more processors are added. • Weak scaling: The problem size per processor stays fixed as more processors are added. Hardware factors play a significant role in scalability. Examples: • Memory-CPU bus bandwidth • Amount of memory available on any given machine or set of machines • Processor clock speed
  • 21. PARALLEL SLOWDOWN • Not all parallelization results in speed-up. • Once task split up into multiple threads those threads spend a large amount of time communicating among each other resulting degradation in the system. • This is known as parallel slowdown.

Notas del editor

  1. The Same law in the next page except 8