Shared Memory Allocator with Child Process Isolation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current network devices face challenges in managing memory allocations between a writer and multiple readers, particularly when readers attempt to access data that is being concurrently updated by the writer, leading to inconsistencies and performance limitations, especially with large tables and multiple readers.

Innovation Solution

A method and apparatus that allocate a shared memory buffer for objects, allowing a network device to translate writer pointers into reader pointers, using a virtual table pointer export table and code library export table to ensure correct type information and code loading for readers, and employing mechanisms like child process creation and memory region management to maintain data consistency and isolation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If a reader reads data from a table that is being concurrently updated by the writer, then the reader can access updated configuration data, but the reader may read partially updated invalid data

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

Solution Approach 1:

The patent applies preliminary action by having the writer store a pointer to the configuration data in shared memory before completing the full update. This allows readers to immediately access the new data location without waiting for the complete update to finish, while ensuring data validity through the pointer mechanism that atomically switches between old and new data versions.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent uses a shared memory buffer as an intermediary between the writer and readers. The writer stores pointers to configuration data in this shared buffer, which readers then access. This intermediary decouples the writer and readers, allowing concurrent access without direct interference, while maintaining data validity through the pointer-based access mechanism.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If the notification model is used to support distributed software development with multiple readers, then process cooperation and state delivery are enabled, but the model supports only limited sized tables (e.g., routing tables with up to 16,000 routes)

Engineering Contradiction:
Improvedistributed process cooperationVSAvoidtable size
Core Design Contradiction:
Adaptability or versatilityVSQuantity of substance

Solution Approach 1:

The patent segments the configuration data into multiple tables organized in a tree structure with hierarchical namespaces. Instead of using a single flat table that limits the number of entries, the data is divided into parent and child tables, allowing the system to support large quantities of routes (up to one million) by distributing them across multiple segmented table structures.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces hierarchical dimensions to the table structure by organizing data in parent-child table relationships with namespaces. This transforms the limitation from a single-dimensional flat table to a multi-dimensional hierarchical structure, enabling the system to scale from 16,000 routes to one million routes by adding organizational layers rather than simply expanding a single table.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

3Ease of manufacture

If static sized tables are used in the notification model, then implementation is simplified, but the tables may be inadequately sized for the current operating state of the network device

Engineering Contradiction:
Improveimplementation simplicityVSAvoidtable sizing adaptability
Core Design Contradiction:
Ease of manufactureVSAdaptability or versatility

Solution Approach 1:

The patent implements dynamic table structures where tables can grow and shrink based on the current operating state of the network device. Instead of using fixed static tables, the system allows tables to be created, expanded, and reorganized dynamically to match the actual data requirements, enabling support for varying numbers of routes from small to one million entries while maintaining implementation feasibility through the hierarchical organization.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS12169741B2Shared memory allocator with child process
Publication Date: 2024.12.17 ARISTA NETWORKS INC
  • US12169741B2 patent drawing
  • US12169741B2 patent drawing
  • US12169741B2 patent drawing

AI summary

A method and apparatus of a network device that allocates a shared memory buffer for an object is described. In an exemplary embodiment, the network device receives an allocation request for the shared memory buffer for the object. In addition, the network device allocates the shared memory buffer from shared memory of a network device, where the shared memory buffer is accessible by a writer and a plurality of readers. The network device further returns a writer pointer to the writer, where the writer pointer references a base address of the shared memory buffer. Furthermore, the network device stores the object in the shared memory buffer, wherein the writer accesses the shared memory using the writer pointer. The network device further shares the writer pointer with at least a first reader of the plurality of readers. The network device additionally translates the base address of the shared memory buffer to a reader pointer, where the reader pointer is expressed in a memory space of the first reader.