Concurrent Programming and Languages

Post on 23-Feb-2016

59 views 0 download

description

Concurrent Programming and Languages. Behrooz Nobakht. Approaches. Actor Model Software Transactional Memory Data Flow Programming . Actor Model. Actor: an autonomous and concurrent entity sending “messages” In response to a “message”, an actor may - PowerPoint PPT Presentation

transcript

Concurrent Programming and Languages

Behrooz Nobakht

Approaches Actor Model Software Transactional Memory Data Flow Programming

Actor Model Actor: an autonomous and concurrent

entity sending “messages” In response to a “message”, an actor

may› Send an finite set of messages to known

actors› Create a finite set of new actors› Define how it will respond to future

messages

Software Transactional Memory

Translating sequential object implementation to concurrent non-blocking ones

Transaction: a finite sequence of local and shared memory machine instructions

The illusion: Isolation and Atomicity A shared object plays the role of an

STM.

Data Flow Programming Divide, conquer, merge the processing

data MapReduce

› Map: map incoming data to intermediate results

› Reduce: merge intermediate results to final results

› Specialized File System

Languages and Libraries

JAVA: TASK Relevant: Killim, Clojure

JAVA: EXECUTOR SERVICE

SCALA: ACTORS Similars: Erlang, ActorFoundry, Jetlang

MULTIVERSE STM on Groovy/Java

HADOOP Map/Reduce

All-in-onesGPars

Haskell

Based on Groovy and Java Parallel Collection Functions Data Flows and MapReduce Actors

forkIO and Mvars STM Foreign Function Interface Nested Data Parallelism

Hybrid SolutionsAkka

MPI

Actors and Remote Actors STM Transactors: Transactional Actors

Message Passing Interface Distributed Memory C, C++, Fortran, Boost Library