Shared Memory Hash Table Lookaside Buffer Versioning

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In data networking, readers may read invalid data when attempting to access shared memory hash tables being concurrently updated by a writer, leading to inconsistencies and invalid data usage.

Innovation Solution

Implementing a lookaside buffer to temporarily store bucket data during updates, with version management to indicate modification status, allowing readers to access valid data without locks or memory allocation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If readers read data from shared memory hash table concurrently with writer updates, then data access speed is improved, but data validity and consistency deteriorate

Engineering Contradiction:
Improvedata access speedVSAvoiddata validity
Core Design Contradiction:
SpeedVSReliability

Solution Approach 1:

The patent segments the hash table into multiple buckets, allowing readers to access different buckets concurrently with writer updates on other buckets. This segmentation enables parallel access while maintaining data consistency within each bucket, resolving the contradiction between speed and reliability.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces version numbers as an intermediary mechanism to mediate between readers and writers. Version numbers allow readers to detect concurrent modifications and retry reads, ensuring data validity while maintaining high access speed. The version number acts as a mediator that coordinates read-write operations without blocking.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If locks are used to prevent readers from accessing invalid data, then data consistency is improved, but access speed and productivity deteriorate

Engineering Contradiction:
Improvedata consistencyVSAvoidaccess speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent implements self-service through version number checking, where readers autonomously detect and handle concurrent modifications without external locking. Readers check version numbers and retry reads if modifications are detected, eliminating the need for locks while maintaining data consistency. This self-service mechanism preserves high access speed while ensuring reliability.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent replaces the mechanical locking system with a software-based version number checking mechanism. Instead of using locks to prevent concurrent access, the system uses version numbers to detect and handle conflicts, substituting a blocking mechanical approach with a non-blocking software solution that maintains both consistency and speed.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

3Reliability

If memory allocation is used to create separate copies for readers, then data validity is improved, but memory usage and device complexity deteriorate

Engineering Contradiction:
Improvedata validityVSAvoidmemory usage
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent uses selective copying only when necessary - specifically when version number changes indicate concurrent modifications. Readers copy data from the hash table only when needed, rather than maintaining permanent separate copies. This approach ensures data validity while minimizing memory usage by copying only when updates occur.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent changes the state parameter of the hash table entries by incrementing version numbers to indicate modification status. This parameter change allows the system to track updates without creating separate data structures, maintaining data validity through version tracking rather than through memory duplication.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentEP2802110B1System and method for reading and writing data with a shared memory hash table
Publication Date: 2018.07.11 ARISTA NETWORKS INC
  • EP2802110B1 patent drawingFigure 1
  • EP2802110B1 patent drawingFigure 2
  • EP2802110B1 patent drawingFigure 3

AI summary

A method and apparatus of a device that reads and writes data using a shared memory hash table and a lookaside buffer is described. In an exemplary embodiment, a device locates a bucket for the data in a shared memory hash table, where a writer updates the shared memory hash table and a reader that is one of a plurality of readers reads from the shared memory hash table. The device further retrieves an initial value of a version of the bucket. If the initial value of the version is odd, the device copies the data from a lookaside buffer of the writer to a local buffer for the reader, wherein the lookaside buffer stores a copy of the data while the bucket is being modified.