The carbon footprint of software activities is determined by embodied and operational emissions of hardware resources. This paper presents cMemento, a concept that enables operating systems to make carbon-aware memory placement decisions. Main memory has become heterogeneous in today's computer systems. In addition to traditional (and volatile) main memory (e.g. DRAM), novel memory technologies with persistent properties are often also available (e.g. PRAM, FRAM, MRAM). Complementary, there are a large number of new memory interfaces (e.g. high-bandwidth, graphics, and low-power memory) that have to be additionally taken into account by the operating system when allocating memory. The availability of new memory technologies and interfaces enables systems with improved energy efficiency. At the same time, the new memory interfaces have revealed serious flaws in the current state-of-the-art memory abstractions in operating systems. Hence, moving away from the homogeneous perspective of memory resources is a crucial step towards significantly reducing the energy consumption and, ultimately, the carbon footprint of today's computer systems. With cMemento, we propose an approach that combines information on characteristics of (i) active workloads and (ii) available memory resources with a carbon model. cMemento transforms the combined information into memory placement decisions at operating system level. The placement decisions that are made result in improved operating conditions (i.e. better energy efficiency and lower carbon footprint) for the available memory resources.
High-performance IO demands low-overhead communication between user- and kernel space. This demand can no longer be fulfilled by traditional system calls. Linux’s extended Berkeley Packet Filter (BPF) avoids user-/kernel transitions by just-in-time compiling user-provided bytecode and executing it in kernel mode with near-native speed. To still isolate BPF programs from the kernel, they are statically analyzed for memory- and type-safety, which imposes some restrictions but allows for good expressiveness and high performance. However, to mitigate the Spectre vulnerabilities disclosed in 2018, defenses which reject potentially-dangerous programs had to be deployed. We find that this affects Math 1 to Math 2 of programs in a dataset with 844 real-world BPF programs from popular open-source projects. To solve this, users are forced to disable the defenses to continue using the programs, which puts the entire system at risk. To enable secure and expressive untrusted Linux kernel extensions, we propose VeriFence, an enhancement to the kernel’s Spectre defenses that reduces the number of BPF application programs rejected from Math 3 to zero. We measure VeriFence’s overhead for all mainstream performance-sensitive applications of BPF (i.e., event tracing, profiling, and packet processing) and find that it improves significantly upon the status-quo where affected BPF programs are either unusable or enable transient execution attacks on the kernel.