Buffer-Based Data Sharing for Multi-Core Simulation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional techniques for simulating multi-core, concurrent thread execution in real-time systems introduce serialization, reduce hardware utilization, and fail to accurately capture temporal behavior, leading to lower-fidelity simulations and thread synchronization issues due to data coupling and reliance on expensive operating system APIs.

Innovation Solution

A method for data sharing between periodically executing threads in a multi-core application that uses buffering and pointer manipulation to decouple threads, allowing concurrent execution without serialization, and reduces CPU overhead by avoiding kernel calls.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If conventional techniques are used for simulating multi-core concurrent thread execution, then data sharing between threads can be implemented, but serialization of thread execution is introduced and hardware utilization is reduced

Engineering Contradiction:
Improvedata sharing robustnessVSAvoidexecution performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent introduces a buffer as an intermediary data structure between producer and consumer threads. The buffer decouples the threads, allowing them to execute concurrently without direct synchronization. The producer writes to the buffer while the consumer reads from it, eliminating the need for serialization and expensive OS API calls while maintaining data sharing robustness.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If thread synchronization mechanisms are used for data sharing, then data coupling between threads is ensured, but CPU overhead increases due to kernel calls

Engineering Contradiction:
Improvedata sharing correctnessVSAvoidCPU overhead
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent extracts the synchronization mechanism from the kernel space and implements it in user space using a buffer and pointer manipulation. By taking out the dependency on OS APIs like semaphores and mutexes, the solution eliminates expensive kernel calls and associated CPU overhead while maintaining data sharing correctness through buffer-based decoupling.

Inventive Principle:
Principle #2Taking out (Extraction)

3Ease of manufacture

If offline simulation is used for multi-core systems, then simulation can be performed, but temporal behavior of real-time application cannot be accurately captured

Engineering Contradiction:
Improvesimulation feasibilityVSAvoidtemporal behavior accuracy
Core Design Contradiction:
Ease of manufactureVSMeasurement precision

Solution Approach 1:

The patent makes the simulation dynamic by using a time-stamping mechanism that records actual execution timestamps of producer and consumer threads. This allows the simulation to capture the temporal behavior and timing characteristics of real-time applications accurately, while still being performable offline. The dynamic time-stamping approach preserves timing information that would otherwise be lost in static offline simulations.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS8732359B2Data sharing in high-fidelity simulation and real-time multi-core execution
Publication Date: 2014.05.20 MATHWORKS INC
  • US8732359B2 patent drawing
  • US8732359B2 patent drawing
  • US8732359B2 patent drawing

AI summary

When executing a graphical model of a dynamic system that includes two or more concurrently executing sets of operations, a processor is configured to create a first buffer and a second buffer within the executable graphical model. A first set of operations is configured to write data to the first buffer during a first execution instance of the first set of operations. The first set of operations is configured to write data to the second buffer during a second execution instance of the first thread. A second set of operations is configured to read the data from the first buffer during an instance of the second thread that executes contemporaneously with the second execution instance of the first set of operations. Determinations regarding access to the first buffer and second buffer by the first thread and second thread are self-contained within the first thread and second thread, respectively.