Abstract

Actor-based languages attract attention for their ability to scale to highly parallel architectures. Active objects combine the asynchronous communication of actors with object-oriented programming by means of asynchronous method calls and synchronization on futures. However, the combination of asynchronous calls and synchronization may introduce communication cycles which lead to a form of communication deadlock and livelock. This paper addresses such communication deadlocks and livelocks for ABS, a formally defined active object language which additionally supports cooperative scheduling to express complex distributed control flow, using first-class futures and explicit process release points. Our approach is based on a translation of the semantics of ABS into colored Petri nets, such that a program and its state correspond to a marking of this net. We prove the soundness of this translation and demonstrate by example how the implementation of this net can be used to analyze ABS programs with respect to communication deadlocks and livelocks.

Highlights

  • The Actor model [1, 2] of concurrency is attracting increasing attention for their decoupling of control flow and communication

  • After a short introduction covering the core ideas of the translation, in Section 4.2 we highlight crucial parts of how the Abstract Behavioral Specification language (ABS) semantics are represented on the Petri net level, focusing on parts of the communication mechanism, in particular dealing with asynchronous method calls and the resolution of futures via get

  • colored Petri nets (CPN)-ABS detects a communication deadlock cycle shown in Fig. 6, where p ∈ q and p ∈ q and both objects are trapped in the place “Blocked Objects” and cannot exit from there; in Fig. 6, the third and the fifth argument in the color tuples are outside of the scope of this work, so we ignore them, while, the existence of the two zero value tokens is for initialization reasons and they do not affect the deadlock analysis

Read more

Summary

Introduction

The Actor model [1, 2] of concurrency is attracting increasing attention for their decoupling of control flow and communication. The caller synchronizes with the existence of a reply from a method call by performing a blocking get-operation on the future associated with the call This synchronization may lead to complex dependency cycles in the communication chain of a program, and gives rise to a form of deadlock with a set of mutually blocked objects. – a deep encoding of the formal semantics of ABS in CPNs; – a translation of concrete ABS programs into markings of this net; – a soundness proof for the translation from ABS to CPN; and – an example demonstrating how to analyze communication deadlocks for active objects in ABS using the implementation of this net in CPN Tools [24].

The Abstract
The Syntax
The Operational Semantics
Colored Petri Nets
Translating ABS Semantics to Colored Petri Nets
Overview over the Petri Net Semantics for ABS
CPN-ABS Communication Mechanism
The Abstraction Function
Soundness Proof of the Translation
Deadlock Detection
Example
Related Work
Conclusion
Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.