Programming for Non-Volatile Main Memory Is Hard

Proceedings of the 8th Asia-Pacific Workshop on Systems (APSys '17) |

Published by ACM

Using non-volatile memory as main memory (NVMM) can largely improve the performance of applications, but adds to the challenge of programming — it turns out to be very error-prone to write real-world NVMM programs, especially with object-oriented programming. This paper presents a field study of erroneous NVMM programs written by programmers who are trained to use a general NVMM programming interface. We performed the field study in a training workshop of 30 participants. Our observations and derived best practices offer a reference for future NVMM programming techniques design. Toward that end, we propose a taxonomy of latest NVMM programming techniques and, accordingly, a set of paradigms that can reduce the risk of NVMM-specific bugs. The paradigms incorporate a minimal NVMM library interface design and a new design pattern inspired by the field study.