Expanding the musl-libc Dynamic Loader by Morsel Support
- Typ der Arbeit: Bachelorarbeit
- Status der Arbeit: reserviert
- Projekte: ParPerOS
- Betreuer: Daniel Lohmann, Nils Fuhler
Context
When a program is compiled into a dynamically linked ELF file, not all libraries the program uses are included in it. Instead, they only contain references to them. When the program is started, a dynamic loader is invoked. Its job is to map the dynamic libraries needed into the process' address space.
When multiple processes open a dynamic library, Linux shares the pages containing the library between the processes. The page tables, however, have to be newly generated for every process.
Problem
Morsels are self-contained virtual-memory objects. Essentially, they are subtrees of the page table tree and share their page table tree across processes. This means that the page tables in the morsels only have to be generated once, which should reduce the time needed to map a shared library into the address space. In order to further investigate this, the dynamic loader has to have support for morsels.
Goal
In your thesis, you implement support for morsels into the musl-libc dynamic loader. With this implementation, you can then analyze the startup behavior of applications with and without morsels.
Your thesis could follow these key steps:
-
Familiarize yourself: Familiarize yourself with morsels and their implementation, as well as musl's dynamic loader.
-
Implement morsel support: Add support for morsels to the dynamic loader. This may require adding custom linker scripts to achieve the correct alignment.
-
Analyze and evaluate: Analyze the behavior and performance of applications during startup and runtime. For this, you could leverage microbenchmarks and flamegraphs.
-
Optimize: Optimize your implementation based on your previous analysis. This might include tweaking the alignment, page size, morsel order, ...
-
(Optional) iTLB: If there is time left, you can investigate the performance impact of the iTLB when mapping libraries with huge pages.
References
Weblinks
Papers
