SlideShare a Scribd company logo
1 of 52
Chapter 11
MIMD programming
languages
Chapter 11
MIMD Programming Languages
• 11.1 Concurrent Pascal
• 11.2 Communicating Sequential Process CSP
• 11.3 occam
• 11.4 Ada
• 11.5 Sequent C
• 11.6 Linda,
• 11.7 Modular P
Introduction
• Only procedural, parallel programming languages for
MIMD systems will be dealt with in this chapter.
•
• Non-procedural parallel (functional and logic languages)
are treated in next chapters.
•
• The most important concepts are discussed and further
explained with programming examples (The individual
languages are only briefly introduced).
11.1 Concurrent Pascal
• The language is a parallel extension of the sequential
programming language (Except OCCAM, all others are an
extend of an existing sequential language).
• The Most important parallel concepts of concurrent Pascal
are:
• 1. The introduction of the process concept (declaration of
process types and corresponding variables, the processes).
• 2. The synchronization of parallel processes via monitors
with conditions (here called queue).
• 3. The introduction of classes (abstract data types).
11.2 Communicating sequential
process CSP
• A system consist of a number of parallel processes.
• Each process is executed sequentially, and they
communicate via data exchanges as necessary.
• Since all synchronization and communication between
processes in CSP is handled via messages, there is no need
for semaphores or monitors (Guarded command for
communication).
Parallel language constructs
• Page 95
•
• Program (page 95-96)
•
• Program for volume control 1(page 96)
•
• In order to allow a single process to send different
messages to VolCon, the example program has to be
changed considerably.
•
• Program for volume control 2 (page 97)
11.3 occam
• The occam language is a direct commercial successor of
CSP, and was developed by Inmos for transputers.
• Parallel Language construct.
• Page 98
• v := e assign the value of expression e to variable v,
• c ! e output the value of expression e to channel c,
• c ? v input from channel c to variable v.
• Alan figure 7
• SEQ sequential execution: component executed one after
the other.
• PAR parallel execution: components executed
concurrently.
• ALT alternative execution: first component ready is
executed.
• Alan page 15.
• Example (page 99).
•
• Page 99-100
•
• Program for volume control
11.4 Ada
• Language Constructs
•
• Page 101
•
• Program for volume control (page 102)
•
• Example Program(page 103)
11.5 Sequent C
• Parallel library functions
• Page 104,
• Sample Program page 104
•
• Figure 9.1 shows execution of the sample program.
• Example of iteration inside of Child Processes:
•
• Program page 105.
•
• Output of the Program page 106.
11.6 Linda
• Parallel Operations
• Page 106 - 107
• Figure 9.2 shows Linda’s tuple space
• Example program page 108-109
• When executing a read (RD) or input (IN) operation, three
different case can arise
• Cases page 109
• Implementation of semaphore by using a Landa primitive
• Initialization OUT (“sema”);
• Pi
• ….
• IN (“sema”);
• <critical section>
• OUT (“sema”);
• ….
•
• Program prime number generation page 109-110
• Figure 9.3 shows tuples from the prime number program.
• Pros and cons of Linda2s parallel language concepts
• Page 110-111
11.7 Modula P
• In Modula-P there are three types of module :
• Processor Modules: The initialization of whole process
system is being started in the processor module.
• High level modules (regular modules): At this level,
individual processes can be declared and started.
• Low level modules: This is lower level of a program is
only required when real time programming or machine
control must be carried out via direct memory addressing.
• Page 111-112 (gerekli deği)
• Parallel language construct
• Page 112-113.
• Example of monitor page 113.
• Programs page 114-115.
BIL406-Chapter-11-MIMD Programming Languages.ppt
BIL406-Chapter-11-MIMD Programming Languages.ppt
BIL406-Chapter-11-MIMD Programming Languages.ppt
BIL406-Chapter-11-MIMD Programming Languages.ppt
BIL406-Chapter-11-MIMD Programming Languages.ppt
BIL406-Chapter-11-MIMD Programming Languages.ppt

More Related Content

Similar to BIL406-Chapter-11-MIMD Programming Languages.ppt

Unit1 111206003944-phpapp02
Unit1 111206003944-phpapp02Unit1 111206003944-phpapp02
Unit1 111206003944-phpapp02
riddhi viradiya
 
Learn the java basic programming with example and syntaxchapter1-part-b.pptx
Learn the java basic programming with example and syntaxchapter1-part-b.pptxLearn the java basic programming with example and syntaxchapter1-part-b.pptx
Learn the java basic programming with example and syntaxchapter1-part-b.pptx
GaytriMate
 

Similar to BIL406-Chapter-11-MIMD Programming Languages.ppt (20)

Phases of compiler
Phases of compilerPhases of compiler
Phases of compiler
 
C program execution and algorithm
C program execution and algorithm C program execution and algorithm
C program execution and algorithm
 
Chap01-Intro.ppt
Chap01-Intro.pptChap01-Intro.ppt
Chap01-Intro.ppt
 
Compiler type
Compiler typeCompiler type
Compiler type
 
Compiler Design Introduction
Compiler Design Introduction Compiler Design Introduction
Compiler Design Introduction
 
Chapter 1.pptx
Chapter 1.pptxChapter 1.pptx
Chapter 1.pptx
 
Passes of Compiler.pptx
Passes of Compiler.pptxPasses of Compiler.pptx
Passes of Compiler.pptx
 
Lecture6
Lecture6Lecture6
Lecture6
 
.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3
 
Programming Fundamentals and Programming Languages Concepts Translators
Programming Fundamentals and Programming Languages Concepts TranslatorsProgramming Fundamentals and Programming Languages Concepts Translators
Programming Fundamentals and Programming Languages Concepts Translators
 
Compiler Construction
Compiler ConstructionCompiler Construction
Compiler Construction
 
Mainframe Virtual User Group Summer 2013
Mainframe Virtual User Group Summer 2013Mainframe Virtual User Group Summer 2013
Mainframe Virtual User Group Summer 2013
 
.Net Introduction
.Net Introduction.Net Introduction
.Net Introduction
 
Unit1 111206003944-phpapp02
Unit1 111206003944-phpapp02Unit1 111206003944-phpapp02
Unit1 111206003944-phpapp02
 
.Net framework
.Net framework.Net framework
.Net framework
 
Parallel language and compiler
Parallel language and compilerParallel language and compiler
Parallel language and compiler
 
week 2 - INTRO TO PROGRAMMING.pptx
week 2 - INTRO TO PROGRAMMING.pptxweek 2 - INTRO TO PROGRAMMING.pptx
week 2 - INTRO TO PROGRAMMING.pptx
 
Learn the java basic programming with example and syntaxchapter1-part-b.pptx
Learn the java basic programming with example and syntaxchapter1-part-b.pptxLearn the java basic programming with example and syntaxchapter1-part-b.pptx
Learn the java basic programming with example and syntaxchapter1-part-b.pptx
 
introduction to computer vision and image processing
introduction to computer vision and image processingintroduction to computer vision and image processing
introduction to computer vision and image processing
 
Lecture 01 introduction to compiler
Lecture 01 introduction to compilerLecture 01 introduction to compiler
Lecture 01 introduction to compiler
 

More from Kadri20

BIL406-Chapter-8-Asynchronous parallelism.ppt
BIL406-Chapter-8-Asynchronous parallelism.pptBIL406-Chapter-8-Asynchronous parallelism.ppt
BIL406-Chapter-8-Asynchronous parallelism.ppt
Kadri20
 
BIL406-Chapter-5-Network Structures.ppt
BIL406-Chapter-5-Network Structures.pptBIL406-Chapter-5-Network Structures.ppt
BIL406-Chapter-5-Network Structures.ppt
Kadri20
 
BIL406-Chapter-7-Superscalar and Superpipeline processors.ppt
BIL406-Chapter-7-Superscalar and Superpipeline  processors.pptBIL406-Chapter-7-Superscalar and Superpipeline  processors.ppt
BIL406-Chapter-7-Superscalar and Superpipeline processors.ppt
Kadri20
 
BIL406-Chapter-9-Synchronization and Communication in MIMD Systems.ppt
BIL406-Chapter-9-Synchronization and Communication in MIMD Systems.pptBIL406-Chapter-9-Synchronization and Communication in MIMD Systems.ppt
BIL406-Chapter-9-Synchronization and Communication in MIMD Systems.ppt
Kadri20
 
BIL406-Chapter-2-Classifications of Parallel Systems.ppt
BIL406-Chapter-2-Classifications of Parallel Systems.pptBIL406-Chapter-2-Classifications of Parallel Systems.ppt
BIL406-Chapter-2-Classifications of Parallel Systems.ppt
Kadri20
 
BIL406-Chapter-6-Basic Parallelism and CPU.ppt
BIL406-Chapter-6-Basic Parallelism and CPU.pptBIL406-Chapter-6-Basic Parallelism and CPU.ppt
BIL406-Chapter-6-Basic Parallelism and CPU.ppt
Kadri20
 
BIL406-Chapter-10-Problems with Asynchronous Parallelism.ppt
BIL406-Chapter-10-Problems with Asynchronous Parallelism.pptBIL406-Chapter-10-Problems with Asynchronous Parallelism.ppt
BIL406-Chapter-10-Problems with Asynchronous Parallelism.ppt
Kadri20
 
BIL406-Chapter-4-Parallel Processing Concept.ppt
BIL406-Chapter-4-Parallel Processing Concept.pptBIL406-Chapter-4-Parallel Processing Concept.ppt
BIL406-Chapter-4-Parallel Processing Concept.ppt
Kadri20
 
BIL406-Chapter-1-Introduction.ppt
BIL406-Chapter-1-Introduction.pptBIL406-Chapter-1-Introduction.ppt
BIL406-Chapter-1-Introduction.ppt
Kadri20
 
BIL406-Chapter-0-Introduction-Course.ppt
BIL406-Chapter-0-Introduction-Course.pptBIL406-Chapter-0-Introduction-Course.ppt
BIL406-Chapter-0-Introduction-Course.ppt
Kadri20
 

More from Kadri20 (10)

BIL406-Chapter-8-Asynchronous parallelism.ppt
BIL406-Chapter-8-Asynchronous parallelism.pptBIL406-Chapter-8-Asynchronous parallelism.ppt
BIL406-Chapter-8-Asynchronous parallelism.ppt
 
BIL406-Chapter-5-Network Structures.ppt
BIL406-Chapter-5-Network Structures.pptBIL406-Chapter-5-Network Structures.ppt
BIL406-Chapter-5-Network Structures.ppt
 
BIL406-Chapter-7-Superscalar and Superpipeline processors.ppt
BIL406-Chapter-7-Superscalar and Superpipeline  processors.pptBIL406-Chapter-7-Superscalar and Superpipeline  processors.ppt
BIL406-Chapter-7-Superscalar and Superpipeline processors.ppt
 
BIL406-Chapter-9-Synchronization and Communication in MIMD Systems.ppt
BIL406-Chapter-9-Synchronization and Communication in MIMD Systems.pptBIL406-Chapter-9-Synchronization and Communication in MIMD Systems.ppt
BIL406-Chapter-9-Synchronization and Communication in MIMD Systems.ppt
 
BIL406-Chapter-2-Classifications of Parallel Systems.ppt
BIL406-Chapter-2-Classifications of Parallel Systems.pptBIL406-Chapter-2-Classifications of Parallel Systems.ppt
BIL406-Chapter-2-Classifications of Parallel Systems.ppt
 
BIL406-Chapter-6-Basic Parallelism and CPU.ppt
BIL406-Chapter-6-Basic Parallelism and CPU.pptBIL406-Chapter-6-Basic Parallelism and CPU.ppt
BIL406-Chapter-6-Basic Parallelism and CPU.ppt
 
BIL406-Chapter-10-Problems with Asynchronous Parallelism.ppt
BIL406-Chapter-10-Problems with Asynchronous Parallelism.pptBIL406-Chapter-10-Problems with Asynchronous Parallelism.ppt
BIL406-Chapter-10-Problems with Asynchronous Parallelism.ppt
 
BIL406-Chapter-4-Parallel Processing Concept.ppt
BIL406-Chapter-4-Parallel Processing Concept.pptBIL406-Chapter-4-Parallel Processing Concept.ppt
BIL406-Chapter-4-Parallel Processing Concept.ppt
 
BIL406-Chapter-1-Introduction.ppt
BIL406-Chapter-1-Introduction.pptBIL406-Chapter-1-Introduction.ppt
BIL406-Chapter-1-Introduction.ppt
 
BIL406-Chapter-0-Introduction-Course.ppt
BIL406-Chapter-0-Introduction-Course.pptBIL406-Chapter-0-Introduction-Course.ppt
BIL406-Chapter-0-Introduction-Course.ppt
 

Recently uploaded

Artificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdfArtificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdf
Kira Dess
 
☎️Looking for Abortion Pills? Contact +27791653574.. 💊💊Available in Gaborone ...
☎️Looking for Abortion Pills? Contact +27791653574.. 💊💊Available in Gaborone ...☎️Looking for Abortion Pills? Contact +27791653574.. 💊💊Available in Gaborone ...
☎️Looking for Abortion Pills? Contact +27791653574.. 💊💊Available in Gaborone ...
mikehavy0
 

Recently uploaded (20)

Artificial Intelligence in due diligence
Artificial Intelligence in due diligenceArtificial Intelligence in due diligence
Artificial Intelligence in due diligence
 
Call for Papers - Journal of Electrical Systems (JES), E-ISSN: 1112-5209, ind...
Call for Papers - Journal of Electrical Systems (JES), E-ISSN: 1112-5209, ind...Call for Papers - Journal of Electrical Systems (JES), E-ISSN: 1112-5209, ind...
Call for Papers - Journal of Electrical Systems (JES), E-ISSN: 1112-5209, ind...
 
CLOUD COMPUTING SERVICES - Cloud Reference Modal
CLOUD COMPUTING SERVICES - Cloud Reference ModalCLOUD COMPUTING SERVICES - Cloud Reference Modal
CLOUD COMPUTING SERVICES - Cloud Reference Modal
 
Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdf
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
 
Path loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelPath loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata Model
 
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxSLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
 
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and ToolsMaximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
 
handbook on reinforce concrete and detailing
handbook on reinforce concrete and detailinghandbook on reinforce concrete and detailing
handbook on reinforce concrete and detailing
 
Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded Systems
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
Artificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdfArtificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdf
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptx
 
☎️Looking for Abortion Pills? Contact +27791653574.. 💊💊Available in Gaborone ...
☎️Looking for Abortion Pills? Contact +27791653574.. 💊💊Available in Gaborone ...☎️Looking for Abortion Pills? Contact +27791653574.. 💊💊Available in Gaborone ...
☎️Looking for Abortion Pills? Contact +27791653574.. 💊💊Available in Gaborone ...
 
Adsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptAdsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) ppt
 
analog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxanalog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptx
 
5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...
 
Passive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptPassive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.ppt
 
Signal Processing and Linear System Analysis
Signal Processing and Linear System AnalysisSignal Processing and Linear System Analysis
Signal Processing and Linear System Analysis
 

BIL406-Chapter-11-MIMD Programming Languages.ppt

  • 2. Chapter 11 MIMD Programming Languages • 11.1 Concurrent Pascal • 11.2 Communicating Sequential Process CSP • 11.3 occam • 11.4 Ada • 11.5 Sequent C • 11.6 Linda, • 11.7 Modular P
  • 3. Introduction • Only procedural, parallel programming languages for MIMD systems will be dealt with in this chapter. • • Non-procedural parallel (functional and logic languages) are treated in next chapters. • • The most important concepts are discussed and further explained with programming examples (The individual languages are only briefly introduced).
  • 4. 11.1 Concurrent Pascal • The language is a parallel extension of the sequential programming language (Except OCCAM, all others are an extend of an existing sequential language). • The Most important parallel concepts of concurrent Pascal are: • 1. The introduction of the process concept (declaration of process types and corresponding variables, the processes). • 2. The synchronization of parallel processes via monitors with conditions (here called queue). • 3. The introduction of classes (abstract data types).
  • 5. 11.2 Communicating sequential process CSP • A system consist of a number of parallel processes. • Each process is executed sequentially, and they communicate via data exchanges as necessary. • Since all synchronization and communication between processes in CSP is handled via messages, there is no need for semaphores or monitors (Guarded command for communication).
  • 6. Parallel language constructs • Page 95 • • Program (page 95-96) • • Program for volume control 1(page 96) • • In order to allow a single process to send different messages to VolCon, the example program has to be changed considerably. • • Program for volume control 2 (page 97)
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. 11.3 occam • The occam language is a direct commercial successor of CSP, and was developed by Inmos for transputers. • Parallel Language construct. • Page 98 • v := e assign the value of expression e to variable v, • c ! e output the value of expression e to channel c, • c ? v input from channel c to variable v. • Alan figure 7 • SEQ sequential execution: component executed one after the other.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18. • PAR parallel execution: components executed concurrently. • ALT alternative execution: first component ready is executed. • Alan page 15. • Example (page 99). • • Page 99-100 • • Program for volume control
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25. 11.4 Ada • Language Constructs • • Page 101 • • Program for volume control (page 102) • • Example Program(page 103)
  • 26.
  • 27.
  • 28.
  • 29.
  • 30. 11.5 Sequent C • Parallel library functions • Page 104, • Sample Program page 104 • • Figure 9.1 shows execution of the sample program. • Example of iteration inside of Child Processes: • • Program page 105. • • Output of the Program page 106.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36. 11.6 Linda • Parallel Operations • Page 106 - 107 • Figure 9.2 shows Linda’s tuple space • Example program page 108-109 • When executing a read (RD) or input (IN) operation, three different case can arise • Cases page 109 • Implementation of semaphore by using a Landa primitive • Initialization OUT (“sema”);
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42. • Pi • …. • IN (“sema”); • <critical section> • OUT (“sema”); • …. • • Program prime number generation page 109-110 • Figure 9.3 shows tuples from the prime number program. • Pros and cons of Linda2s parallel language concepts • Page 110-111
  • 43.
  • 44.
  • 45.
  • 46. 11.7 Modula P • In Modula-P there are three types of module : • Processor Modules: The initialization of whole process system is being started in the processor module. • High level modules (regular modules): At this level, individual processes can be declared and started. • Low level modules: This is lower level of a program is only required when real time programming or machine control must be carried out via direct memory addressing. • Page 111-112 (gerekli deği) • Parallel language construct • Page 112-113. • Example of monitor page 113. • Programs page 114-115.