Thanks to the advancements in the research and development of high-speed nonvolatile memory (NVM) in recent years, the possibility has emerged that all hard disks and DRAM could be replaced by NVM. In this paper, we consider a computer with an architecture in which hard disks and DRAM are all replaced by NVM. In a conventional architecture, to perform a write operation to a file on an HDD data is copied to memory, modified, and written back to the storage. If the same process is followed in the NVM architecture, the high speed of NVM cannot be fully utilized. For this reason, in the NVM architecture files are mapped by mmap to virtual memory, and written directly as data on the NVM. On the NVM architecture, because writing to the mmaped area immediately takes effect on the file, there is no need to use msync. However, in such a case the consistency of the data cannot be guaranteed at a time of failure. In order to guarantee the consistency, we implemented a mechanism to create a copy of the file to be written. Writing is performed on the copy, and the copy becomes the original through a proposed atomic synchronization operation. In order to perform atomic synchronization, we implemented a mechanism to record journals. This paper describes the design and implementation in detail, and finally provides a performance evaluation.