Bestow and Atomic: Concurrent Programming using Isolation, Delegation and Grouping

07/26/2018
by   Elias Castegren, et al.
0

Any non-trivial concurrent system warrants synchronisation, regardless of the concurrency model. Actor-based concurrency serialises all computations in an actor through asynchronous message passing. In contrast, lock-based concurrency serialises some computations by following a lock--unlock protocol for accessing certain data. Both systems require sound reasoning about pointers and aliasing to exclude data-races. If actor isolation is broken, so is the single-thread-of-control abstraction. Similarly for locks, if a datum is accessible outside of the scope of the lock, the datum is not governed by the lock. In this paper we discuss how to balance aliasing and synchronisation. In previous work, we defined a type system that guarantees data-race freedom of actor-based concurrency and lock-based concurrency. This paper extends this work by the introduction of two programming constructs; one for decoupling isolation and synchronisation and one for constructing higher-level atomicity guarantees from lower-level synchronisation. We focus predominantly on actors, and in particular the Encore programming language, but our ultimate goal is to define our constructs in such a way that they can be used both with locks and actors, given that combinations of both models occur frequently in actual systems. We discuss the design space, provide several formalisations of different semantics and discuss their properties, and connect them to case studies showing how our proposed constructs can be useful. We also report on an on-going implementation of our proposed constructs in Encore.

READ FULL TEXT

Authors

page 1

page 2

page 3

page 4

04/12/2021

Actors – A Process Algebra Based Approach

We model actors based on truly concurrent process algebra, and capture t...
03/28/2018

Deadlock-Free Typestate-Oriented Programming

Context. TypeState-Oriented Programming (TSOP) is a paradigm intended to...
10/28/2020

Actris 2.0: Asynchronous Session-Type Based Reasoning in Separation Logic

Message passing is a useful abstraction for implementing concurrent prog...
10/30/2020

Advanced Join Patterns for the Actor Model based on CEP Techniques

Context: Actor-based programming languages offer many essential features...
09/30/2018

A Configurable Transport Layer for CAF

The message-driven nature of actors lays a foundation for developing sca...
01/12/2018

Mailbox Types for Unordered Interactions

We propose a type system for reasoning on protocol conformance and deadl...
12/07/2019

Programming Scalable Cloud Services with AEON

Designing low-latency cloud-based applications that are adaptable to unp...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.