Lecture-4 Parallel Programming Model
Lecture-4 Parallel Programming Model
Distributed Memory Model :The user makes call to libraries to explicitly share information
between processors.
Threads Model: A single process having multiple (concurrent) execution paths
• If any dependent process is quit or stop then the other processes will stop working.
• What are the advantages and disadvantages of using a shared memory
model compared to a distributed memory model?
• Most of the parallel work focuses on performing operations on a data set. The data set is typically organized
into a common structure, such as an array.
• A set of tasks work collectively on the same data structure, however, each task works on a different partition
of the same data structure.
• On shared memory architectures, all tasks may have access to the data structure through global memory.
• On distributed memory architectures, the global data structure can be split up logically and/or physically across
tasks.
Parallel Programming Model
Example of Data Parallel Model
Int x [100],
For(i=0;i<100; i++)
y [100], z[i] = x[i] + y[i]
z [100]