Concurrent Message Processing using Transactional Memory in the Actor Model WTM 2013 Pascal Felber, Derin Harmanci, Yaroslav Hayduk and Anita Sobe

Slides:



Advertisements
Similar presentations
Transactions - Concurrent access & System failures - Properties of Transactions - Isolation Levels 4/13/2015Databases21.
Advertisements

Concurrency Control WXES 2103 Database. Content Concurrency Problems Concurrency Control Concurrency Control Approaches.
Crash Recovery John Ortiz. Lecture 22Crash Recovery2 Review: The ACID properties  Atomicity: All actions in the transaction happen, or none happens 
Parallel and Distributed Simulation Global Virtual Time - Part 2.
IDIT KEIDAR DMITRI PERELMAN RUI FAN EuroTM 2011 Maintaining Multiple Versions in Software Transactional Memory 1.
Concurrency The need for speed. Why concurrency? Moore’s law: 1. The number of components on a chip doubles about every 18 months 2. The speed of computation.
1 OBJECT-ORIENTED CONCEPTS. 2 What is an object?  An object is a software entity that mirrors the real world in some way.  A software object in OOP.
1 Chapter 1 Why Parallel Computing? An Introduction to Parallel Programming Peter Pacheco.
This project and the research leading to these results has received funding from the European Community's Seventh Framework Programme [FP7/ ] under.
Variational Inference in Bayesian Submodular Models
Virtual Synchrony Jared Cantwell. Review Multicast Causal and total ordering Consistent Cuts Synchronized clocks Impossibility of consensus Distributed.
Chapter 5 Concurrency: Mutual Exclusion and Synchronization Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee.
1 Distributed Computing Algorithms CSCI Distributed Computing: everything not centralized many processors.
Transaction Processing Lecture ACID 2 phase commit.
CS 584. A Parallel Programming Model We need abstractions to make it simple. The programming model needs to fit our parallel machine model. Abstractions.
1 Friday, September 29, 2006 If all you have is a hammer, then everything looks like a nail. -Anonymous.
1 Multiprocessors. 2 Idea: create powerful computers by connecting many smaller ones good news: works for timesharing (better than supercomputer) bad.
Concurrency CS 510: Programming Languages David Walker.
3.5 Interprocess Communication Many operating systems provide mechanisms for interprocess communication (IPC) –Processes must communicate with one another.
Active Messages: a Mechanism for Integrated Communication and Computation von Eicken et. al. Brian Kazian CS258 Spring 2008.
Concurrency, Threads, and Events Robbert van Renesse.
1 CSE SUNY New Paltz Chapter Nine Multiprocessors.
Scala Actors -Terrance Dsilva.  Thankfully, Scala offers a reasonable, flexible approach to concurrency  Actors aren’t a concept unique to Scala.
Commit Protocols. CS5204 – Operating Systems2 Fault Tolerance Causes of failure: process failure machine failure network failure Goals : transparent:
Ch4: Distributed Systems Architectures. Typically, system with several interconnected computers that do not share clock or memory. Motivation: tie together.
Lecture 4: Parallel Programming Models. Parallel Programming Models Parallel Programming Models: Data parallelism / Task parallelism Explicit parallelism.
Inter-process Communication and Coordination Chaitanya Sambhara CSC 8320 Advanced Operating Systems.
An Example Use Case Scenario
Programming Paradigms for Concurrency Part 2: Transactional Memories Vasu Singh
Chapter 19 Recovery and Fault Tolerance Copyright © 2008.
Transaction Communications Yi Sun. Outline Transaction ACID Property Distributed transaction Two phase commit protocol Nested transaction.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
A Fault Tolerant Protocol for Massively Parallel Machines Sayantan Chakravorty Laxmikant Kale University of Illinois, Urbana-Champaign.
RAM, PRAM, and LogP models
1 Concurrency Architecture Types Tasks Synchronization –Semaphores –Monitors –Message Passing Concurrency in Ada Java Threads.
WG5: Applications & Performance Evaluation Pascal Felber
This project and the research leading to these results has received funding from the European Community's Seventh Framework Programme [FP7/ ] under.
SPECULATIVE EXECUTION IN A DISTRIBUTED FILE SYSTEM E. B. Nightingale P. M. Chen J. Flint University of Michigan.
Commit Algorithms Hamid Al-Hamadi CS 5204 November 17, 2009.
Software Transactional Memory Should Not Be Obstruction-Free Robert Ennals Presented by Abdulai Sei.
Chapter 4 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University Building Dependable Distributed Systems.
CS533 – Spring Jeanie M. Schwenk Experiences and Processes and Monitors with Mesa What is Mesa? “Mesa is a strongly typed, block structured programming.
1/12 Distributed Transactional Memory for Clusters and Grids EuroTM, Paris, May 20th, 2011 Michael Schöttner.
EEC 688/788 Secure and Dependable Computing Lecture 9 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Concurrent Object-Oriented Programming Languages Chris Tomlinson Mark Scheevel.
Agenda  Quick Review  Finish Introduction  Java Threads.
1/50 University of Turkish Aeronautical Association Computer Engineering Department Ceng 541 Introduction to Parallel Computing Dr. Tansel Dökeroğlu
Testing Concurrent Programs Sri Teja Basava Arpit Sud CSCI 5535: Fundamentals of Programming Languages University of Colorado at Boulder Spring 2010.
Architecture and Design of the AlphaServer GS320 Gharachorloo, et al. (Compaq) Presented by Curt Harting
Operating System Reliability Andy Wang COP 5611 Advanced Operating Systems.
Development of concurrent and distributed programs with the Actor model and Akka César Aguilera Padilla Thematic CERN School of Computing Split, 27th of.
Minh, Trautmann, Chung, McDonald, Bronson, Casper, Kozyrakis, Olukotun
The University of Adelaide, School of Computer Science
Operating System Reliability
Operating System Reliability
Timewarp Elias Muche.
Transactional Memory Semaphores, monitors, and conditional critical regions all suffer from limitations based on lock semantics Naïve synchronization may.
Operating System Reliability
Operating System Reliability
Concurrency Control WXES 2103 Database.
Does Hardware Transactional Memory Change Everything?
Dr. Tansel Dökeroğlu University of Turkish Aeronautical Association Computer Engineering Department Ceng 442 Introduction to Parallel.
Typically for using the shared memory the processes should:
Operating System Reliability
Transactions in Distributed Systems
Operating System Reliability
Transaction Communication
Operating System Reliability
Presentation transcript:

Concurrent Message Processing using Transactional Memory in the Actor Model WTM 2013 Pascal Felber, Derin Harmanci, Yaroslav Hayduk and Anita Sobe

The Actor Model Hewitt & Baker - „Laws for Communicating Parallel Processes“ Motivated by the prospect of highly parallel computing machines with many microprocessors + own local memory Yaroslav Hayduk2

The Actor Model – basic principles everything is an actor (VS an object) asynchronous message passing has access to its local state only strong encapsulation inherently concurrent Yaroslav Hayduk3

OOP and Actors: Communication Yaroslav Hayduk4 Object A Object B Actor A Object B ObjectB.publicField=10 ObjectB.publicMethod() ActorA [SendMessageTo] ActorB VS asynchronous message passing direct access

Essential Actor properties Processes one message at a time – Yey! No race conditions or other hazards No (access to) shared state Can send messages to other actors only Switch its behavior Yaroslav Hayduk5

Behind the (Actor) scenes Yaroslav Hayduk6 Mailbox … Contains 2 Insert Local Actor state In progress: Contains 8 C C A A B B A “List” Actor Remove 9

Main issues 1. The processing of one message at a time Yaroslav Hayduk7

Notable Related Work Scholliers et al. – Parallel Actor Monitors – does not use STM for processing messages concurrently Shams et al. – Habanero Scala – async-finish programming model – processes parts of one message (and not many messages) concurrently Yaroslav Hayduk8

Idea: Process multiple messages concurrently Problem: the list can be easily corrupted Solution: Wrap each message processing in an STM transaction. When conflicts happen, (roll back and) repeat the message processing Yaroslav Hayduk9

Concurrent message processing Yaroslav Hayduk10 Actor Mailbox … Contains 2 Insert Local Actor state A “List” Actor Messages In progress A “List” Actor Messages In progress Contains 6 Insert 12 … Each message is processed in a transaction

Coordinated Transactions Yaroslav Hayduk11 A A A List Range (1..25) Actor Global list sum A List Range ( ) Actor ……….

Local Actor Sum: Zoom-in Yaroslav Hayduk Local Actor state A List Range Actor Messages In progress A List Range Actor Messages In progress 1.Calculate local sum 2.Forward new partial sum 3.Block (for consistency) New partial sum Prev partial sum

Main issues 2. Extensive blocking of actors involved in a coordinated transaction Yaroslav Hayduk13

Idea: Remove blocking; process other messages speculatively Pre-commit the local coordinated transaction Process other messages in a transaction speculatively Yaroslav Hayduk14

Non-blocking coordinated transactions Yaroslav Hayduk Local Actor state A List Range Actor Messages In progress A List Range Actor Messages In progress Saved: Partially committed local coordinated transaction Actor Mailbox … Contains 2 List sum Speculatively process: Insert 3

Evaluation Yaroslav Hayduk16

Evaluation Yaroslav Hayduk17

Summary By using speculation, we can achieve a higher message throughput in the Actor Model By using STM we guarantee that the Actor’s state is never corrupted Yaroslav Hayduk18

Thank you Questions?