SlideShare a Scribd company logo
1 of 12
Parallel programming in the
parallel virtual machine
Submitted by
N.Jayanthi
Msc(cs)
 Change at any time during computation.
 Groups are useful in cases when a collective operation is
performed on only a subset of the task.
 A broadcast operation,which sends a message to all tasks
in a system,can use a named group to send a message to
only the members of this group.
 A task may join or leave a group at any time without
informing other tasks in the group.
 A task may also belong to multiple groups.
 PVM provides several functions for tasks to join and leave
a group,and retrieve information about other groups.
i = pvm_joingroup(group_name)
 Group named group_name.
 Created pvm_joingroup is called for the first time.
 The first caller gets 0 as instance number.
 Starts at 0 and is incremented by 1 every time a new task
join the group.
 Set of instance numbers may have gaps sas a result of
having one or more tasks leave the group.
 New member will get the lowest available instance
number.
 Maintaining a set of instance numbers without gaps is the
programmers responsibility.
info = pvm_lvgroup(group_name)
 Leave the group group_name.
 info will have a negative value.
 Task decides to rejoin this group at a later time, it
may get a different instance number because the
old number may have been assigned to another
task that may have joined.
 There are a number of other functions that can be
called by any task to retrieve information without
having to be a member of the specified group.
 Function pvm_gsize() can be used to retrieve the
size of a group.
 It takes as input the group name and returns the
number of members in the group.
 The function pvm_gettid() is provided to retrieve
the TIP of a task given its instance number and its
groupname.
 Function pvm_getinst() retrieves the instance
number of a tasjk its TIP and the name of a group
Synchronization constructs can be used to force
a certain order of execution among the
activities in a parallel program.
Synchronization in PVM can be achieved using
several constructs,most notably blocking
receive and barrier operations.
Example:
 Member of a group that finish their work
early may need to wait at a synchornization
point until those tasks that take a longer time
reach the same point.
 Message passing can be used effectively to force
precedence constraints among tasks.
 The blocking receive operation (pvm_recv())
forces the receiving task to wait until a matching
message is received.
 Sender of this matching message may hold its
message as long as it wants the receiver to wait
Two task: T0 and T1
 function g() in T1 is not executed until T0 has completed
the execution of the function f().
 order of execution using a send operation after calling f()
in T0 and a matching blocking receive operation before
calling g() in T1.
f()
Pvm_s end(200,t ag)
T0
(TIP=100)
Pvm_r ecv(100,t ag)
g()
T1
(TID=200)
 Parallel tasks can be sychronized through the use
of synchronization points called barriers.
 Members of a group can choose to wait at a barrier
until a specified number of group members check
in at that barrier.
 Function:
info=pvm_barrier(group_name,ntasks)
 Two input: group name ,number of group members
Group slave(T0,T1,T2)
Info=pvm_barrier T1 T2
PVM_barrier(“slave”,3)
PVM_barrier(“slave”,3)
PVM_barrier(“slave”,3)
wait
wait
proceed proceed proceed
Group: slave
T0
parallel programming in tthe PVM-advanced system architecture

More Related Content

What's hot

Programming in Java: Why Object-Orientation?
Programming in Java: Why Object-Orientation?Programming in Java: Why Object-Orientation?
Programming in Java: Why Object-Orientation?Martin Chapman
 
Fourier transforms of discrete signals (DSP) 5
Fourier transforms of discrete signals (DSP) 5Fourier transforms of discrete signals (DSP) 5
Fourier transforms of discrete signals (DSP) 5HIMANSHU DIWAKAR
 
Analysis of single server fixed batch service queueing system under multiple ...
Analysis of single server fixed batch service queueing system under multiple ...Analysis of single server fixed batch service queueing system under multiple ...
Analysis of single server fixed batch service queueing system under multiple ...Alexander Decker
 
Determination of DTFT | Computer Science
Determination of DTFT | Computer ScienceDetermination of DTFT | Computer Science
Determination of DTFT | Computer ScienceTransweb Global Inc
 
Using message queues for distributed computing on Kubernetes
Using message queues for distributed computing on KubernetesUsing message queues for distributed computing on Kubernetes
Using message queues for distributed computing on KubernetesSelin Gungor
 
Data and computer communication exam i
Data and computer communication exam iData and computer communication exam i
Data and computer communication exam iAndrew Ibrahim
 
Continuous Architecting of Stream-Based Systems
Continuous Architecting of Stream-Based SystemsContinuous Architecting of Stream-Based Systems
Continuous Architecting of Stream-Based SystemsCHOOSE
 
Dc assignment 2
Dc assignment 2Dc assignment 2
Dc assignment 2H K
 
Usage of Moving Average
Usage of Moving AverageUsage of Moving Average
Usage of Moving AverageKwanghee Choi
 
Data and computer communication exam lll
Data and computer communication exam lllData and computer communication exam lll
Data and computer communication exam lllAndrew Ibrahim
 
Presentation
PresentationPresentation
PresentationLior Boim
 
DL for setence classification project presentation
DL for setence classification project presentationDL for setence classification project presentation
DL for setence classification project presentationHoàng Triều Trịnh
 

What's hot (19)

Programming in Java: Why Object-Orientation?
Programming in Java: Why Object-Orientation?Programming in Java: Why Object-Orientation?
Programming in Java: Why Object-Orientation?
 
Fourier transforms of discrete signals (DSP) 5
Fourier transforms of discrete signals (DSP) 5Fourier transforms of discrete signals (DSP) 5
Fourier transforms of discrete signals (DSP) 5
 
Intake 37 12
Intake 37 12Intake 37 12
Intake 37 12
 
Analysis of single server fixed batch service queueing system under multiple ...
Analysis of single server fixed batch service queueing system under multiple ...Analysis of single server fixed batch service queueing system under multiple ...
Analysis of single server fixed batch service queueing system under multiple ...
 
Determination of DTFT | Computer Science
Determination of DTFT | Computer ScienceDetermination of DTFT | Computer Science
Determination of DTFT | Computer Science
 
Using message queues for distributed computing on Kubernetes
Using message queues for distributed computing on KubernetesUsing message queues for distributed computing on Kubernetes
Using message queues for distributed computing on Kubernetes
 
Data and computer communication exam i
Data and computer communication exam iData and computer communication exam i
Data and computer communication exam i
 
Continuous Architecting of Stream-Based Systems
Continuous Architecting of Stream-Based SystemsContinuous Architecting of Stream-Based Systems
Continuous Architecting of Stream-Based Systems
 
Dc assignment 2
Dc assignment 2Dc assignment 2
Dc assignment 2
 
Usage of Moving Average
Usage of Moving AverageUsage of Moving Average
Usage of Moving Average
 
MPI Tutorial
MPI TutorialMPI Tutorial
MPI Tutorial
 
Data and computer communication exam lll
Data and computer communication exam lllData and computer communication exam lll
Data and computer communication exam lll
 
Multithreading
MultithreadingMultithreading
Multithreading
 
EEL316: PAM TDM
EEL316: PAM TDMEEL316: PAM TDM
EEL316: PAM TDM
 
21 multi threading - iii
21 multi threading - iii21 multi threading - iii
21 multi threading - iii
 
Embedded-Project
Embedded-ProjectEmbedded-Project
Embedded-Project
 
EC561
EC561EC561
EC561
 
Presentation
PresentationPresentation
Presentation
 
DL for setence classification project presentation
DL for setence classification project presentationDL for setence classification project presentation
DL for setence classification project presentation
 

Similar to parallel programming in tthe PVM-advanced system architecture

Intro to MPI
Intro to MPIIntro to MPI
Intro to MPIjbp4444
 
parallel programming in the PVM-Reduction operation-advanced system architecture
parallel programming in the PVM-Reduction operation-advanced system architectureparallel programming in the PVM-Reduction operation-advanced system architecture
parallel programming in the PVM-Reduction operation-advanced system architectureRoslinJoseph
 
The Ring programming language version 1.5.1 book - Part 174 of 180
The Ring programming language version 1.5.1 book - Part 174 of 180 The Ring programming language version 1.5.1 book - Part 174 of 180
The Ring programming language version 1.5.1 book - Part 174 of 180 Mahmoud Samir Fayed
 
Generators & Decorators.pptx
Generators & Decorators.pptxGenerators & Decorators.pptx
Generators & Decorators.pptxIrfanShaik98
 
Usp message queues
Usp message queuesUsp message queues
Usp message queuesRohitK71
 
Chapter 5 - THREADING & REGULAR exp - MAULIK BORSANIYA
Chapter 5 - THREADING & REGULAR exp - MAULIK BORSANIYAChapter 5 - THREADING & REGULAR exp - MAULIK BORSANIYA
Chapter 5 - THREADING & REGULAR exp - MAULIK BORSANIYAMaulik Borsaniya
 
CMPE2300 – Lab01 - Defrag-o-maticIn this lab you will crea.docx
CMPE2300 – Lab01 - Defrag-o-maticIn this lab you will crea.docxCMPE2300 – Lab01 - Defrag-o-maticIn this lab you will crea.docx
CMPE2300 – Lab01 - Defrag-o-maticIn this lab you will crea.docxmary772
 
The Ring programming language version 1.9 book - Part 98 of 210
The Ring programming language version 1.9 book - Part 98 of 210The Ring programming language version 1.9 book - Part 98 of 210
The Ring programming language version 1.9 book - Part 98 of 210Mahmoud Samir Fayed
 
C basic questions&ansrs by shiva kumar kella
C basic questions&ansrs by shiva kumar kellaC basic questions&ansrs by shiva kumar kella
C basic questions&ansrs by shiva kumar kellaManoj Kumar kothagulla
 
maXbox Starter 36 Software Testing
maXbox Starter 36 Software TestingmaXbox Starter 36 Software Testing
maXbox Starter 36 Software TestingMax Kleiner
 
Assg 11 Priority Queues and Queue ApplicationsCOSC 2336 S.docx
Assg 11 Priority Queues and Queue ApplicationsCOSC 2336 S.docxAssg 11 Priority Queues and Queue ApplicationsCOSC 2336 S.docx
Assg 11 Priority Queues and Queue ApplicationsCOSC 2336 S.docxcargillfilberto
 
Android service, aidl - day 1
Android service, aidl - day 1Android service, aidl - day 1
Android service, aidl - day 1Utkarsh Mankad
 
parallel programming in the PVM- task creation-Advanced system architecture
parallel programming in the PVM- task creation-Advanced system architectureparallel programming in the PVM- task creation-Advanced system architecture
parallel programming in the PVM- task creation-Advanced system architectureRoslinJoseph
 

Similar to parallel programming in tthe PVM-advanced system architecture (20)

Intro to MPI
Intro to MPIIntro to MPI
Intro to MPI
 
parallel programming in the PVM-Reduction operation-advanced system architecture
parallel programming in the PVM-Reduction operation-advanced system architectureparallel programming in the PVM-Reduction operation-advanced system architecture
parallel programming in the PVM-Reduction operation-advanced system architecture
 
The Ring programming language version 1.5.1 book - Part 174 of 180
The Ring programming language version 1.5.1 book - Part 174 of 180 The Ring programming language version 1.5.1 book - Part 174 of 180
The Ring programming language version 1.5.1 book - Part 174 of 180
 
slides9.ppt
slides9.pptslides9.ppt
slides9.ppt
 
Generators & Decorators.pptx
Generators & Decorators.pptxGenerators & Decorators.pptx
Generators & Decorators.pptx
 
Distributed System
Distributed System Distributed System
Distributed System
 
Maxbox starter
Maxbox starterMaxbox starter
Maxbox starter
 
Usp message queues
Usp message queuesUsp message queues
Usp message queues
 
Chapter 5 - THREADING & REGULAR exp - MAULIK BORSANIYA
Chapter 5 - THREADING & REGULAR exp - MAULIK BORSANIYAChapter 5 - THREADING & REGULAR exp - MAULIK BORSANIYA
Chapter 5 - THREADING & REGULAR exp - MAULIK BORSANIYA
 
CMPE2300 – Lab01 - Defrag-o-maticIn this lab you will crea.docx
CMPE2300 – Lab01 - Defrag-o-maticIn this lab you will crea.docxCMPE2300 – Lab01 - Defrag-o-maticIn this lab you will crea.docx
CMPE2300 – Lab01 - Defrag-o-maticIn this lab you will crea.docx
 
The Ring programming language version 1.9 book - Part 98 of 210
The Ring programming language version 1.9 book - Part 98 of 210The Ring programming language version 1.9 book - Part 98 of 210
The Ring programming language version 1.9 book - Part 98 of 210
 
C basic questions&ansrs by shiva kumar kella
C basic questions&ansrs by shiva kumar kellaC basic questions&ansrs by shiva kumar kella
C basic questions&ansrs by shiva kumar kella
 
Pdp12
Pdp12Pdp12
Pdp12
 
Vb.net iv
Vb.net ivVb.net iv
Vb.net iv
 
maXbox Starter 36 Software Testing
maXbox Starter 36 Software TestingmaXbox Starter 36 Software Testing
maXbox Starter 36 Software Testing
 
Assg 11 Priority Queues and Queue ApplicationsCOSC 2336 S.docx
Assg 11 Priority Queues and Queue ApplicationsCOSC 2336 S.docxAssg 11 Priority Queues and Queue ApplicationsCOSC 2336 S.docx
Assg 11 Priority Queues and Queue ApplicationsCOSC 2336 S.docx
 
Android service, aidl - day 1
Android service, aidl - day 1Android service, aidl - day 1
Android service, aidl - day 1
 
parallel programming in the PVM- task creation-Advanced system architecture
parallel programming in the PVM- task creation-Advanced system architectureparallel programming in the PVM- task creation-Advanced system architecture
parallel programming in the PVM- task creation-Advanced system architecture
 
An adaptive framework towards analyzing the parallel merge sort
An adaptive framework towards analyzing the parallel merge sortAn adaptive framework towards analyzing the parallel merge sort
An adaptive framework towards analyzing the parallel merge sort
 
Intake 37 5
Intake 37 5Intake 37 5
Intake 37 5
 

Recently uploaded

18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 

Recently uploaded (20)

Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 

parallel programming in tthe PVM-advanced system architecture

  • 1. Parallel programming in the parallel virtual machine Submitted by N.Jayanthi Msc(cs)
  • 2.  Change at any time during computation.  Groups are useful in cases when a collective operation is performed on only a subset of the task.
  • 3.  A broadcast operation,which sends a message to all tasks in a system,can use a named group to send a message to only the members of this group.  A task may join or leave a group at any time without informing other tasks in the group.  A task may also belong to multiple groups.  PVM provides several functions for tasks to join and leave a group,and retrieve information about other groups.
  • 4. i = pvm_joingroup(group_name)  Group named group_name.  Created pvm_joingroup is called for the first time.  The first caller gets 0 as instance number.  Starts at 0 and is incremented by 1 every time a new task join the group.  Set of instance numbers may have gaps sas a result of having one or more tasks leave the group.  New member will get the lowest available instance number.  Maintaining a set of instance numbers without gaps is the programmers responsibility.
  • 5. info = pvm_lvgroup(group_name)  Leave the group group_name.  info will have a negative value.  Task decides to rejoin this group at a later time, it may get a different instance number because the old number may have been assigned to another task that may have joined.  There are a number of other functions that can be called by any task to retrieve information without having to be a member of the specified group.
  • 6.  Function pvm_gsize() can be used to retrieve the size of a group.  It takes as input the group name and returns the number of members in the group.  The function pvm_gettid() is provided to retrieve the TIP of a task given its instance number and its groupname.  Function pvm_getinst() retrieves the instance number of a tasjk its TIP and the name of a group
  • 7. Synchronization constructs can be used to force a certain order of execution among the activities in a parallel program. Synchronization in PVM can be achieved using several constructs,most notably blocking receive and barrier operations. Example:  Member of a group that finish their work early may need to wait at a synchornization point until those tasks that take a longer time reach the same point.
  • 8.  Message passing can be used effectively to force precedence constraints among tasks.  The blocking receive operation (pvm_recv()) forces the receiving task to wait until a matching message is received.  Sender of this matching message may hold its message as long as it wants the receiver to wait
  • 9. Two task: T0 and T1  function g() in T1 is not executed until T0 has completed the execution of the function f().  order of execution using a send operation after calling f() in T0 and a matching blocking receive operation before calling g() in T1. f() Pvm_s end(200,t ag) T0 (TIP=100) Pvm_r ecv(100,t ag) g() T1 (TID=200)
  • 10.  Parallel tasks can be sychronized through the use of synchronization points called barriers.  Members of a group can choose to wait at a barrier until a specified number of group members check in at that barrier.  Function: info=pvm_barrier(group_name,ntasks)  Two input: group name ,number of group members
  • 11. Group slave(T0,T1,T2) Info=pvm_barrier T1 T2 PVM_barrier(“slave”,3) PVM_barrier(“slave”,3) PVM_barrier(“slave”,3) wait wait proceed proceed proceed Group: slave T0