Moridi, Mohammad2023-09-212023-09-212023-09-19http://hdl.handle.net/10012/19907In this research, we explore ways to enhance the reliability of persistent memory systems. Using Montage (ICPP'21) as our reference model, we identify areas of potential improvement, especially concerning the risk of data loss in certain failure scenarios. Our investigation led us to focus on the concept of snapshotting and its role in system resilience. We delve into various consistency models for snapshotting mechanisms and introduce a new definition for snapshotting consistency known as Buffered-Durable Consistency. Montage offers impressive resilience against system-wide crash failures. However, we perceive opportunities for further fortification, specifically when persistent memory failures occur, which can lead to substantial data loss. Addressing this challenge, we propose two new snapshotting mechanisms - stop-the-world and online snapshotting - for memory-mapped files. These mechanisms selectively replicate only those data portions that have been modified since the last snapshot, thus significantly reducing the volume of data copying during snapshot operations. In order to ensure data consistency and optimize snapshotting, we introduce modifications to both Montage and its allocator. This includes a parallel chunk-copying strategy for the stop-the-world snapshotting implementation. Additionally, our online snapshotting mechanism allows updates to chunks not being replicated by the snapshotter, which increases system responsiveness. We have also developed an algorithm that, when snapshotting is not in progress, disables the reader locks, reducing the overhead associated with such locks and further enhancing performance. To demonstrate the effectiveness of our approach, we present an experimental analysis showing throughput and latency for various scenarios. Overall, our work not only heightens the fault tolerance capabilities of Montage, but also offers critical insights and potential directions for future research and optimization in the field of persistent memory, especially for memory-mapped file replication.enpersistent memorydata loss preventionsnapshotting mechanismsstop-the-world snapshottingonline snapshottingmemory-mapped filesreader lock optimizationfault tolerancedata consistency modelsbuffered durable linearizabilitybuffered durable consistencySnapshotting Mechanisms for Persistent Memory-Mapped FilesMaster Thesis