ATLAS: Adaptable Thread-Level Address Spaces (DFG: LO 1719/7-1 and DI 2840/1-1)
Traditionally, an OS process contains a single address space with code and data segments that are shared among all of its threads. The fork() system call creates a new address space (and process) that, even though it starts as an exact clone of its ancestor, provides strong isolation between the respective threads by means of copy-on-write.
The core idea of ATLAS is to provide processes with additional address spaces that are, however, kept in sync with their ancestor: Changes to one of them – we call them address-space views – become immediately visible in the others. Views diverge only in explicitly specified areas. As they still belong to the same process, the threads of this process can be migrated individually between views.
Address-space views provide an efficient mean to implement temporary or permanent thread-level variations in the "view of the world", while threads can still interact with each other regarding the shared parts. In the figure, the code segment diverges and provides a thread-specific variation (e.g., an client-specific optimization or restriction of functionality), while the data segment is shared, so that th1 can still transparently interact with th2 and th3. Such variations can be arbitrary small or complex. They can be prepared in the background in a new view and atomically applied to individual threads by migrating them to the new address space.
Address-space views are currently implemented as an extension for the Linux Kernel. The source code is available on Github (luhsra/linux-mmview).
In our OSDI '20 paper, we present a first application of these technique to implement WfPatch, a wait-free dynamic code-patching approch for large multi-threaded server applications.
- ATLAS: Adaptable Thread-Level Address Spaces (DFG: LO 1719/7-1 and DI 2840/1-1)
- In the ATLAS project, we investigate dynamic specialization and containment by means of thread-level address-space variations.
Florian Rommel presents our paper From Global to Local Quiescence: Wait-Free Code Patching of Multi-Threaded Processes at OSDI '20 – due to Corona by video.
In the paper, we present WfPatch, a wait-free approach to inject code changes into running multi-threaded programs. Instead of having to stop the world before applying a patch, WfPatch can gradually apply it to each thread individually at a local point of quiescence, while all other threads can make uninterrupted progress.
WfPatch is the first outcome of our novel concept on adaptable thread-level address spaces, which we are investigating in the ATLAS project.
From Global to Local Quiescence: Wait-Free Code Patching of Multi-Threaded Processes
14th Symposium on Operating System Design and Implementation (OSDI '20)2020.