SlideShare a Scribd company logo
1 of 55
Download to read offline
A Survey of
Concurrency
Constructs
Ted Leung
Sun Microsystems
ted.leung@sun.com
@twleung
16 threads
128 threads
Today’s model
 Threads
  Program counter
  Own stack
  Shared Memory
 Locks
Some of the problems
 Locks
   manually lock and unlock
   lock ordering is a big problem
   locks are not compositional
 How do we decide what is concurrent?
 Need to pre-design, but now we have to retrofit
  concurrency via new requirements
Design Goals/Space
 Mutual Exclusion
 Serialization / Ordering
 Inherent / Implicit vs Explicit
 Fine / Medium / Coarse grained
 Composability
A good solution
 Is substantially less error prone
 Makes it much easier to identify concurrency
 Runs on today’s (and future) parallel hardware
   Works if you keep adding cores/threads
Theoretical Models
 Actors
 CSP
 CCS
 petri-nets
 pi-calculus
 join-calculus
 Functional Programming
Theoretical Models
 Actors
 CSP
 CCS
 petri-nets
 pi-calculus
 join-calculus
 Functional Programming
Implementation matters
 Threads are not free
 Message sending is not free
 Context/thread switching is not free
 Lock acquire/release is not free
The models
 Transactional Memory
   Persistent data structures
 Actors
 Dataflow
 Tuple spaces
Transactional Memory
 Original paper on STM 1995
 Idea goes as far back as 1986
   Tom Knight (Hardware Transactional Memory)
 First appearance in a programming language
   Concurrent Haskell 2005
The Model
 Use transactions on items in memory
 Enclose code in begin/end blocks
 Variations
   specify manual abort/retry
   specify an alternate path (way of controlling manual
    abort)
Example



(defn deposit [account amount]
  (dosync
    (let [owner (account :owner)
          balance-ref (account :balance-ref)]
      (do
        (alter balance-ref + amount)
        (println “depositing” amount (account :owner)))))))
STM Design Space
 STM Algorithms / Strategies
   Granularity
     word vs block
   Locks vs Optimistic concurrency
   Conflict detection
     eager vs lazy
   Contention management
STM Problems
 Non transactional access to STM cells
 Non abortable operations
   I/O
 STM Overhead
   read/write barrier elimination
 Where to place transaction boundaries?
 Still need condition variables
   ordering problems are important
     1/3 of non-deadlock problems in one study
Implementations
 Haskell/GHC
   Use logs and aborts txns
 Clojure STM - via Refs
   based on ML Refs to confine changes, but ML Refs
    have no automatic (i.e. STM) concurrency semantics
   only for Refs to aggregates
   Implementation uses MVCC
   Persistent data structures enable MVCC allowing
    decoupling of readers/writers (readers don’t wait)
Persistent Data Structures
 Original formulation circa 1981
 Formalization 1986 Sarnoff
 Popularized by Clojure
The model
 Upon “update”, previous versions are still available
   preserve functionalness
   both versions meet O(x) characteristics
 In Clojure, combined with STM
   Motivated by copy on write
   hash-map, vector, sorted map
Available data structures
 Lists, Vectors, Maps
 hash list based on VLists
 VDList - deques based on VLists
 red-black trees
Available data structures
 Real Time Queues and Deques
 deques, output-restricted deques
 binary random access lists
 binomial heaps
 skew binary random access lists
 skew binomial heaps
 catenable lists
 heaps with efficient merging
 catenable deques
Problems
 Not really a full model
 Oriented towards functional programming
Actors
 Invented by Carl Hewitt at MIT (1973)
   Formal Model
   Programming languages
   Hardware
   Led to continuations, Scheme
 Recently revived by Erlang
   Erlang’s model is not derived explicitly from Actors
The Model
Example

object account extends Actor {

    private var balance = 0

    def act() {
      loop {
        react {
          case Withdraw(amount) =>
             balance -= amount
             sender ! Balance(balance)
          case Deposit(amount) =>
             balance += amount
             sender ! Balance(balance)
          case BalanceRequest =>
             sender ! Balance(balance)
          case TerminateRequest =>
        }
    }

}
Problems with actors
 DOS of the actor mail queue
 Multiple actor coordination
   reinvent transactions?
 Actors can still deadlock and starve
 Programmer defines granularity
   by choosing what is an actor
Actor Implementations
 Scala
   Scala Actors
   Lift Actors
 Erlang
 CLR
   F# / Axum
Java
 kilim
   http://www.malhar.net/sriram/kilim/
 Actor Foundry
   http://osl.cs.uiuc.edu/af/
 actorom
   http://code.google.com/p/actorom/
 Actors Guild
   http://actorsguildframework.org/
Measuring performance
 actor creation?
 message passing?
 memory usage?
Erlang vs JVM
 Erlang
   per process GC heap
   tail call
   distributed
 JVM
   per JVM heap
   no tail call (fixed in JSR-292?)
   not distributed
   2 kinds of actors (Scala)
Actor variants
 Kamaelia
  messages are sent to named boxes
  coordination language connects outboxes to inboxes
  box size is explicitly controllable
Actor variants
 Clojure Agents
   Designed for loosely coupled stuff
   Code/actions sent to agents
   Code is queued when it hits the agent
   Agent framework guarantees serialization
   State of agent is always available for read (unlike
    actors which could be busy processing when you
    send a read message)
   not in favor of transparent distribution
   Clojure agents can operate in an ‘open world’ - actors
    answer a specific set of messages
Last thoughts on Actors
 Actors are an assembly language
 OTP type stuff and beyond
 Akka - Jonas Boner
  http://github.com/jboner/akka
Dataflow
 Bill Ackerman’s PhD Thesis at MIT (1984)
 Declarative Concurrency in functional languages
 Research in the 1980’s and 90’s
 Inherent concurrency
   Turns out to be very difficult to implement
 Interest in declarative concurrency is slowly returning
The model
 Dataflow Variables
   create variable
   bind value
   read value or block
 Threads
 Dataflow Streams
   List whose tail is an unbound dataflow variable
 Deterministic computation!
Example: Variables 1
object Test5 extends Application {
  import DataFlow._

 val x, y, z = new DataFlowVariable[Int]

 val main = thread {
   println("Thread 'main'")
   x << 1
   println("'x' set to: " + x())
   println("Waiting for 'y' to be set...")
   if (x() > y()) {
     z << x
     println("'z' set to 'x': " + z())
   } else {
     z << y
     println("'z' set to 'y': " + z())
   }

     x.shutdown
     y.shutdown
     z.shutdown
     v.shutdown
 }
Example: Variables 2
object Test5 extends Application {

    val setY = thread {
      println("Thread 'setY', sleeping...")
      Thread.sleep(5000)
      y << 2
      println("'y' set to: " + y())
    }

    // shut down the threads
    main ! 'exit
    setY ! 'exit

    System.exit(0)
}
Example: Streams
object Test4 extends Application {
  import DataFlow._

    def ints(n: Int, max: Int, stream: DataFlowStream[Int]): Unit = if (n != max) {
      println("Generating int: " + n)
      stream <<< n
      ints(n + 1, max, stream)
    }
    def sum(s: Int, in: DataFlowStream[Int], out: DataFlowStream[Int]): Unit = {
      println("Calculating: " + s)
      out <<< s
      sum(in() + s, in, out)
    }
    def printSum(stream: DataFlowStream[Int]): Unit = {
      println("Result: " + stream())
      printSum(stream)
    }

    val producer = new DataFlowStream[Int]
    val consumer = new DataFlowStream[Int]

    thread { ints(0, 1000, producer) }
    thread { sum(0, producer, consumer) }
    thread { printSum(consumer) }
}
Example: Streams (Oz)

fun {Ints N Max}
  if N == Max then nil
  else
    {Delay 1000}
    N|{Ints N+1 Max}
  end
end

fun {Sum S Stream}
  case Stream of nil then S
  [] H|T then S|{Sum H+S T} end
end

local X Y in
  thread X = {Ints 0 1000} end
  thread Y = {Sum 0 X} end
  {Browse Y}
end
Implementations
 Mozart Oz
   http://www.mozart-oz.org/
 Jonas Boner’s Scala library (now part of Akka)
   http://github.com/jboner/scala-dataflow
   dataflow variables and streams
 Ruby library
   http://github.com/larrytheliquid/dataflow
   dataflow variables and streams
 Groovy
   http://code.google.com/p/gparallelizer/
Variations
 Futures
   Originated in Multilisp
   Eager/speculative evaluation
   Implementation quality matters
 I-Structures
   Id, pH (Parallel Haskell)
   Single assignment arrays
   cannot be rebound => no streams
Problems
 Can’t handle non-determinism
  like a server
  Need ports
    this leads to actor like things
Tuple Spaces
 Originated in Linda (1984)
 Popularized by Jini
The Model
 Three operations
   write() (out)
   take() (in)
   read()
The Model
 Space uncoupling
 Time uncoupling
 Readers are decoupled from Writers
 Content addressable by pattern matching
 Can emulate
  Actor like continuations
  CSP
  Message Passing
  Semaphores
Example

public class Account implements Entry {
  public Integer accountNo;
  public Integer value;
  public Account() { ... }
  public Account(int accountNo, int value) {
    this.accountNo = newInteger(accountNo);
    this.value = newInteger(value);
  }
}

try {
  Account newAccount = new Account(accountNo, value);
  space.write(newAccount, null, Lease.FOREVER);
}

space.read(accountNo);
Implementations
 Jini/JavaSpaces
   http://incubator.apache.org/river/RIVER/index.html
 BlitzSpaces
   http://www.dancres.org/blitz/blitz_js.html
 PyLinda
   http://code.google.com/p/pylinda/
 Rinda
   built in to Ruby
Problems
 Low level
 High latency to the space - the space is contention
  point / hot spot
 Scalability
 More for distribution than concurrency
Projects
 Scala
 Erlang
 Clojure
 Kamaelia
 Haskell
 Axum/F#
 Mozart/Oz
 Akka
Work to be done
 More in depth comparisons on 4+ core platforms
 Higher level frameworks
 Application architectures/patterns
   Web
   Middleware
Final thoughts
 Shared State is troublesome
   immutability or
   no sharing
 It’s too early
References
 Actors: A Model of Concurrent Computation in
  Distributed Systems - Gul Agha - MIT Press 1986
 Concepts, Techniques, and Models of Computer
  Programming - Peter Van Roy and Seif Haridi - MIT
  Press 2004
Thanks!
 Q&A

More Related Content

What's hot

What To Leave Implicit
What To Leave ImplicitWhat To Leave Implicit
What To Leave ImplicitMartin Odersky
 
Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)Jonas Bonér
 
Fuel Up JavaScript with Functional Programming
Fuel Up JavaScript with Functional ProgrammingFuel Up JavaScript with Functional Programming
Fuel Up JavaScript with Functional ProgrammingShine Xavier
 
Scala: functional programming for the imperative mind
Scala: functional programming for the imperative mindScala: functional programming for the imperative mind
Scala: functional programming for the imperative mindSander Mak (@Sander_Mak)
 
A recommender system for generalizing and refining code templates
A recommender system for generalizing and refining code templatesA recommender system for generalizing and refining code templates
A recommender system for generalizing and refining code templatesCoen De Roover
 
Introduction to Functional Programming with Scala
Introduction to Functional Programming with ScalaIntroduction to Functional Programming with Scala
Introduction to Functional Programming with Scalapramode_ce
 
ParaSail
ParaSail  ParaSail
ParaSail AdaCore
 
Core java concepts
Core java concepts Core java concepts
Core java concepts javeed_mhd
 
Scala 3 Is Coming: Martin Odersky Shares What To Know
Scala 3 Is Coming: Martin Odersky Shares What To KnowScala 3 Is Coming: Martin Odersky Shares What To Know
Scala 3 Is Coming: Martin Odersky Shares What To KnowLightbend
 
Best practices in Java
Best practices in JavaBest practices in Java
Best practices in JavaMudit Gupta
 
Clojure and The Robot Apocalypse
Clojure and The Robot ApocalypseClojure and The Robot Apocalypse
Clojure and The Robot Apocalypseelliando dias
 
scalaliftoff2009.pdf
scalaliftoff2009.pdfscalaliftoff2009.pdf
scalaliftoff2009.pdfHiroshi Ono
 
Attention mechanisms with tensorflow
Attention mechanisms with tensorflowAttention mechanisms with tensorflow
Attention mechanisms with tensorflowKeon Kim
 

What's hot (17)

OOP and FP
OOP and FPOOP and FP
OOP and FP
 
From DOT to Dotty
From DOT to DottyFrom DOT to Dotty
From DOT to Dotty
 
What To Leave Implicit
What To Leave ImplicitWhat To Leave Implicit
What To Leave Implicit
 
Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)
 
Fuel Up JavaScript with Functional Programming
Fuel Up JavaScript with Functional ProgrammingFuel Up JavaScript with Functional Programming
Fuel Up JavaScript with Functional Programming
 
Scala: functional programming for the imperative mind
Scala: functional programming for the imperative mindScala: functional programming for the imperative mind
Scala: functional programming for the imperative mind
 
A recommender system for generalizing and refining code templates
A recommender system for generalizing and refining code templatesA recommender system for generalizing and refining code templates
A recommender system for generalizing and refining code templates
 
Introduction to Functional Programming with Scala
Introduction to Functional Programming with ScalaIntroduction to Functional Programming with Scala
Introduction to Functional Programming with Scala
 
Preparing for Scala 3
Preparing for Scala 3Preparing for Scala 3
Preparing for Scala 3
 
ParaSail
ParaSail  ParaSail
ParaSail
 
Core java concepts
Core java concepts Core java concepts
Core java concepts
 
Scala 3 Is Coming: Martin Odersky Shares What To Know
Scala 3 Is Coming: Martin Odersky Shares What To KnowScala 3 Is Coming: Martin Odersky Shares What To Know
Scala 3 Is Coming: Martin Odersky Shares What To Know
 
Best practices in Java
Best practices in JavaBest practices in Java
Best practices in Java
 
Clojure and The Robot Apocalypse
Clojure and The Robot ApocalypseClojure and The Robot Apocalypse
Clojure and The Robot Apocalypse
 
scalaliftoff2009.pdf
scalaliftoff2009.pdfscalaliftoff2009.pdf
scalaliftoff2009.pdf
 
Attention mechanisms with tensorflow
Attention mechanisms with tensorflowAttention mechanisms with tensorflow
Attention mechanisms with tensorflow
 
Java Basics
Java BasicsJava Basics
Java Basics
 

Similar to A Survey of Concurrency Constructs

Concurrency Constructs Overview
Concurrency Constructs OverviewConcurrency Constructs Overview
Concurrency Constructs Overviewstasimus
 
Oscon keynote: Working hard to keep it simple
Oscon keynote: Working hard to keep it simpleOscon keynote: Working hard to keep it simple
Oscon keynote: Working hard to keep it simpleMartin Odersky
 
Getting started with Clojure
Getting started with ClojureGetting started with Clojure
Getting started with ClojureJohn Stevenson
 
Introduction to clojure
Introduction to clojureIntroduction to clojure
Introduction to clojureAbbas Raza
 
Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009Martin Odersky
 
Choose'10: Ralf Laemmel - Dealing Confortably with the Confusion of Tongues
Choose'10: Ralf Laemmel - Dealing Confortably with the Confusion of TonguesChoose'10: Ralf Laemmel - Dealing Confortably with the Confusion of Tongues
Choose'10: Ralf Laemmel - Dealing Confortably with the Confusion of TonguesCHOOSE
 
Clojure concurrency
Clojure concurrencyClojure concurrency
Clojure concurrencyAlex Navis
 
Os Reindersfinal
Os ReindersfinalOs Reindersfinal
Os Reindersfinaloscon2007
 
Os Reindersfinal
Os ReindersfinalOs Reindersfinal
Os Reindersfinaloscon2007
 
Clojure made-simple - John Stevenson
Clojure made-simple - John StevensonClojure made-simple - John Stevenson
Clojure made-simple - John StevensonJAX London
 
Introduction to c_plus_plus
Introduction to c_plus_plusIntroduction to c_plus_plus
Introduction to c_plus_plusSayed Ahmed
 
Introduction to c_plus_plus (6)
Introduction to c_plus_plus (6)Introduction to c_plus_plus (6)
Introduction to c_plus_plus (6)Sayed Ahmed
 
Java Core | Modern Java Concurrency | Martijn Verburg & Ben Evans
Java Core | Modern Java Concurrency | Martijn Verburg & Ben EvansJava Core | Modern Java Concurrency | Martijn Verburg & Ben Evans
Java Core | Modern Java Concurrency | Martijn Verburg & Ben EvansJAX London
 
The Actor Model - Towards Better Concurrency
The Actor Model - Towards Better ConcurrencyThe Actor Model - Towards Better Concurrency
The Actor Model - Towards Better ConcurrencyDror Bereznitsky
 
Beyond PITS, Functional Principles for Software Architecture
Beyond PITS, Functional Principles for Software ArchitectureBeyond PITS, Functional Principles for Software Architecture
Beyond PITS, Functional Principles for Software ArchitectureJayaram Sankaranarayanan
 
Patterns in Python
Patterns in PythonPatterns in Python
Patterns in Pythondn
 
The Joy Of Functional Programming
The Joy Of Functional ProgrammingThe Joy Of Functional Programming
The Joy Of Functional Programmingjasondew
 
Xml processing-by-asfak
Xml processing-by-asfakXml processing-by-asfak
Xml processing-by-asfakAsfak Mahamud
 
Principles of the Play framework
Principles of the Play frameworkPrinciples of the Play framework
Principles of the Play frameworkBernhard Huemer
 

Similar to A Survey of Concurrency Constructs (20)

Concurrency Constructs Overview
Concurrency Constructs OverviewConcurrency Constructs Overview
Concurrency Constructs Overview
 
Oscon keynote: Working hard to keep it simple
Oscon keynote: Working hard to keep it simpleOscon keynote: Working hard to keep it simple
Oscon keynote: Working hard to keep it simple
 
Getting started with Clojure
Getting started with ClojureGetting started with Clojure
Getting started with Clojure
 
Introduction to clojure
Introduction to clojureIntroduction to clojure
Introduction to clojure
 
Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009
 
Choose'10: Ralf Laemmel - Dealing Confortably with the Confusion of Tongues
Choose'10: Ralf Laemmel - Dealing Confortably with the Confusion of TonguesChoose'10: Ralf Laemmel - Dealing Confortably with the Confusion of Tongues
Choose'10: Ralf Laemmel - Dealing Confortably with the Confusion of Tongues
 
Clojure concurrency
Clojure concurrencyClojure concurrency
Clojure concurrency
 
Modern C++
Modern C++Modern C++
Modern C++
 
Os Reindersfinal
Os ReindersfinalOs Reindersfinal
Os Reindersfinal
 
Os Reindersfinal
Os ReindersfinalOs Reindersfinal
Os Reindersfinal
 
Clojure made-simple - John Stevenson
Clojure made-simple - John StevensonClojure made-simple - John Stevenson
Clojure made-simple - John Stevenson
 
Introduction to c_plus_plus
Introduction to c_plus_plusIntroduction to c_plus_plus
Introduction to c_plus_plus
 
Introduction to c_plus_plus (6)
Introduction to c_plus_plus (6)Introduction to c_plus_plus (6)
Introduction to c_plus_plus (6)
 
Java Core | Modern Java Concurrency | Martijn Verburg & Ben Evans
Java Core | Modern Java Concurrency | Martijn Verburg & Ben EvansJava Core | Modern Java Concurrency | Martijn Verburg & Ben Evans
Java Core | Modern Java Concurrency | Martijn Verburg & Ben Evans
 
The Actor Model - Towards Better Concurrency
The Actor Model - Towards Better ConcurrencyThe Actor Model - Towards Better Concurrency
The Actor Model - Towards Better Concurrency
 
Beyond PITS, Functional Principles for Software Architecture
Beyond PITS, Functional Principles for Software ArchitectureBeyond PITS, Functional Principles for Software Architecture
Beyond PITS, Functional Principles for Software Architecture
 
Patterns in Python
Patterns in PythonPatterns in Python
Patterns in Python
 
The Joy Of Functional Programming
The Joy Of Functional ProgrammingThe Joy Of Functional Programming
The Joy Of Functional Programming
 
Xml processing-by-asfak
Xml processing-by-asfakXml processing-by-asfak
Xml processing-by-asfak
 
Principles of the Play framework
Principles of the Play frameworkPrinciples of the Play framework
Principles of the Play framework
 

More from Ted Leung

DjangoCon 2009 Keynote
DjangoCon 2009 KeynoteDjangoCon 2009 Keynote
DjangoCon 2009 KeynoteTed Leung
 
Seeding The Cloud
Seeding The CloudSeeding The Cloud
Seeding The CloudTed Leung
 
Programming Languages For The Cloud
Programming Languages For The CloudProgramming Languages For The Cloud
Programming Languages For The CloudTed Leung
 
MySQL User Conference 2009: Python and MySQL
MySQL User Conference 2009: Python and MySQLMySQL User Conference 2009: Python and MySQL
MySQL User Conference 2009: Python and MySQLTed Leung
 
PyCon US 2009: Challenges and Opportunities for Python
PyCon US 2009: Challenges and Opportunities for PythonPyCon US 2009: Challenges and Opportunities for Python
PyCon US 2009: Challenges and Opportunities for PythonTed Leung
 
Northwest Python Day 2009
Northwest Python Day 2009Northwest Python Day 2009
Northwest Python Day 2009Ted Leung
 
PyCon UK 2008: Challenges for Dynamic Languages
PyCon UK 2008: Challenges for Dynamic LanguagesPyCon UK 2008: Challenges for Dynamic Languages
PyCon UK 2008: Challenges for Dynamic LanguagesTed Leung
 
OSCON 2008: Open Source Community Antipatterns
OSCON 2008: Open Source Community AntipatternsOSCON 2008: Open Source Community Antipatterns
OSCON 2008: Open Source Community AntipatternsTed Leung
 
OSCON 2007: Open Design, Not By Committee
OSCON 2007: Open Design, Not By CommitteeOSCON 2007: Open Design, Not By Committee
OSCON 2007: Open Design, Not By CommitteeTed Leung
 
Ignite The Web 2007
Ignite The Web 2007Ignite The Web 2007
Ignite The Web 2007Ted Leung
 
ApacheCon US 2007: Open Source Community Antipatterns
ApacheCon US 2007:  Open Source Community AntipatternsApacheCon US 2007:  Open Source Community Antipatterns
ApacheCon US 2007: Open Source Community AntipatternsTed Leung
 
OSCON 2005: Build Your Own Chandler Parcel
OSCON 2005: Build Your Own Chandler ParcelOSCON 2005: Build Your Own Chandler Parcel
OSCON 2005: Build Your Own Chandler ParcelTed Leung
 
PyCon 2005 PyBlosxom
PyCon 2005 PyBlosxomPyCon 2005 PyBlosxom
PyCon 2005 PyBlosxomTed Leung
 
SeaJUG March 2004 - Groovy
SeaJUG March 2004 - GroovySeaJUG March 2004 - Groovy
SeaJUG March 2004 - GroovyTed Leung
 
OSCON 2004: XML and Apache
OSCON 2004: XML and ApacheOSCON 2004: XML and Apache
OSCON 2004: XML and ApacheTed Leung
 
OSCON 2004: A Developer's Tour of Chandler
OSCON 2004: A Developer's Tour of ChandlerOSCON 2004: A Developer's Tour of Chandler
OSCON 2004: A Developer's Tour of ChandlerTed Leung
 
SeaJUG Dec 2001: Aspect-Oriented Programming with AspectJ
SeaJUG Dec 2001: Aspect-Oriented Programming with AspectJSeaJUG Dec 2001: Aspect-Oriented Programming with AspectJ
SeaJUG Dec 2001: Aspect-Oriented Programming with AspectJTed Leung
 
IQPC Canada XML 2001: How to develop Syntax and XML Schema
IQPC Canada XML 2001: How to develop Syntax and XML SchemaIQPC Canada XML 2001: How to develop Syntax and XML Schema
IQPC Canada XML 2001: How to develop Syntax and XML SchemaTed Leung
 
IQPC Canada XML 2001: How to Use XML Parsing to Enhance Electronic Communication
IQPC Canada XML 2001: How to Use XML Parsing to Enhance Electronic CommunicationIQPC Canada XML 2001: How to Use XML Parsing to Enhance Electronic Communication
IQPC Canada XML 2001: How to Use XML Parsing to Enhance Electronic CommunicationTed Leung
 
ApacheCon 2000 Everything you ever wanted to know about XML Parsing
ApacheCon 2000 Everything you ever wanted to know about XML ParsingApacheCon 2000 Everything you ever wanted to know about XML Parsing
ApacheCon 2000 Everything you ever wanted to know about XML ParsingTed Leung
 

More from Ted Leung (20)

DjangoCon 2009 Keynote
DjangoCon 2009 KeynoteDjangoCon 2009 Keynote
DjangoCon 2009 Keynote
 
Seeding The Cloud
Seeding The CloudSeeding The Cloud
Seeding The Cloud
 
Programming Languages For The Cloud
Programming Languages For The CloudProgramming Languages For The Cloud
Programming Languages For The Cloud
 
MySQL User Conference 2009: Python and MySQL
MySQL User Conference 2009: Python and MySQLMySQL User Conference 2009: Python and MySQL
MySQL User Conference 2009: Python and MySQL
 
PyCon US 2009: Challenges and Opportunities for Python
PyCon US 2009: Challenges and Opportunities for PythonPyCon US 2009: Challenges and Opportunities for Python
PyCon US 2009: Challenges and Opportunities for Python
 
Northwest Python Day 2009
Northwest Python Day 2009Northwest Python Day 2009
Northwest Python Day 2009
 
PyCon UK 2008: Challenges for Dynamic Languages
PyCon UK 2008: Challenges for Dynamic LanguagesPyCon UK 2008: Challenges for Dynamic Languages
PyCon UK 2008: Challenges for Dynamic Languages
 
OSCON 2008: Open Source Community Antipatterns
OSCON 2008: Open Source Community AntipatternsOSCON 2008: Open Source Community Antipatterns
OSCON 2008: Open Source Community Antipatterns
 
OSCON 2007: Open Design, Not By Committee
OSCON 2007: Open Design, Not By CommitteeOSCON 2007: Open Design, Not By Committee
OSCON 2007: Open Design, Not By Committee
 
Ignite The Web 2007
Ignite The Web 2007Ignite The Web 2007
Ignite The Web 2007
 
ApacheCon US 2007: Open Source Community Antipatterns
ApacheCon US 2007:  Open Source Community AntipatternsApacheCon US 2007:  Open Source Community Antipatterns
ApacheCon US 2007: Open Source Community Antipatterns
 
OSCON 2005: Build Your Own Chandler Parcel
OSCON 2005: Build Your Own Chandler ParcelOSCON 2005: Build Your Own Chandler Parcel
OSCON 2005: Build Your Own Chandler Parcel
 
PyCon 2005 PyBlosxom
PyCon 2005 PyBlosxomPyCon 2005 PyBlosxom
PyCon 2005 PyBlosxom
 
SeaJUG March 2004 - Groovy
SeaJUG March 2004 - GroovySeaJUG March 2004 - Groovy
SeaJUG March 2004 - Groovy
 
OSCON 2004: XML and Apache
OSCON 2004: XML and ApacheOSCON 2004: XML and Apache
OSCON 2004: XML and Apache
 
OSCON 2004: A Developer's Tour of Chandler
OSCON 2004: A Developer's Tour of ChandlerOSCON 2004: A Developer's Tour of Chandler
OSCON 2004: A Developer's Tour of Chandler
 
SeaJUG Dec 2001: Aspect-Oriented Programming with AspectJ
SeaJUG Dec 2001: Aspect-Oriented Programming with AspectJSeaJUG Dec 2001: Aspect-Oriented Programming with AspectJ
SeaJUG Dec 2001: Aspect-Oriented Programming with AspectJ
 
IQPC Canada XML 2001: How to develop Syntax and XML Schema
IQPC Canada XML 2001: How to develop Syntax and XML SchemaIQPC Canada XML 2001: How to develop Syntax and XML Schema
IQPC Canada XML 2001: How to develop Syntax and XML Schema
 
IQPC Canada XML 2001: How to Use XML Parsing to Enhance Electronic Communication
IQPC Canada XML 2001: How to Use XML Parsing to Enhance Electronic CommunicationIQPC Canada XML 2001: How to Use XML Parsing to Enhance Electronic Communication
IQPC Canada XML 2001: How to Use XML Parsing to Enhance Electronic Communication
 
ApacheCon 2000 Everything you ever wanted to know about XML Parsing
ApacheCon 2000 Everything you ever wanted to know about XML ParsingApacheCon 2000 Everything you ever wanted to know about XML Parsing
ApacheCon 2000 Everything you ever wanted to know about XML Parsing
 

Recently uploaded

Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 

A Survey of Concurrency Constructs

  • 1. A Survey of Concurrency Constructs Ted Leung Sun Microsystems ted.leung@sun.com @twleung
  • 2.
  • 4.
  • 6. Today’s model  Threads  Program counter  Own stack  Shared Memory  Locks
  • 7. Some of the problems  Locks  manually lock and unlock  lock ordering is a big problem  locks are not compositional  How do we decide what is concurrent?  Need to pre-design, but now we have to retrofit concurrency via new requirements
  • 8. Design Goals/Space  Mutual Exclusion  Serialization / Ordering  Inherent / Implicit vs Explicit  Fine / Medium / Coarse grained  Composability
  • 9. A good solution  Is substantially less error prone  Makes it much easier to identify concurrency  Runs on today’s (and future) parallel hardware  Works if you keep adding cores/threads
  • 10. Theoretical Models  Actors  CSP  CCS  petri-nets  pi-calculus  join-calculus  Functional Programming
  • 11. Theoretical Models  Actors  CSP  CCS  petri-nets  pi-calculus  join-calculus  Functional Programming
  • 12. Implementation matters  Threads are not free  Message sending is not free  Context/thread switching is not free  Lock acquire/release is not free
  • 13. The models  Transactional Memory  Persistent data structures  Actors  Dataflow  Tuple spaces
  • 14. Transactional Memory  Original paper on STM 1995  Idea goes as far back as 1986  Tom Knight (Hardware Transactional Memory)  First appearance in a programming language  Concurrent Haskell 2005
  • 15. The Model  Use transactions on items in memory  Enclose code in begin/end blocks  Variations  specify manual abort/retry  specify an alternate path (way of controlling manual abort)
  • 16. Example (defn deposit [account amount] (dosync (let [owner (account :owner) balance-ref (account :balance-ref)] (do (alter balance-ref + amount) (println “depositing” amount (account :owner)))))))
  • 17. STM Design Space  STM Algorithms / Strategies  Granularity  word vs block  Locks vs Optimistic concurrency  Conflict detection  eager vs lazy  Contention management
  • 18. STM Problems  Non transactional access to STM cells  Non abortable operations  I/O  STM Overhead  read/write barrier elimination  Where to place transaction boundaries?  Still need condition variables  ordering problems are important  1/3 of non-deadlock problems in one study
  • 19. Implementations  Haskell/GHC  Use logs and aborts txns  Clojure STM - via Refs  based on ML Refs to confine changes, but ML Refs have no automatic (i.e. STM) concurrency semantics  only for Refs to aggregates  Implementation uses MVCC  Persistent data structures enable MVCC allowing decoupling of readers/writers (readers don’t wait)
  • 20. Persistent Data Structures  Original formulation circa 1981  Formalization 1986 Sarnoff  Popularized by Clojure
  • 21. The model  Upon “update”, previous versions are still available  preserve functionalness  both versions meet O(x) characteristics  In Clojure, combined with STM  Motivated by copy on write  hash-map, vector, sorted map
  • 22. Available data structures  Lists, Vectors, Maps  hash list based on VLists  VDList - deques based on VLists  red-black trees
  • 23. Available data structures  Real Time Queues and Deques  deques, output-restricted deques  binary random access lists  binomial heaps  skew binary random access lists  skew binomial heaps  catenable lists  heaps with efficient merging  catenable deques
  • 24. Problems  Not really a full model  Oriented towards functional programming
  • 25. Actors  Invented by Carl Hewitt at MIT (1973)  Formal Model  Programming languages  Hardware  Led to continuations, Scheme  Recently revived by Erlang  Erlang’s model is not derived explicitly from Actors
  • 27. Example object account extends Actor { private var balance = 0 def act() { loop { react { case Withdraw(amount) => balance -= amount sender ! Balance(balance) case Deposit(amount) => balance += amount sender ! Balance(balance) case BalanceRequest => sender ! Balance(balance) case TerminateRequest => } } }
  • 28. Problems with actors  DOS of the actor mail queue  Multiple actor coordination  reinvent transactions?  Actors can still deadlock and starve  Programmer defines granularity  by choosing what is an actor
  • 29. Actor Implementations  Scala  Scala Actors  Lift Actors  Erlang  CLR  F# / Axum
  • 30. Java  kilim  http://www.malhar.net/sriram/kilim/  Actor Foundry  http://osl.cs.uiuc.edu/af/  actorom  http://code.google.com/p/actorom/  Actors Guild  http://actorsguildframework.org/
  • 31. Measuring performance  actor creation?  message passing?  memory usage?
  • 32. Erlang vs JVM  Erlang  per process GC heap  tail call  distributed  JVM  per JVM heap  no tail call (fixed in JSR-292?)  not distributed  2 kinds of actors (Scala)
  • 33. Actor variants  Kamaelia  messages are sent to named boxes  coordination language connects outboxes to inboxes  box size is explicitly controllable
  • 34. Actor variants  Clojure Agents  Designed for loosely coupled stuff  Code/actions sent to agents  Code is queued when it hits the agent  Agent framework guarantees serialization  State of agent is always available for read (unlike actors which could be busy processing when you send a read message)  not in favor of transparent distribution  Clojure agents can operate in an ‘open world’ - actors answer a specific set of messages
  • 35. Last thoughts on Actors  Actors are an assembly language  OTP type stuff and beyond  Akka - Jonas Boner  http://github.com/jboner/akka
  • 36. Dataflow  Bill Ackerman’s PhD Thesis at MIT (1984)  Declarative Concurrency in functional languages  Research in the 1980’s and 90’s  Inherent concurrency  Turns out to be very difficult to implement  Interest in declarative concurrency is slowly returning
  • 37. The model  Dataflow Variables  create variable  bind value  read value or block  Threads  Dataflow Streams  List whose tail is an unbound dataflow variable  Deterministic computation!
  • 38. Example: Variables 1 object Test5 extends Application { import DataFlow._ val x, y, z = new DataFlowVariable[Int] val main = thread { println("Thread 'main'") x << 1 println("'x' set to: " + x()) println("Waiting for 'y' to be set...") if (x() > y()) { z << x println("'z' set to 'x': " + z()) } else { z << y println("'z' set to 'y': " + z()) } x.shutdown y.shutdown z.shutdown v.shutdown }
  • 39. Example: Variables 2 object Test5 extends Application { val setY = thread { println("Thread 'setY', sleeping...") Thread.sleep(5000) y << 2 println("'y' set to: " + y()) } // shut down the threads main ! 'exit setY ! 'exit System.exit(0) }
  • 40. Example: Streams object Test4 extends Application { import DataFlow._ def ints(n: Int, max: Int, stream: DataFlowStream[Int]): Unit = if (n != max) { println("Generating int: " + n) stream <<< n ints(n + 1, max, stream) } def sum(s: Int, in: DataFlowStream[Int], out: DataFlowStream[Int]): Unit = { println("Calculating: " + s) out <<< s sum(in() + s, in, out) } def printSum(stream: DataFlowStream[Int]): Unit = { println("Result: " + stream()) printSum(stream) } val producer = new DataFlowStream[Int] val consumer = new DataFlowStream[Int] thread { ints(0, 1000, producer) } thread { sum(0, producer, consumer) } thread { printSum(consumer) } }
  • 41. Example: Streams (Oz) fun {Ints N Max} if N == Max then nil else {Delay 1000} N|{Ints N+1 Max} end end fun {Sum S Stream} case Stream of nil then S [] H|T then S|{Sum H+S T} end end local X Y in thread X = {Ints 0 1000} end thread Y = {Sum 0 X} end {Browse Y} end
  • 42. Implementations  Mozart Oz  http://www.mozart-oz.org/  Jonas Boner’s Scala library (now part of Akka)  http://github.com/jboner/scala-dataflow  dataflow variables and streams  Ruby library  http://github.com/larrytheliquid/dataflow  dataflow variables and streams  Groovy  http://code.google.com/p/gparallelizer/
  • 43. Variations  Futures  Originated in Multilisp  Eager/speculative evaluation  Implementation quality matters  I-Structures  Id, pH (Parallel Haskell)  Single assignment arrays  cannot be rebound => no streams
  • 44. Problems  Can’t handle non-determinism  like a server  Need ports  this leads to actor like things
  • 45. Tuple Spaces  Originated in Linda (1984)  Popularized by Jini
  • 46. The Model  Three operations  write() (out)  take() (in)  read()
  • 47. The Model  Space uncoupling  Time uncoupling  Readers are decoupled from Writers  Content addressable by pattern matching  Can emulate  Actor like continuations  CSP  Message Passing  Semaphores
  • 48. Example public class Account implements Entry { public Integer accountNo; public Integer value; public Account() { ... } public Account(int accountNo, int value) { this.accountNo = newInteger(accountNo); this.value = newInteger(value); } } try { Account newAccount = new Account(accountNo, value); space.write(newAccount, null, Lease.FOREVER); } space.read(accountNo);
  • 49. Implementations  Jini/JavaSpaces  http://incubator.apache.org/river/RIVER/index.html  BlitzSpaces  http://www.dancres.org/blitz/blitz_js.html  PyLinda  http://code.google.com/p/pylinda/  Rinda  built in to Ruby
  • 50. Problems  Low level  High latency to the space - the space is contention point / hot spot  Scalability  More for distribution than concurrency
  • 51. Projects  Scala  Erlang  Clojure  Kamaelia  Haskell  Axum/F#  Mozart/Oz  Akka
  • 52. Work to be done  More in depth comparisons on 4+ core platforms  Higher level frameworks  Application architectures/patterns  Web  Middleware
  • 53. Final thoughts  Shared State is troublesome  immutability or  no sharing  It’s too early
  • 54. References  Actors: A Model of Concurrent Computation in Distributed Systems - Gul Agha - MIT Press 1986  Concepts, Techniques, and Models of Computer Programming - Peter Van Roy and Seif Haridi - MIT Press 2004