Memory Page Compression with Hash-Based Deduplication

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current memory-saving methods for electronic devices, such as ZRAM and KSM, are inefficient due to high power consumption and low memory saving ratios, as they require extensive calculations and comparisons, leading to increased system power usage and slow execution speeds.

Innovation Solution

A method that involves compressing candidate pages in electronic devices and using hash values to identify and merge pages with the same content, either in compressed or uncompressed forms, to optimize memory usage by mapping virtual addresses and discarding redundant data, utilizing a specific data structure like an RB tree or hash table for efficient comparisons.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If current memory-saving methods (ZRAM, KSM) are used to compress and compare pages, then memory space can be reduced, but power consumption increases and execution speed decreases due to extensive calculations and comparisons

Engineering Contradiction:
Improvememory spaceVSAvoidpower consumption
Core Design Contradiction:
Quantity of substanceVSUse of energy by moving object

Solution Approach 1:

The patent applies preliminary action by pre-computing and storing hash values of compressed pages in a hash table during memory management operations. When a page needs to be swapped or merged, the system only needs to compare hash values rather than performing full page comparisons. This preliminary preparation of hash values dramatically reduces the computational power required during actual memory operations, resolving the contradiction between memory saving and power consumption.

Inventive Principle:
Principle #10Preliminary action

2Quantity of substance

If current memory-saving methods (ZRAM, KSM) are used to compress and compare pages, then memory space can be reduced, but execution time increases due to complicated calculations and comparisons

Engineering Contradiction:
Improvememory spaceVSAvoidexecution time
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The patent introduces hash values as an intermediary element that mediates between the need for memory compression and the requirement for fast comparison. Instead of directly comparing entire pages (which is time-consuming), the system uses hash values as intermediate representatives. The hash table serves as an intermediary data structure that enables O(1) average-time complexity for page identity verification, thus resolving the contradiction between memory space reduction and execution time.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Productivity

If hash values are used to compare compressed pages, then comparison speed improves, but memory usage increases due to storing hash values and compressed pages

Engineering Contradiction:
Improvecomparison speedVSAvoidmemory usage
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The patent applies local quality by making different parts of the memory system serve different functions: compressed pages are stored in the main memory space (first memory space) for active use, while hash values are stored in a separate hash table (second memory space) optimized for quick lookup. This local differentiation allows the system to optimize for both comparison speed (in the hash table) and memory efficiency (in the main memory space), resolving the contradiction between productivity and memory usage.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS9977598B2Electronic device and a method for managing memory space thereof
Publication Date: 2018.05.22 MEDIATEK INC
  • US9977598B2 patent drawing
  • US9977598B2 patent drawing
  • US9977598B2 patent drawing

AI summary

The present invention provides a method for managing memory space in an electronic device including: selecting a candidate page from a first memory space for swapping the candidate page out of the first memory space into the second memory space; compressing the candidate page to obtain a first compressed page and a first hash value of the first compressed page; performing a comparison using the first hash value of the first compressed page and the hash values of the pages stored in a second memory space to find whether the pages have the same content as the first compressed page or the candidate page; and if a page is found to have the same content as the first compressed page or the candidate page, mapping a virtual address of the first compressed page or the candidate page to the found page.