1.3 How qBeta differs from Beta
- The basic synchronisation mechanism in Beta is a Semaphore. In qBeta it is a compare-and-swap operation (
cmpAndSwap
). The cmpAndSwap
operation may then be used as the basis for defining synchronisation mechanisms like Lock and Semaphore. It is furthermore possible to define high-level concurrency abstractions like Monitor, Ada-rendezvous, message-passing systems, asynchronous method invocations, etc. Just as in Beta.
- For qBeta it is possible to run concurrent processes on a multi-core platforms. And as for Beta, it is possible to write schedulers in qBeta.
- One goal for qBeta is to be able to build bare-metal implementations without an operating system thus reducing the size of the code and keeping full control of the scheduling of processes.
- Concurrency abstractions in Beta are by nature unsafe since the language and compiler is not able to guarantee exclusive access to shared data. This is also the case for mainstream languages like Java, C++, C# and Python.
- In order to build safe concurrency abstractions qBeta has a mechanism called Supplementary Properties that may be used to define safe concurrency abstractions. Supplementary properties are described in:
- Ole Lehrmann Madsen. 2014. Building Safe Concurrency Abstractions. In Concurrent Objects and Beyond, G. Agha, A. Igarashi, N. Kobayashi, H. Masuhara, S. Matsuoka, E. Shibayama, and K Taura (Eds.). Springer, Berlin, Heidelberg, 66–104.
- Ole Lehrmann Madsen. Using Coroutines for Multi-core Preemptive Scheduling. Proceedings of the 11th Workshop on Programming Languages and Operating Systems (PLOS ’21). New York: Association for Computing Machinery, 2021. p. 46-52. https://doi.org/10.1145/3477113.3487271
- The syntax of qBeta is inspired by Python with repeat to blocks of declarations and statements that are defined by means of indentation instead of curly brackets.
- Parameters of patterns (and thus methods and classes) may be defined using fat commas as originally proposed in Algol 60, and resembles keyword messages in Smalltalk
- qBeta distinguishes between values and objects just as there is support for dimensions and units. Thanks to XX and YY for the latter!