SlideShare a Scribd company logo
Data Parallel Model
An Overview
Content taken from.
A book by Naresh Jotwani & Kai Hwang
Part IV Software for Parallel Programming
Chapter 10). Parallel Models, Languages, and Compilers
Parallel Programming Models
10.1.1 Shared Variable Model
10.1.2 Message Passing Model
Special Thanks to
Dr. Preeti Aggarwal
ASSISTANT PROFESSOR
Tutorials Point
Data-Parallel Model
Created and presented by:
Nikhil Sharma
M.E CSE 1st year
Roll no (19-311)
July 2019- Dec 2019 Session
Title Anatomy
• Data
• Parallel Model
Programming Model
A collection of program abstractions providing a programmer a
simplified and transparent view of the computer
Hardware/software system.
Parallel programming models are specifically designed for
multiprocessors, multicomputer, or vector SIMD computers.
Lockstep Operation
THIS
PROVIDES ATOMICITY
STATE 1--------- STATE 2
NOTHING IN B/W
set of changes (new inputs, new outputs, new state)
SIMD
• Parallelism is explicitly handled by hardware synchronization and flow
control.
• Choice of Data structure Figure courtesy: [2]
Main Focus
( local computations and data routing operation)
Where data-parallel programming is used ?
• Fine Grain
Figure courtesy : ACA, Naresh kotwani
Single Instruction, Multiple Data (SIMD)
• Single instruction:All processing units execute the same
instruction at any given clock cycle
• Multiple data: Each processing unit can operate on a different data element
• Best suited for specialized problems characterized by a high degree of regularity, such as
image processing.
• Two varieties: Processor Arrays and Vector Pipelines
• Examples:
• Processor Arrays: Connection Machine CM-2, Maspar MP-1, MP-2
• Vector Pipelines: IBM 9000, Cray C90, Fujitsu VP, NEC SX-2, Hitachi S820
Simplified View
Figure courtesy: [1]
Data parallelism
• If you want to see data parallelism
•SIMD
•SPMD Multicomputer
Data parallelism
• Challenge
• Matching of problem size with fixed machine size
• Ex. Partitioning of large arrays or matrixes in to 64 –
element segments.
SCIENTIST BE LIKE
Synhronization
• Data – parallel operation is done at
COMPILE TIME
Instead of
RUN TIME
Hardware synchronization: Enforced by control unit and LOCKSTEP execution.
Synchronous SIMD
• Lockstep fashion
• Do not have mutual exclusion or synchronization problem associated
with multiprocessors or multicomputer
• Inter-PE directly controlled by hardware
• Inter-PE data communication is also carried by lockstep
• Spatial Parallelism
Parallelism Example
• What is the latency and throughput if Ben uses parallelism?
• Spatial parallelism: Ben asks Allysa to help, using her own oven
• Temporal parallelism: Ben breaks the task into two stages: roll and
baking. He uses two trays. While the first batch is baking he rolls
the second batch, and so on.
Spatial Parallelism
Spatial
Parallelism
Roll
Bake
Ben 1 Ben 1
Alyssa 1 Alyssa 1
Ben 2 Ben 2
Alyssa 2 Alyssa 2
Time
0 5 10 15 20 25 30 35 40 45 50
Tray 1
Tray 2
Tray 3
Tray 4
Latency:
time to
first tray
Legend
Latency = ?
Throughput = ?
Spatial Parallelism
Spatial
Parallelism
Roll
Bake
Ben 1 Ben 1
Alyssa 1 Alyssa 1
Ben 2 Ben 2
Alyssa 2 Alyssa 2
Time
0 5 10 15 20 25 30 35 40 45 50
Tray 1
Tray 2
Tray 3
Tray 4
Latency:
time to
first tray
Legend
Latency = 5 + 15 = 20 minutes = 1/3 hour (same)
Throughput = 2 trays/ 1/3 hour = 6 trays/hour (doubled)
SIMD--- SCALAR v/s VECTOR
• Scalar are directly executed by the control unit.
• Vector are broadcast to all processing elements.
• (because vector operands are located at different location-PE)
Array Language Extensions
Array extensions in data parallel languages are represented by high-level
data types.
Enables the removal of some nested loops in the code.
global address space, which obviates the need for explicit data routing between PEs
In computer science, array programming refers to solutions which allow the
application of operations to an entire set of values at once. Such solutions are
commonly used in scientific and engineering settings. (source wiki ) Fortan 77
Compiler Support
• facilitate precise control of massively parallel hardware, and
enable incremental migration to data-parallel execution.
• Compiler-optimized control of SIMD machine hardware allows the
programmer to drive the PE array transparently. The compiler
must separate the program into scalar and parallel components
and integrate with the OS environment.
• array extensions to optimize data placement, minimize data
movement, and virtualize the dimensions of the PE array. The
compiler generates data-parallel machine code to perform
operations on arrays.
Array sectioning
• allows a programmer to reference a section or a region of a
multidimensional array.
• Array sections are designated by specifying a start index, a bound, and a
stride.
• Vector-valued subscripts arc often used to construct arrays from arbitrary
permutations of another array.
These expressions are vectors that map the desired elements into the target
array. They facilitate the implementation of gather and scatter operations on
a vector of indices.
• SPMD programs are a special class of SIMD programs which
emphasize medium-grain parallelism and synchronization at the
subprogram level rather than at the instruction level.
What was covered ?
• Lockstep operation
• SIMD (data parallel model)
• Synchronization
• Spatial Parallelism
• SIMD--- SCALAR v/s VECTOR
• Array Language ( Fortan 77 ) and extension
• Compiler support
Q & A
Part IV Software for Parallel Programming
Chapter 10). Parallel Models, Languages, and Compilers
Parallel Programming Models
10.1.1 Shared Variable Model
10.1.2 Message Passing Model
Covered 10.1.3 Data- Parallel Model
 10.1 .4 Object-Oriented Model
In this model
• In this model, objects are dynamically created and manipulated.
• Concurrent programming models are built up from low-level objects
such as processes, queues, and semaphores into high level objects
like monitors and program modules.
Concurrent Object
First
• increased use of interacting processes by individual users
Second
• workstation networks have become a cost-effective mechanism for
resource sharing and distributed problem solving
Third
• multiprocessor technology in several variants has advanced to the
point of providing supercomputing power at a fraction of the
traditional cost.
Program abstraction
• Program modularity and software reusability as is commonly
experienced with OOP
Objects
• Program entities which encapsulate data and operations into single
computational units.
An Actor Model
• Message passing is attached with semantics
• Create: Creating an actor from a behavior description and a set of
parametric.
• Send-to: Sending a message to another actor.
• Become: An actor replacing its own behavior by a new behavior
Parallelism in COOP
• Pipeline concurrency involves the overlapped enumeration of
successive solutions and concurrent testing of the solutions as they
emerge from an evaluation pipeline.
• Divide-and-conquer concurrency
Example
A prime-number generation pipeline in
Integer numbers are generated and successively tested for divisibility
by previously generated primes in a linear pipeline of primes.
Example 10.2 Concurrency in object-oriented
programming
• Integer numbers are generated and successively tested for divisibility
by previously generated primes in a linear pipeline of primes.
• Multiplication of a list of numbers [10, 7, -2, 3, 4, -11, -3] using a
divide and-conquer approach
Figure courtesy: ACA a book by Jotwani
Q & A
References
Introduction to Parallel Computing
[1]. https://computing.llnl.gov/tutorials/parallel_comp/#ModelsData
Programming Models
[2]. https://ict.senecacollege.ca/~gpu621/pages/content/model.html
Data parallelism
[3]. https://en.wikipedia.org/wiki/Data_parallelism
Data Parallel and Object Oriented Model
End of Presentation

More Related Content

What's hot (20)

PPTX
file sharing semantics by Umar Danjuma Maiwada
umardanjumamaiwada
 
PPTX
pipelining
sudhir saurav
 
PPT
Chapter 10 - File System Interface
Wayne Jones Jnr
 
PPTX
Hardware Multi-Threading
babuece
 
PPTX
Multivector and multiprocessor
Kishan Panara
 
PPTX
Asynchronous and synchronous
Akhil .B
 
PPTX
2. Distributed Systems Hardware & Software concepts
Prajakta Rane
 
PPTX
Network Security- Secure Socket Layer
Dr.Florence Dayana
 
PPTX
Parallel Programing Model
Adlin Jeena
 
PPTX
Distributed and clustered systems
V.V.Vanniaperumal College for Women
 
PPTX
Multiplexing
Neeraj Garwal
 
PPT
advanced computer architesture-conditions of parallelism
Pankaj Kumar Jain
 
PPT
Paging.ppt
infomerlin
 
PPTX
Applications of paralleL processing
Page Maker
 
PPTX
Code generation
Aparna Nayak
 
PPTX
Data Hazard and Solution for Data Hazard
COMSATS Institute of Information Technology
 
PPTX
Computer architecture virtual memory
Mazin Alwaaly
 
PPT
Operating system.ppt (1)
Vaibhav Bajaj
 
PPTX
Transport layer
Mukesh Chinta
 
PPTX
Software requirements specification
lavanya marichamy
 
file sharing semantics by Umar Danjuma Maiwada
umardanjumamaiwada
 
pipelining
sudhir saurav
 
Chapter 10 - File System Interface
Wayne Jones Jnr
 
Hardware Multi-Threading
babuece
 
Multivector and multiprocessor
Kishan Panara
 
Asynchronous and synchronous
Akhil .B
 
2. Distributed Systems Hardware & Software concepts
Prajakta Rane
 
Network Security- Secure Socket Layer
Dr.Florence Dayana
 
Parallel Programing Model
Adlin Jeena
 
Distributed and clustered systems
V.V.Vanniaperumal College for Women
 
Multiplexing
Neeraj Garwal
 
advanced computer architesture-conditions of parallelism
Pankaj Kumar Jain
 
Paging.ppt
infomerlin
 
Applications of paralleL processing
Page Maker
 
Code generation
Aparna Nayak
 
Data Hazard and Solution for Data Hazard
COMSATS Institute of Information Technology
 
Computer architecture virtual memory
Mazin Alwaaly
 
Operating system.ppt (1)
Vaibhav Bajaj
 
Transport layer
Mukesh Chinta
 
Software requirements specification
lavanya marichamy
 

Similar to Data Parallel and Object Oriented Model (20)

PPTX
20090720 smith
Michael Karpov
 
PPT
Unit5
Sneha Soni
 
PPT
Migration To Multi Core - Parallel Programming Models
Zvi Avraham
 
PPTX
Basic concepts of parallelization
snegacmr
 
PPT
01-MessagePassingFundamentals.ppt
HarshitPal37
 
PPTX
Parallel computing
virend111
 
PDF
Aca2 10 11
Sumit Mittu
 
PPT
Parallel Programming Primer
Sri Prasanna
 
PPT
Parallel Programming Primer 1
mobius.cn
 
PPTX
CSA unit5.pptx
AbcvDef
 
PDF
parallel-computation.pdf
Jayanti Prasad Ph.D.
 
PPTX
Thinking in parallel ab tuladev
Pavel Tsukanov
 
PDF
Advanced computer architecture unit 5
Kunal Bangar
 
PPT
Parallel Programming Models: Shared variable model, Message passing model, Da...
SHASHIKANT346021
 
PPTX
Parallel architecture &programming
Ismail El Gayar
 
PDF
Report on High Performance Computing
Prateek Sarangi
 
PDF
Parallel computation
Jayanti Prasad Ph.D.
 
PPTX
Parallel architecture-programming
Shaveta Banda
 
PPTX
parallel programming Models in system(1).pptx
sayalee7
 
PPTX
Parallel Programming Models: Shared variable model
SHASHIKANT346021
 
20090720 smith
Michael Karpov
 
Unit5
Sneha Soni
 
Migration To Multi Core - Parallel Programming Models
Zvi Avraham
 
Basic concepts of parallelization
snegacmr
 
01-MessagePassingFundamentals.ppt
HarshitPal37
 
Parallel computing
virend111
 
Aca2 10 11
Sumit Mittu
 
Parallel Programming Primer
Sri Prasanna
 
Parallel Programming Primer 1
mobius.cn
 
CSA unit5.pptx
AbcvDef
 
parallel-computation.pdf
Jayanti Prasad Ph.D.
 
Thinking in parallel ab tuladev
Pavel Tsukanov
 
Advanced computer architecture unit 5
Kunal Bangar
 
Parallel Programming Models: Shared variable model, Message passing model, Da...
SHASHIKANT346021
 
Parallel architecture &programming
Ismail El Gayar
 
Report on High Performance Computing
Prateek Sarangi
 
Parallel computation
Jayanti Prasad Ph.D.
 
Parallel architecture-programming
Shaveta Banda
 
parallel programming Models in system(1).pptx
sayalee7
 
Parallel Programming Models: Shared variable model
SHASHIKANT346021
 
Ad

Recently uploaded (20)

PDF
methodology-driven-mbse-murphy-july-hsv-huntsville6680038572db67488e78ff00003...
henriqueltorres1
 
PPTX
澳洲电子毕业证澳大利亚圣母大学水印成绩单UNDA学生证网上可查学历
Taqyea
 
PPTX
Final Major project a b c d e f g h i j k l m
bharathpsnab
 
PPTX
DATA BASE MANAGEMENT AND RELATIONAL DATA
gomathisankariv2
 
PDF
methodology-driven-mbse-murphy-july-hsv-huntsville6680038572db67488e78ff00003...
henriqueltorres1
 
PPTX
Numerical-Solutions-of-Ordinary-Differential-Equations.pptx
SAMUKTHAARM
 
PDF
aAn_Introduction_to_Arcadia_20150115.pdf
henriqueltorres1
 
PDF
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
PPTX
Knowledge Representation : Semantic Networks
Amity University, Patna
 
PPT
Testing and final inspection of a solar PV system
MuhammadSanni2
 
PDF
Submit Your Papers-International Journal on Cybernetics & Informatics ( IJCI)
IJCI JOURNAL
 
PDF
AN EMPIRICAL STUDY ON THE USAGE OF SOCIAL MEDIA IN GERMAN B2C-ONLINE STORES
ijait
 
PPTX
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
PDF
mbse_An_Introduction_to_Arcadia_20150115.pdf
henriqueltorres1
 
PDF
MODULE-5 notes [BCG402-CG&V] PART-B.pdf
Alvas Institute of Engineering and technology, Moodabidri
 
PDF
Data structures notes for unit 2 in computer science.pdf
sshubhamsingh265
 
PPTX
Water Resources Engineering (CVE 728)--Slide 3.pptx
mohammedado3
 
PPTX
Introduction to Internal Combustion Engines - Types, Working and Camparison.pptx
UtkarshPatil98
 
PDF
Digital water marking system project report
Kamal Acharya
 
PPTX
How Industrial Project Management Differs From Construction.pptx
jamespit799
 
methodology-driven-mbse-murphy-july-hsv-huntsville6680038572db67488e78ff00003...
henriqueltorres1
 
澳洲电子毕业证澳大利亚圣母大学水印成绩单UNDA学生证网上可查学历
Taqyea
 
Final Major project a b c d e f g h i j k l m
bharathpsnab
 
DATA BASE MANAGEMENT AND RELATIONAL DATA
gomathisankariv2
 
methodology-driven-mbse-murphy-july-hsv-huntsville6680038572db67488e78ff00003...
henriqueltorres1
 
Numerical-Solutions-of-Ordinary-Differential-Equations.pptx
SAMUKTHAARM
 
aAn_Introduction_to_Arcadia_20150115.pdf
henriqueltorres1
 
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
Knowledge Representation : Semantic Networks
Amity University, Patna
 
Testing and final inspection of a solar PV system
MuhammadSanni2
 
Submit Your Papers-International Journal on Cybernetics & Informatics ( IJCI)
IJCI JOURNAL
 
AN EMPIRICAL STUDY ON THE USAGE OF SOCIAL MEDIA IN GERMAN B2C-ONLINE STORES
ijait
 
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
mbse_An_Introduction_to_Arcadia_20150115.pdf
henriqueltorres1
 
MODULE-5 notes [BCG402-CG&V] PART-B.pdf
Alvas Institute of Engineering and technology, Moodabidri
 
Data structures notes for unit 2 in computer science.pdf
sshubhamsingh265
 
Water Resources Engineering (CVE 728)--Slide 3.pptx
mohammedado3
 
Introduction to Internal Combustion Engines - Types, Working and Camparison.pptx
UtkarshPatil98
 
Digital water marking system project report
Kamal Acharya
 
How Industrial Project Management Differs From Construction.pptx
jamespit799
 
Ad

Data Parallel and Object Oriented Model

  • 2. Content taken from. A book by Naresh Jotwani & Kai Hwang
  • 3. Part IV Software for Parallel Programming Chapter 10). Parallel Models, Languages, and Compilers Parallel Programming Models 10.1.1 Shared Variable Model 10.1.2 Message Passing Model
  • 4. Special Thanks to Dr. Preeti Aggarwal ASSISTANT PROFESSOR Tutorials Point
  • 5. Data-Parallel Model Created and presented by: Nikhil Sharma M.E CSE 1st year Roll no (19-311) July 2019- Dec 2019 Session
  • 6. Title Anatomy • Data • Parallel Model
  • 7. Programming Model A collection of program abstractions providing a programmer a simplified and transparent view of the computer Hardware/software system. Parallel programming models are specifically designed for multiprocessors, multicomputer, or vector SIMD computers.
  • 8. Lockstep Operation THIS PROVIDES ATOMICITY STATE 1--------- STATE 2 NOTHING IN B/W set of changes (new inputs, new outputs, new state)
  • 9. SIMD • Parallelism is explicitly handled by hardware synchronization and flow control. • Choice of Data structure Figure courtesy: [2] Main Focus ( local computations and data routing operation)
  • 10. Where data-parallel programming is used ? • Fine Grain Figure courtesy : ACA, Naresh kotwani
  • 11. Single Instruction, Multiple Data (SIMD) • Single instruction:All processing units execute the same instruction at any given clock cycle • Multiple data: Each processing unit can operate on a different data element • Best suited for specialized problems characterized by a high degree of regularity, such as image processing. • Two varieties: Processor Arrays and Vector Pipelines • Examples: • Processor Arrays: Connection Machine CM-2, Maspar MP-1, MP-2 • Vector Pipelines: IBM 9000, Cray C90, Fujitsu VP, NEC SX-2, Hitachi S820
  • 13. Data parallelism • If you want to see data parallelism •SIMD •SPMD Multicomputer
  • 14. Data parallelism • Challenge • Matching of problem size with fixed machine size • Ex. Partitioning of large arrays or matrixes in to 64 – element segments. SCIENTIST BE LIKE
  • 15. Synhronization • Data – parallel operation is done at COMPILE TIME Instead of RUN TIME Hardware synchronization: Enforced by control unit and LOCKSTEP execution.
  • 16. Synchronous SIMD • Lockstep fashion • Do not have mutual exclusion or synchronization problem associated with multiprocessors or multicomputer • Inter-PE directly controlled by hardware • Inter-PE data communication is also carried by lockstep • Spatial Parallelism
  • 17. Parallelism Example • What is the latency and throughput if Ben uses parallelism? • Spatial parallelism: Ben asks Allysa to help, using her own oven • Temporal parallelism: Ben breaks the task into two stages: roll and baking. He uses two trays. While the first batch is baking he rolls the second batch, and so on.
  • 18. Spatial Parallelism Spatial Parallelism Roll Bake Ben 1 Ben 1 Alyssa 1 Alyssa 1 Ben 2 Ben 2 Alyssa 2 Alyssa 2 Time 0 5 10 15 20 25 30 35 40 45 50 Tray 1 Tray 2 Tray 3 Tray 4 Latency: time to first tray Legend Latency = ? Throughput = ?
  • 19. Spatial Parallelism Spatial Parallelism Roll Bake Ben 1 Ben 1 Alyssa 1 Alyssa 1 Ben 2 Ben 2 Alyssa 2 Alyssa 2 Time 0 5 10 15 20 25 30 35 40 45 50 Tray 1 Tray 2 Tray 3 Tray 4 Latency: time to first tray Legend Latency = 5 + 15 = 20 minutes = 1/3 hour (same) Throughput = 2 trays/ 1/3 hour = 6 trays/hour (doubled)
  • 20. SIMD--- SCALAR v/s VECTOR • Scalar are directly executed by the control unit. • Vector are broadcast to all processing elements. • (because vector operands are located at different location-PE)
  • 21. Array Language Extensions Array extensions in data parallel languages are represented by high-level data types. Enables the removal of some nested loops in the code. global address space, which obviates the need for explicit data routing between PEs In computer science, array programming refers to solutions which allow the application of operations to an entire set of values at once. Such solutions are commonly used in scientific and engineering settings. (source wiki ) Fortan 77
  • 22. Compiler Support • facilitate precise control of massively parallel hardware, and enable incremental migration to data-parallel execution. • Compiler-optimized control of SIMD machine hardware allows the programmer to drive the PE array transparently. The compiler must separate the program into scalar and parallel components and integrate with the OS environment. • array extensions to optimize data placement, minimize data movement, and virtualize the dimensions of the PE array. The compiler generates data-parallel machine code to perform operations on arrays.
  • 23. Array sectioning • allows a programmer to reference a section or a region of a multidimensional array. • Array sections are designated by specifying a start index, a bound, and a stride. • Vector-valued subscripts arc often used to construct arrays from arbitrary permutations of another array. These expressions are vectors that map the desired elements into the target array. They facilitate the implementation of gather and scatter operations on a vector of indices.
  • 24. • SPMD programs are a special class of SIMD programs which emphasize medium-grain parallelism and synchronization at the subprogram level rather than at the instruction level.
  • 25. What was covered ? • Lockstep operation • SIMD (data parallel model) • Synchronization • Spatial Parallelism • SIMD--- SCALAR v/s VECTOR • Array Language ( Fortan 77 ) and extension • Compiler support
  • 26. Q & A
  • 27. Part IV Software for Parallel Programming Chapter 10). Parallel Models, Languages, and Compilers Parallel Programming Models 10.1.1 Shared Variable Model 10.1.2 Message Passing Model Covered 10.1.3 Data- Parallel Model  10.1 .4 Object-Oriented Model
  • 28. In this model • In this model, objects are dynamically created and manipulated. • Concurrent programming models are built up from low-level objects such as processes, queues, and semaphores into high level objects like monitors and program modules.
  • 29. Concurrent Object First • increased use of interacting processes by individual users Second • workstation networks have become a cost-effective mechanism for resource sharing and distributed problem solving Third • multiprocessor technology in several variants has advanced to the point of providing supercomputing power at a fraction of the traditional cost.
  • 30. Program abstraction • Program modularity and software reusability as is commonly experienced with OOP Objects • Program entities which encapsulate data and operations into single computational units.
  • 31. An Actor Model • Message passing is attached with semantics • Create: Creating an actor from a behavior description and a set of parametric. • Send-to: Sending a message to another actor. • Become: An actor replacing its own behavior by a new behavior
  • 32. Parallelism in COOP • Pipeline concurrency involves the overlapped enumeration of successive solutions and concurrent testing of the solutions as they emerge from an evaluation pipeline. • Divide-and-conquer concurrency Example A prime-number generation pipeline in Integer numbers are generated and successively tested for divisibility by previously generated primes in a linear pipeline of primes.
  • 33. Example 10.2 Concurrency in object-oriented programming • Integer numbers are generated and successively tested for divisibility by previously generated primes in a linear pipeline of primes.
  • 34. • Multiplication of a list of numbers [10, 7, -2, 3, 4, -11, -3] using a divide and-conquer approach Figure courtesy: ACA a book by Jotwani
  • 35. Q & A
  • 36. References Introduction to Parallel Computing [1]. https://computing.llnl.gov/tutorials/parallel_comp/#ModelsData Programming Models [2]. https://ict.senecacollege.ca/~gpu621/pages/content/model.html Data parallelism [3]. https://en.wikipedia.org/wiki/Data_parallelism