JUCS - Journal of Universal Computer Science 14(21): 3556-3572, doi: 10.3217/jucs-014-21-3556
Exploring Lua for Concurrent Programming
expand article infoAlexandre Skyrme, Noemi Rodriguez, Roberto Ierusalimschy§
‡ Pontifical Catholic University of Rio de Janeiro, Rio de Janeiro, Brazil§ PUC-Rio, Rio de Janeiro, Brazil
Open Access
Abstract
The popularization of multi-core processors and of technologies such as hyper-threading demonstrates a fundamental change in the way processors have been evolving and also increases interest in concurrent programming, particularly as a means to improve software performance. However, concurrent programming is still considered complex, mostly due to difficulties in using the available programming models, which have been subject to recurring criticism. The increased interest in concurrency and the lack of proper models to support it stimulates the development of proposals aimed at providing alternative models for concurrent programming. In this paper, we work with some of Lua's facilities to explore such a model, based on user threads and message passing. We also demonstrate why Lua was particularly well suited for this objective, describe the main characteristics of the explored model and present a library developed to implement it, along with results of a performance evaluation.
Keywords
Lua, preemptive multithreading, non-preemptive multithreading, concurrency, luaproc, message passing