SlideShare a Scribd company logo
Group Members
Hamza Zahid (131391)
Fahad Nadeem khan
Abdual Hannan
AIR UNIVERSITY
MULTAN CAMPUS
Shared memory VS Message passing
Topics
• Message passing
• Shared memory
• Difference b/w message passing and shared memory
Message Passing
INTRODUCTION
• The architecture is used to communicate data among a
set of processors without the need for a global memory
• Each PE has its own local memory and communicates
with other PE using message
MP network
Two important factors must be considered;
 Link bandwidth –the number of bits that can be transmitted per unit
of times(bits/s)
 Message transfer through the network
Process communication
Processes running on a given processor use what is called
internal channels to exchange messages among themselves
Processes running on different processors use the external
channesls to exchange messages
Data exchanged
Data exchanged among processors cannot be shared; it
is rather copied (using send/ receive messages)
An important advantage of this form of data exchange is
the elimination of the need for synchronization constructs
, such as semaphores , which results in performance
improvement
Message-Passing Interface – MPI
Standardization
 MPI is the only message passing library which can be
considered a standard. It is supported on virtually all HPC
platforms. Practically, it has replaced all previous message
passing libraries.
Portability
There is no need to modify your source code when you port
your application to a different platform that supports the MPI
standard
Message-Passing Interface – MPI
Performance Opportunities
 Vendor implementations should be able to exploit native hardware
features to optimize performance.
Functionality
 Over 115 routines are defined.
Availability
 A variety of implementations are available, both vendor and public
domain.
MPI basics
Start Processes
Send Messages
Receive Messages
Synchronize
With these four capabilities, you can construct any program.
MPI offers over 125 functions.
Shared memory
Introduction
 Processors communicate with shared address space
 Easy on small-scale machines
 Shared memory allows multiple processes to share virtual memory
space.
 This is the fastest but not necessarily the easiest (synchronization-
wise) way for processes to communicate with one another.
 In general, one process creates or allocates the shared memory
segment.
 The size and access permissions for the segment are set when it is
created.
Uniform Memory Access (UMA)
 Most commonly represented today by Symmetric Multiprocessor
(SMP) machines
 Identical processors
 Equal access and access times to memory
 Sometimes called CC-UMA - Cache Coherent UMA. Cache
coherent means if one processor updates a location in shared
memory, all the other processors know about the update. Cache
coherency is accomplished at the hardware level.
Shared Memory (UMA)
Non-Uniform Memory Access (NUMA)
 Often made by physically linking two or more SMPs
 One SMP can directly access memory of another SMP
 Not all processors have equal access time to all memories
 Memory access across link is slower
 If cache coherency is maintained, then may also be called CC-
NUMA - Cache Coherent NUMA
Shared Memory (NUMA)
Advantages
 Global address space provides a user-friendly programming
perspective to memory
 Model of choice for uniprocessors, small-scale MPs
 Ease of programming
 Lower latency
 Easier to use hardware controlled caching
 Data sharing between tasks is both fast and uniform due to the
proximity of memory to CPUs
Disadvantages
 Primary disadvantage is the lack of scalability between memory
and CPUs. Adding more CPUs can geometrically increases traffic
on the shared memory-CPU path, and for cache coherent
systems, geometrically increase traffic associated with
cache/memory management.
 Programmer responsibility for synchronization constructs that
ensure "correct" access of global memory.
 Expense: it becomes increasingly difficult and expensive to design
and produce shared memory machines with ever increasing
numbers of processors.
Difference
Message Passing vs. Shared Memory
• Difference: how communication is achieved between tasks
 Message passing programming model
– Explicit communication via messages
– Loose coupling of program components
– Analogy: telephone call or letter, no shared location accessible to all
 Shared memory programming model
– Implicit communication via memory operations (load/store)
– Tight coupling of program components
– Analogy: bulletin board, post information at a shared space
• Suitability of the programming model depends on the problem to be solved.
Issues affected by the model include:
 Overhead, scalability, ease of programming
Message Passing vs. Shared Memory Hardware
• Difference: how task communication is supported in hardware
 Shared memory hardware (or machine model)
– All processors see a global shared address space
• Ability to access all memory from each processor
– A write to a location is visible to the reads of other processors
 Message passing hardware (machine model)
– No global shared address space
– Send and receive variants are the only method of communication between
processors (much like networks of workstations today, i.e. clusters)
• Suitability of the hardware depends on the problem to be solved as well as the
programming model.
Programming Model vs. Architecture
• Machine  Programming Model
– Join at network, so program with message passing model
– Join at memory, so program with shared memory model
– Join at processor, so program with SIMD or data parallel
• Programming Model  Machine
– Message-passing programs on message-passing machine
– Shared-memory programs on shared-memory machine
– SIMD/data-parallel programs on SIMD/data-parallel machine
Separation of Model and Architecture
 Shared Memory
– Single shared address space
– Communicate, synchronize using load / store
– Can support message passing
 Message Passing
– Send / Receive
– Communication + synchronization
– Can support shared memory
message passing vs shared memory
message passing vs shared memory

More Related Content

What's hot

Cluster computing
Cluster computingCluster computing
Cluster computing
Raja' Masa'deh
 
Replication in Distributed Systems
Replication in Distributed SystemsReplication in Distributed Systems
Replication in Distributed Systems
Kavya Barnadhya Hazarika
 
Consistency protocols
Consistency protocolsConsistency protocols
Consistency protocols
ZongYing Lyu
 
Distributed Operating System_1
Distributed Operating System_1Distributed Operating System_1
Distributed Operating System_1
Dr Sandeep Kumar Poonia
 
Resource management
Resource managementResource management
Resource management
Dr Sandeep Kumar Poonia
 
Structure of shared memory space
Structure of shared memory spaceStructure of shared memory space
Structure of shared memory space
Coder Tech
 
System models in distributed system
System models in distributed systemSystem models in distributed system
System models in distributed system
ishapadhy
 
Processes and Processors in Distributed Systems
Processes and Processors in Distributed SystemsProcesses and Processors in Distributed Systems
Processes and Processors in Distributed Systems
Dr Sandeep Kumar Poonia
 
Load Balancing In Distributed Computing
Load Balancing In Distributed ComputingLoad Balancing In Distributed Computing
Load Balancing In Distributed Computing
Richa Singh
 
Distributed computing
Distributed computingDistributed computing
Distributed computingshivli0769
 
Message passing in Distributed Computing Systems
Message passing in Distributed Computing SystemsMessage passing in Distributed Computing Systems
Message passing in Distributed Computing Systems
Alagappa Govt Arts College, Karaikudi
 
Market oriented Cloud Computing
Market oriented Cloud ComputingMarket oriented Cloud Computing
Market oriented Cloud ComputingJithin Parakka
 
Unit 1 architecture of distributed systems
Unit 1 architecture of distributed systemsUnit 1 architecture of distributed systems
Unit 1 architecture of distributed systemskaran2190
 
Design Goals of Distributed System
Design Goals of Distributed SystemDesign Goals of Distributed System
Design Goals of Distributed System
Ashish KC
 
File models and file accessing models
File models and file accessing modelsFile models and file accessing models
File models and file accessing models
ishmecse13
 
Foult Tolerence In Distributed System
Foult Tolerence In Distributed SystemFoult Tolerence In Distributed System
Foult Tolerence In Distributed SystemRajan Kumar
 
Fault tolerance in distributed systems
Fault tolerance in distributed systemsFault tolerance in distributed systems
Fault tolerance in distributed systemssumitjain2013
 
CS9222 Advanced Operating System
CS9222 Advanced Operating SystemCS9222 Advanced Operating System
CS9222 Advanced Operating System
Kathirvel Ayyaswamy
 
Communication in Distributed Systems
Communication in Distributed SystemsCommunication in Distributed Systems
Communication in Distributed Systems
Dilum Bandara
 

What's hot (20)

Cluster computing
Cluster computingCluster computing
Cluster computing
 
Replication in Distributed Systems
Replication in Distributed SystemsReplication in Distributed Systems
Replication in Distributed Systems
 
Consistency protocols
Consistency protocolsConsistency protocols
Consistency protocols
 
Distributed Operating System_1
Distributed Operating System_1Distributed Operating System_1
Distributed Operating System_1
 
Resource management
Resource managementResource management
Resource management
 
Structure of shared memory space
Structure of shared memory spaceStructure of shared memory space
Structure of shared memory space
 
System models in distributed system
System models in distributed systemSystem models in distributed system
System models in distributed system
 
Processes and Processors in Distributed Systems
Processes and Processors in Distributed SystemsProcesses and Processors in Distributed Systems
Processes and Processors in Distributed Systems
 
Distributed deadlock
Distributed deadlockDistributed deadlock
Distributed deadlock
 
Load Balancing In Distributed Computing
Load Balancing In Distributed ComputingLoad Balancing In Distributed Computing
Load Balancing In Distributed Computing
 
Distributed computing
Distributed computingDistributed computing
Distributed computing
 
Message passing in Distributed Computing Systems
Message passing in Distributed Computing SystemsMessage passing in Distributed Computing Systems
Message passing in Distributed Computing Systems
 
Market oriented Cloud Computing
Market oriented Cloud ComputingMarket oriented Cloud Computing
Market oriented Cloud Computing
 
Unit 1 architecture of distributed systems
Unit 1 architecture of distributed systemsUnit 1 architecture of distributed systems
Unit 1 architecture of distributed systems
 
Design Goals of Distributed System
Design Goals of Distributed SystemDesign Goals of Distributed System
Design Goals of Distributed System
 
File models and file accessing models
File models and file accessing modelsFile models and file accessing models
File models and file accessing models
 
Foult Tolerence In Distributed System
Foult Tolerence In Distributed SystemFoult Tolerence In Distributed System
Foult Tolerence In Distributed System
 
Fault tolerance in distributed systems
Fault tolerance in distributed systemsFault tolerance in distributed systems
Fault tolerance in distributed systems
 
CS9222 Advanced Operating System
CS9222 Advanced Operating SystemCS9222 Advanced Operating System
CS9222 Advanced Operating System
 
Communication in Distributed Systems
Communication in Distributed SystemsCommunication in Distributed Systems
Communication in Distributed Systems
 

Viewers also liked

Lecture 6
Lecture  6Lecture  6
Lecture 6Mr SMAK
 
Cluster computing
Cluster computingCluster computing
Cluster computing
pooja khatana
 
Processes Control Block (Operating System)
Processes Control Block (Operating System)Processes Control Block (Operating System)
Processes Control Block (Operating System)Imdad Ullah
 
Data Flow Diagrams
Data Flow DiagramsData Flow Diagrams
Data Flow Diagrams
Sinhaa Yash
 

Viewers also liked (6)

Lecture 6
Lecture  6Lecture  6
Lecture 6
 
NUMA overview
NUMA overviewNUMA overview
NUMA overview
 
Cluster computing
Cluster computingCluster computing
Cluster computing
 
Processes Control Block (Operating System)
Processes Control Block (Operating System)Processes Control Block (Operating System)
Processes Control Block (Operating System)
 
message passing
 message passing message passing
message passing
 
Data Flow Diagrams
Data Flow DiagramsData Flow Diagrams
Data Flow Diagrams
 

Similar to message passing vs shared memory

Lecture 6
Lecture  6Lecture  6
Lecture 6Mr SMAK
 
Lecture 6
Lecture  6Lecture  6
Lecture 6Mr SMAK
 
PGAS Programming Model
PGAS Programming ModelPGAS Programming Model
PGAS Programming Model
ch adnan
 
01-MessagePassingFundamentals.ppt
01-MessagePassingFundamentals.ppt01-MessagePassingFundamentals.ppt
01-MessagePassingFundamentals.ppt
HarshitPal37
 
Symmetric multiprocessing and Microkernel
Symmetric multiprocessing and MicrokernelSymmetric multiprocessing and Microkernel
Symmetric multiprocessing and Microkernel
Manoraj Pannerselum
 
Cluster Computing
Cluster ComputingCluster Computing
Cluster Computing
BishowRajBaral
 
6.distributed shared memory
6.distributed shared memory6.distributed shared memory
6.distributed shared memory
Gd Goenka University
 
Distributed Shared Memory
Distributed Shared MemoryDistributed Shared Memory
Distributed Shared Memory
Prakhar Rastogi
 
Parallel computing
Parallel computingParallel computing
Parallel computing
Vinay Gupta
 
Lecture 2 more about parallel computing
Lecture 2   more about parallel computingLecture 2   more about parallel computing
Lecture 2 more about parallel computing
Vajira Thambawita
 
parallel programming models
 parallel programming models parallel programming models
parallel programming models
Swetha S
 
Communication model of parallel platforms
Communication model of parallel platformsCommunication model of parallel platforms
Communication model of parallel platforms
Syed Zaid Irshad
 
Unit5
Unit5Unit5
Unit5
Sneha Soni
 
Tutorial on Parallel Computing and Message Passing Model - C1
Tutorial on Parallel Computing and Message Passing Model - C1Tutorial on Parallel Computing and Message Passing Model - C1
Tutorial on Parallel Computing and Message Passing Model - C1Marcirio Chaves
 
Introduction to parallel processing
Introduction to parallel processingIntroduction to parallel processing
Introduction to parallel processing
Page Maker
 
Overview of Distributed Systems
Overview of Distributed SystemsOverview of Distributed Systems
Overview of Distributed Systems
vampugani
 
Chapter 10
Chapter 10Chapter 10
Distributed Shared Memory – A Survey and Implementation Using Openshmem
Distributed Shared Memory – A Survey and Implementation Using OpenshmemDistributed Shared Memory – A Survey and Implementation Using Openshmem
Distributed Shared Memory – A Survey and Implementation Using Openshmem
IJERA Editor
 
Distributed Shared Memory – A Survey and Implementation Using Openshmem
Distributed Shared Memory – A Survey and Implementation Using OpenshmemDistributed Shared Memory – A Survey and Implementation Using Openshmem
Distributed Shared Memory – A Survey and Implementation Using Openshmem
IJERA Editor
 
Parallel & Distributed processing
Parallel & Distributed processingParallel & Distributed processing
Parallel & Distributed processing
Syed Zaid Irshad
 

Similar to message passing vs shared memory (20)

Lecture 6
Lecture  6Lecture  6
Lecture 6
 
Lecture 6
Lecture  6Lecture  6
Lecture 6
 
PGAS Programming Model
PGAS Programming ModelPGAS Programming Model
PGAS Programming Model
 
01-MessagePassingFundamentals.ppt
01-MessagePassingFundamentals.ppt01-MessagePassingFundamentals.ppt
01-MessagePassingFundamentals.ppt
 
Symmetric multiprocessing and Microkernel
Symmetric multiprocessing and MicrokernelSymmetric multiprocessing and Microkernel
Symmetric multiprocessing and Microkernel
 
Cluster Computing
Cluster ComputingCluster Computing
Cluster Computing
 
6.distributed shared memory
6.distributed shared memory6.distributed shared memory
6.distributed shared memory
 
Distributed Shared Memory
Distributed Shared MemoryDistributed Shared Memory
Distributed Shared Memory
 
Parallel computing
Parallel computingParallel computing
Parallel computing
 
Lecture 2 more about parallel computing
Lecture 2   more about parallel computingLecture 2   more about parallel computing
Lecture 2 more about parallel computing
 
parallel programming models
 parallel programming models parallel programming models
parallel programming models
 
Communication model of parallel platforms
Communication model of parallel platformsCommunication model of parallel platforms
Communication model of parallel platforms
 
Unit5
Unit5Unit5
Unit5
 
Tutorial on Parallel Computing and Message Passing Model - C1
Tutorial on Parallel Computing and Message Passing Model - C1Tutorial on Parallel Computing and Message Passing Model - C1
Tutorial on Parallel Computing and Message Passing Model - C1
 
Introduction to parallel processing
Introduction to parallel processingIntroduction to parallel processing
Introduction to parallel processing
 
Overview of Distributed Systems
Overview of Distributed SystemsOverview of Distributed Systems
Overview of Distributed Systems
 
Chapter 10
Chapter 10Chapter 10
Chapter 10
 
Distributed Shared Memory – A Survey and Implementation Using Openshmem
Distributed Shared Memory – A Survey and Implementation Using OpenshmemDistributed Shared Memory – A Survey and Implementation Using Openshmem
Distributed Shared Memory – A Survey and Implementation Using Openshmem
 
Distributed Shared Memory – A Survey and Implementation Using Openshmem
Distributed Shared Memory – A Survey and Implementation Using OpenshmemDistributed Shared Memory – A Survey and Implementation Using Openshmem
Distributed Shared Memory – A Survey and Implementation Using Openshmem
 
Parallel & Distributed processing
Parallel & Distributed processingParallel & Distributed processing
Parallel & Distributed processing
 

Recently uploaded

How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 

Recently uploaded (20)

How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 

message passing vs shared memory

  • 1.
  • 2. Group Members Hamza Zahid (131391) Fahad Nadeem khan Abdual Hannan AIR UNIVERSITY MULTAN CAMPUS
  • 3. Shared memory VS Message passing
  • 4. Topics • Message passing • Shared memory • Difference b/w message passing and shared memory
  • 6. INTRODUCTION • The architecture is used to communicate data among a set of processors without the need for a global memory • Each PE has its own local memory and communicates with other PE using message
  • 7.
  • 8. MP network Two important factors must be considered;  Link bandwidth –the number of bits that can be transmitted per unit of times(bits/s)  Message transfer through the network
  • 9. Process communication Processes running on a given processor use what is called internal channels to exchange messages among themselves Processes running on different processors use the external channesls to exchange messages
  • 10. Data exchanged Data exchanged among processors cannot be shared; it is rather copied (using send/ receive messages) An important advantage of this form of data exchange is the elimination of the need for synchronization constructs , such as semaphores , which results in performance improvement
  • 11. Message-Passing Interface – MPI Standardization  MPI is the only message passing library which can be considered a standard. It is supported on virtually all HPC platforms. Practically, it has replaced all previous message passing libraries. Portability There is no need to modify your source code when you port your application to a different platform that supports the MPI standard
  • 12. Message-Passing Interface – MPI Performance Opportunities  Vendor implementations should be able to exploit native hardware features to optimize performance. Functionality  Over 115 routines are defined. Availability  A variety of implementations are available, both vendor and public domain.
  • 13. MPI basics Start Processes Send Messages Receive Messages Synchronize With these four capabilities, you can construct any program. MPI offers over 125 functions.
  • 15. Introduction  Processors communicate with shared address space  Easy on small-scale machines  Shared memory allows multiple processes to share virtual memory space.  This is the fastest but not necessarily the easiest (synchronization- wise) way for processes to communicate with one another.  In general, one process creates or allocates the shared memory segment.  The size and access permissions for the segment are set when it is created.
  • 16.
  • 17. Uniform Memory Access (UMA)  Most commonly represented today by Symmetric Multiprocessor (SMP) machines  Identical processors  Equal access and access times to memory  Sometimes called CC-UMA - Cache Coherent UMA. Cache coherent means if one processor updates a location in shared memory, all the other processors know about the update. Cache coherency is accomplished at the hardware level.
  • 19. Non-Uniform Memory Access (NUMA)  Often made by physically linking two or more SMPs  One SMP can directly access memory of another SMP  Not all processors have equal access time to all memories  Memory access across link is slower  If cache coherency is maintained, then may also be called CC- NUMA - Cache Coherent NUMA
  • 21. Advantages  Global address space provides a user-friendly programming perspective to memory  Model of choice for uniprocessors, small-scale MPs  Ease of programming  Lower latency  Easier to use hardware controlled caching  Data sharing between tasks is both fast and uniform due to the proximity of memory to CPUs
  • 22. Disadvantages  Primary disadvantage is the lack of scalability between memory and CPUs. Adding more CPUs can geometrically increases traffic on the shared memory-CPU path, and for cache coherent systems, geometrically increase traffic associated with cache/memory management.  Programmer responsibility for synchronization constructs that ensure "correct" access of global memory.  Expense: it becomes increasingly difficult and expensive to design and produce shared memory machines with ever increasing numbers of processors.
  • 24. Message Passing vs. Shared Memory • Difference: how communication is achieved between tasks  Message passing programming model – Explicit communication via messages – Loose coupling of program components – Analogy: telephone call or letter, no shared location accessible to all  Shared memory programming model – Implicit communication via memory operations (load/store) – Tight coupling of program components – Analogy: bulletin board, post information at a shared space • Suitability of the programming model depends on the problem to be solved. Issues affected by the model include:  Overhead, scalability, ease of programming
  • 25. Message Passing vs. Shared Memory Hardware • Difference: how task communication is supported in hardware  Shared memory hardware (or machine model) – All processors see a global shared address space • Ability to access all memory from each processor – A write to a location is visible to the reads of other processors  Message passing hardware (machine model) – No global shared address space – Send and receive variants are the only method of communication between processors (much like networks of workstations today, i.e. clusters) • Suitability of the hardware depends on the problem to be solved as well as the programming model.
  • 26. Programming Model vs. Architecture • Machine  Programming Model – Join at network, so program with message passing model – Join at memory, so program with shared memory model – Join at processor, so program with SIMD or data parallel • Programming Model  Machine – Message-passing programs on message-passing machine – Shared-memory programs on shared-memory machine – SIMD/data-parallel programs on SIMD/data-parallel machine
  • 27. Separation of Model and Architecture  Shared Memory – Single shared address space – Communicate, synchronize using load / store – Can support message passing  Message Passing – Send / Receive – Communication + synchronization – Can support shared memory