Abstract
The actor model has already proven itself as an interesting concurrency model that avoids issues such as deadlocks and race conditions by construction, and thus facilitates concurrent programming. The tradeoff is that it sacrifices expressiveness and efficiency especially with respect to data parallelism. However, many standard solutions to computationally expensive problems employ data parallel algorithms for better performance on parallel systems.
We identified three problems that inhibit the use of data-parallel algorithms within the actor model. Firstly, one of the main properties of the actor model, the fact that no data is shared, is one of the most severe performance bottlenecks. Especially the fact that shared state can not be read truly in parallel. Secondly, the actor model on its own does not provide a mechanism to specify extra synchronization conditions on batches of messages which leads to event-level data-races. And lastly, programmers are forced to write code in a continuation-passing style (CPS) to handle typical request-response situations. However, CPS breaks the sequential flow of the code and is often hard to understand, which increases complexity and lowers maintainability.
We proposes synchronization views to solve these three issues without compromising the semantic properties of the actor model. Thus, the resulting concurrency model maintains deadlock-freedom, avoids low-level race conditions, and keeps the semantics of macro-step execution.
- G. Agha. Actors: a model of concurrent computation in distributed systems. AITR-844, 1985.Google Scholar
- C. Hewitt, P. Bishop, and R. Steiger. A universal modular actor formalism for artificial intelligence. In Proceedings of the 3rd international joint conference on Artificial intelligence, pages 235245. Morgan Kaufmann Publishers Inc., 1973. Google ScholarDigital Library
- J. Armstrong, R. Virding, C. Wikstrom, and M. Williams. Concurrent programming in erlang. 1996. Google ScholarDigital Library
- C. Varela and G. Agha. Programming dynamically reconfigurable open systems with salsa. ACM SIGPLAN Notices, 36(12):2034, 2001. Google ScholarDigital Library
- T. Van Cutsem, S. Mostinckx, E. Boix, J. Dedecker, and W. De Meuter. Ambienttalk: Object-oriented event-driven programming in mobile ad hoc networks. In Chilean Society of Computer Science, 2007. SCCC07. XXVI International Conference of the, pages 312. Ieee, 2007. Google ScholarDigital Library
- B. Demsky and P. Lam. Views: Object-inspired concurrency control. In Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering-Volume 1, pages 395404. ACM, 2010. Google ScholarDigital Library
- R. Karmani, A. Shali, and G. Agha. Actor frameworks for the JVM platform: A comparative analysis. In Proceedings of the 7th International Conference on Principles and Practice of Programming in Java, pages 1120. ACM, 2009. Google ScholarDigital Library
Index Terms
- Synchronization views for event-loop actors
Recommendations
Synchronization views for event-loop actors
PPoPP '12: Proceedings of the 17th ACM SIGPLAN symposium on Principles and Practice of Parallel ProgrammingThe actor model has already proven itself as an interesting concurrency model that avoids issues such as deadlocks and race conditions by construction, and thus facilitates concurrent programming. The tradeoff is that it sacrifices expressiveness and ...
Comments