Controlled Scheduling of Concurrent Elixir Programs
Pages 67 - 75
Abstract
We describe the design and implementation of Scheduler, a new library for Elixir which provides a user-level scheduler. The goal is to improve the control over scheduling decisions, i.e., which process runs at which time, in order to obtain executions that are more random, but which are also repeatable and modifiable, and which moreover provide a detailed explanation of the scheduling decisions taken. This work is inspired by the Pulse user-level scheduler for Erlang programs, as well as other related tools. Our library is agnostic regarding what other testing/execution/formal verification tool uses the scheduler, and instruments Elixir code running under the scheduler through use of the Elixir macro facility. Moreover, the library provides a number of algorithms to explore the state space of the concurrent programs under study, including random search, depth-first search (potentially capable of exploring the whole state space of the program-under-study), and a novel search algorithm which selects schedules randomly. As an example the Scheduler library is applied to the task of checking whether a number of snapshot algorithms are correct.
References
[1]
Thomas Arts, John Hughes, Ulf Norell, Nicholas Smallbone, and Hans Svensson. 2011. Accelerating race condition detection through procrastination. In Proceedings of the 10th ACM SIGPLAN workshop on Erlang, Tokyo, Japan, September 23, 2011, Kenji Rikitake and Erik Stenman (Eds.). ACM, 14–22. https://doi.org/10.1145/2034654.2034659
[2]
Koen Claessen, Michal H. Palka, Nicholas Smallbone, John Hughes, Hans Svensson, Thomas Arts, and Ulf T. Wiger. 2009. Finding race conditions in Erlang with QuickCheck and PULSE. In Proceeding of the 14th ACM SIGPLAN international conference on Functional programming, ICFP 2009, Edinburgh, Scotland, UK, August 31 - September 2, 2009, Graham Hutton and Andrew P. Tolmach (Eds.). ACM, 149–160. https://doi.org/10.1145/1596550.1596574
[3]
Lars-Åke Fredlund and Hans Svensson. 2007. McErlang: a model checker for a distributed functional programming language. In Proceedings of the 12th ACM SIGPLAN International Conference on Functional Programming, ICFP 2007, Freiburg, Germany, October 1-3, 2007, Ralf Hinze and Norman Ramsey (Eds.). ACM, 125–136. https://doi.org/10.1145/1291151.1291171
[4]
Alkis Gotovos, Maria Christakis, and Konstantinos Sagonas. 2011. Test-driven development of concurrent programs using concuerror. In Proceedings of the 10th ACM SIGPLAN workshop on Erlang, Tokyo, Japan, September 23, 2011, Kenji Rikitake and Erik Stenman (Eds.). ACM, 51–61. https://doi.org/10.1145/2034654.2034664
[5]
Maurice P. Herlihy and Jeannette M. Wing. 1990. Linearizability: a correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst., 12, 3 (1990), jul, 463–492. issn:0164-0925 https://doi.org/10.1145/78969.78972
[6]
John M. Hughes and Hans Bolinder. 2011. Testing a Database for Race Conditions with QuickCheck. In Proceedings of the 10th ACM SIGPLAN Workshop on Erlang (Erlang ’11). Association for Computing Machinery, New York, NY, USA. 72–77. isbn:9781450308595 https://doi.org/10.1145/2034654.2034667
[7]
Prasad Jayanti. 2005. An optimal multi-writer snapshot algorithm. In Proceedings of the 37th Annual ACM Symposium on Theory of Computing, Baltimore, MD, USA, May 22-24, 2005, Harold N. Gabow and Ronald Fagin (Eds.). ACM, 723–732. https://doi.org/10.1145/1060590.1060697
[8]
Ivan Lanese, Naoki Nishida, Adrián Palacios, and Germán Vidal. 2018. CauDEr: A Causal-Consistent Reversible Debugger for Erlang. In Functional and Logic Programming - 14th International Symposium, FLOPS 2018, Nagoya, Japan, May 9-11, 2018, Proceedings, John P. Gallagher and Martin Sulzmann (Eds.) (Lecture Notes in Computer Science, Vol. 10818). Springer, 247–263. https://doi.org/10.1007/978-3-319-90686-7_16
[9]
Madanlal Musuvathi, Shaz Qadeer, Thomas Ball, Gérard Basler, Piramanayagam Arumuga Nainar, and Iulian Neamtiu. 2008. Finding and Reproducing Heisenbugs in Concurrent Programs. In 8th USENIX Symposium on Operating Systems Design and Implementation, OSDI 2008, December 8-10, 2008, San Diego, California, USA, Proceedings, Richard Draves and Robbert van Renesse (Eds.). USENIX Association, 267–280. http://www.usenix.org/events/osdi08/tech/full_papers/musuvathi/musuvathi.pdf
[10]
Manolis Papadakis and Konstantinos Sagonas. 2011. A PropEr Integration of Types and Function Specifications with Property-Based Testing. In Proceedings of the 10th ACM SIGPLAN Workshop on Erlang (Erlang ’11). Association for Computing Machinery, New York, NY, USA. 39–50. isbn:9781450308595 https://doi.org/10.1145/2034654.2034663
[11]
Chang-Seo Park and Koushik Sen. 2008. Randomized active atomicity violation detection in concurrent programs. In Proceedings of the 16th ACM SIGSOFT International Symposium on Foundations of Software Engineering, 2008, Atlanta, Georgia, USA, November 9-14, 2008, Mary Jean Harrold and Gail C. Murphy (Eds.). ACM, 135–145. https://doi.org/10.1145/1453101.1453121
[12]
Sergio Pérez, Luis Eduardo Bueso de Barrio, Ignacio Ballesteros, Ángel Herranz, Julio Mariño, Clara Benac Earle, and Lars-Åke Fredlund. 2022. Executable contracts for Elixir. In Erlang ’22: 21st ACM SIGPLAN International Workshop on Erlang, Ljubljana, Slovenia, 11 September 2022, Stavros Aronis and Burcu Kulahcioglu Ozkan (Eds.). ACM, 40–46. https://doi.org/10.1145/3546186.3549930
Index Terms
- Controlled Scheduling of Concurrent Elixir Programs
Recommendations
Concurrent open shop scheduling to minimize the weighted number of tardy jobs
We consider a relaxed version of the open shop scheduling problem--the "concurrent open shop" scheduling problem, in which any two operations of the same job on distinct machines are allowed to be processed concurrently. The completion time of a job is ...
Comments
Information & Contributors
Information
Published In

August 2024
107 pages
Copyright © 2024 Copyright is held by the owner/author(s). Publication rights licensed to ACM.
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].
Sponsors
Publisher
Association for Computing Machinery
New York, NY, United States
Publication History
Published: 28 August 2024
Check for updates
Author Tags
Qualifiers
- Research-article
Funding Sources
- Spanish MCI\/AEI
Conference
Erlang '24
Sponsor:
Acceptance Rates
Overall Acceptance Rate 51 of 68 submissions, 75%
Upcoming Conference
ICFP '25
- Sponsor:
- sigplan
Contributors
Other Metrics
Bibliometrics & Citations
Bibliometrics
Article Metrics
- 0Total Citations
- 43Total Downloads
- Downloads (Last 12 months)43
- Downloads (Last 6 weeks)1
Reflects downloads up to 08 Mar 2025
Other Metrics
Citations
View Options
Login options
Check if you have access through your login credentials or your institution to get full access on this article.
Sign in