Region-based Memory Management and Actor Model Concurrency An initial study of how the combination performs
Sammanfattning
Modern computer systems and the requirements we place upon them are vastly
different from those of early systems. With the emergence of Internet of Things
(IoT) devices, the number of devices with hard, real-time deadlines have increased
greatly. The presence of a garbage collector does not resonate well with such systems,
as garbage collectors typically use a stop-the-world approach. The problem
is amplified further in languages such as Erlang, where it is commonplace to spawn
many processes. In Erlang, each process has its own heap which is individually
garbage collected.
A common design of an IoT device is a board with several different sensors and
peripherals. The presence of so many garbage collectors should be enough to deter
us from using Erlang to program IoT devices, but the idea of writing small, isolated
programs to manage each of the sensors is appealing.
Another memory management principle, one which could eliminate the need for
a garbage collector, is called Region-based Memory Management. This thesis has
investigated how well current Region-based Memory Management techniques work
when they are applied to a setting that implements Actor Model concurrency. To investigate
this an Actor Model concurrency-library has been implemented in Standard
ML and compiled with the MLKit compiler - a compiler which uses Region-Based
memory management.
Evaluating the speed and memory performance of the library shows that the combination
performs poorly. The Region-inference algorithm employed by the compiler
struggles with identifying when data can be deallocated and retains most data
throughout the execution of a program. We identify some key problems and propose
how they could be solved.
We conclude that current techniques are not well suited in a setting with Actor
Model concurrency. We cannot, however, say if the combination of Region-based
memory management and the Actor concurrency model works well or not, as further
research is required.
Examinationsnivå
Student essay
Samlingar
Fil(er)
Datum
2020-11-06Författare
Krook, Robert
Nyckelord
Region-based memory management
Standard ML
Actor-Model Concurrency
Functional programming
Språk
eng