Date: April 21, 2025

Topic: LRVM

Recall

To make persistence efficient, we use logsegs which allows for contiguous writing to maintain data structs on the VM and disk, and also reduces the number of I/O operations to the disk.

Notes

Persistence

Making Persistence Efficient

image.png

LRVM Purpose


Apps designate collections of persistent data structs called data segments (like on-disk inodes) and map them into selected regions of their virtual address space so any in-memory updates are reflected back to disk.

At startup, an app can map these segments, and unmapping can be done when no commits are pending.

Server Design

image.png


At the start, we need to identify the logseg for the server process, so that persistent data structs can be maintained.

We also map the region of the VA space to external data segments (or unmap them later if needed).






<aside> 📌 SUMMARY: Lightweight Reliable Virtual Memory (LRVM) uses persistent log segments to make in-memory modifications into sequential redo logs for efficient sequential disc operations. Subsystems map named data segments (like inodes) into regions of the VA space. LRVM uses simple primitives initialize, begin_xact, set_range, end_xact and abort_xact to record only necessary changes to the stated memory ranges. At commit, redo logs are flushed to disk (if not in no_flush mode) and undo logs are discarded (or restored for abort). Log truncation and recovery tasks can then apply the logs to persistent storage, thus reclaiming space. These log transactions are also simple and lightweight, without full ACID properties and can be done in parallel with the app’s forward progress.

</aside>


Date: April 22, 2025

Topic: RioVista