Introduction collection of program abstractions. designed for multiprocessors, multicomputer orvector/SIMD computers Five models: Shared-Variable Model Message-Passing Model Data-Parallel Model Object-oriented Model Functional and Logic Models
Shared-Variable Model To limit the scope and rights, the process addressspace may be shared or restricted.Mechanisms for IPC:1. IPC using shared variable:2. IPC using message passing:Shared Variablesin a commonmemoryProcess AProcess BProcess CProcess D Process E
Following are some issues of Shared-variable Model: Shared-Variable communication: Critical Section(CS): code segment accessing shared variables. Requirements are – Mutual exclusion No deadlock in waiting Non preemption Eventual entry Protected Access: based on CS value Multiprogramming Multiprocessing – two types: MIMD mode MPMD mode Multitasking Multithreading
Partitioning and Replication: Program partitioning is a technique for decomposing a largeprogram and data set into many small pieces for parallelexecution by multiple processors. Program replication is referred to duplication of the sameprogram code for parallel execution on multiple processorover different data sets. Scheduling and Synchronization: Scheduling of divided program modules on parallel processor Two types are : Static scheduling Dynamic scheduling Cache Coherence and Protection:If the value is returned on a read instruction is always the valuewritten by the latest write instruction on the same memorylocation is called coherent.
Message-Passing Model Synchronous Message Passing – It is must synchronize the sender process and thereceiver process in time and space Asynchronous Message Passing – It does not require message sending and receiving besynchronized in time and space Non blocking can be achieved Distributing the computations: Subprogram level is handled rather than at theinstructional or fine grain process level in a tightlycoupled multiprocessor
Data-Parallel Model It is easier to write and to debug because parallelism isexplicitly handled by hardware synchronization andflow control. It requires the use of pre-distributed data sets Synchronization is done at compile time rather thanrun time. the following are some issued handled Data Parallelism- Array Language Extensions Compiler support
Object-Oriented Model Concurrent OOP – 3 application demands There is increased use of interacting processes by individualusers Workstation networks have become a cost-effectivemechanism Multiprocessor technology in several variants has advanced tothe point of providing supercomputing power An actor model It is presented as one framework for COOP They are self-contained , interactive, independentcomponents of a computing system. Basic primitives are :create to , send to, become Parallelism in COOP: 3 patterns- 1. pipeline concurrency 2.divide and conquercurrency 3.cooperative problem solving
Functional and Logic Models Two types of language oriented programming modelsare Functional programming model It emphasizes functionality of a program No concepts of storage, assignment and branching All single-assignment and dataflow languages are functionalin nature Some e.g. are Lisp, SISAL and strand 88 Logic programming model Based on logic ,logic programming tat suitable for dealingwith large database. Some e.g. are concurrent Prolog - Concurrent Parlog