-
公开(公告)号:US20220334918A1
公开(公告)日:2022-10-20
申请号:US17763926
申请日:2020-06-16
Inventor: Wei TONG , Dan FENG , Jingning LIU , Xueliang WEI , Weilin ZHU
Abstract: Disclosed in the present invention are a method and a system for ensuring the failure atomicity in a non-volatile memory, which belong to the field of computer storage. The method comprises: executing transactions encapsulated by one or more operations that need to ensure the failure atomicity in accordance with the following steps: executing operations in a current transaction in sequence, for each write operation in the current transaction, determining whether the oldest value of its corresponding data is saved into a log of the non-volatile memory, if so, then creating an UndoRedo log entry for it, otherwise creating a Redo log entry for it; using corresponding log management strategies according to types of log entries; after all operations are executed, committing the current transaction; and completing the execution of the current transaction; wherein information recorded in the UndoRedo log entries comprises: transaction number, write operation address, and oldest value and new value of corresponding data; and information recorded in the Redo log entries comprises: transaction number, write operation address, and new value of corresponding data. The present invention can reduce the overhead caused by ensuring the failure atomicity in the NVMM.