Hybrid Logging Memory System for Data Consistency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing memory systems face challenges in maintaining data consistency and achieving high atomicity and durability, particularly in recovering algorithms, where redo logging offers asynchronous updates but at the cost of double write and read redirection, while undo logging provides direct updates but with synchronous limitations and double write disadvantages.

Innovation Solution

A memory system and operation method that perform hybrid logging by receiving data in a first cache, writing it as a redo log, and performing an in-memory copy to create an undo log, ensuring persistence across memory controllers and secondary memory, thereby addressing the limitations of existing recovery algorithms.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If redo logging is used for asynchronous data update, then data update efficiency is improved, but double write and read redirection problems occur

Engineering Contradiction:
Improvedata update efficiencyVSAvoiddouble write and read redirection
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent introduces a log buffer as an intermediary component between the cache and persistent memory. The log buffer temporarily stores redo logs before they are flushed to persistent memory, allowing the system to achieve asynchronous updates without requiring double write operations. The mediator (log buffer) absorbs the complexity of coordination between cache and persistent storage, eliminating read redirection while maintaining asynchronous update capability.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Ease of operation

If undo logging is used for direct data update, then data access simplicity is improved, but synchronous data update limitation and double write problem occur

Engineering Contradiction:
Improvedata access simplicityVSAvoidsynchronous data update limitation
Core Design Contradiction:
Ease of operationVSLoss of time

Solution Approach 1:

The patent performs preliminary actions by first writing data to the cache, then asynchronously creating redo logs in the log buffer, and separately preparing undo logs in persistent memory before actual commits. This preliminary action sequence allows the system to maintain simple direct data access in the cache while avoiding synchronous update limitations. The undo logs are prepared in advance in persistent memory, enabling fast rollback operations without blocking subsequent writes.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If hybrid logging is implemented with in-memory copy, then data consistency is improved, but memory system complexity increases

Engineering Contradiction:
Improvedata consistencyVSAvoidmemory system complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the memory system into distinct functional components: cache for fast access, log buffer for asynchronous redo logging, and persistent memory for durability. Each segment has a specific responsibility - the cache handles fast reads/writes, the log buffer manages redo log buffering and flushing, and persistent memory stores both data and undo logs. This segmentation improves data consistency by ensuring proper ordering and persistence while managing complexity through clear separation of concerns rather than a monolithic complex system.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS11704246B2Memory system for maintaining data consistency and operation method thereof
Publication Date: 2023.07.18 MACRONIX INTERNATIONAL CO LTD
  • US11704246B2 patent drawing
  • US11704246B2 patent drawing
  • US11704246B2 patent drawing

AI summary

A memory system for maintaining data consistency and an operation method thereof are provided. The operation method includes: receiving a first data in a first cache of a first memory from a processor; reading the first data from the first cache and writing the first data as a redo log into a log buffer of the first memory; writing the redo log from the log buffer into a memory controller of the processor; performing an in-memory copy in a second memory to copy a second data as an undo log, wherein the second data is an old version of the first data; and writing the redo log from the memory controller into the second memory for covering the second data by the redo log as a third data, wherein the redo log, the third data and the first data are the same.