Single-threaded Script Engine Segmentation for Deterministic Multithreading

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current computerized control systems for complex machines, such as those in silicon wafer manufacturing, face limitations in multi-threading capabilities and deterministic behavior due to globally-locking garbage collection mechanisms, which restrict parallelism and predictability in executing instructions.

Innovation Solution

Implementing a computing device that executes multiple instances of a single-threaded script engine concurrently using reference counted script base value objects, allowing each instance to access shared script objects without context switching, thereby preventing deadlocks and ensuring thread-safe management of machine components.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If a script engine implements multi-threading at script execution level with explicit context switching, then multi-threading capability is provided, but deterministic behavior and predictable timing are lost

Engineering Contradiction:
Improvemulti-threading capabilityVSAvoiddeterministic behavior
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The system segments the script engine into multiple independent single-threaded instances, each running in its own execution context without context switching. This segmentation allows each instance to execute scripts deterministically while the collection of instances provides multi-threading capability, resolving the contradiction between adaptability and reliability.

Inventive Principle:
Principle #1Segmentation

2Ease of manufacture

If a globally-locking garbage collection mechanism is used for memory management, then memory management is simplified, but parallel operations are blocked until garbage collection finishes

Engineering Contradiction:
Improvememory management simplicityVSAvoidparallel execution efficiency
Core Design Contradiction:
Ease of manufactureVSProductivity

Solution Approach 1:

The garbage collection mechanism is segmented to operate independently within each single-threaded script engine instance rather than globally. This allows memory management to remain simple within each instance while enabling parallel garbage collection across multiple instances, thus maintaining productivity without sacrificing ease of memory management.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Reference counted script base value objects serve as intermediaries for memory management between script objects and the garbage collection mechanism. These reference-counted objects enable automatic memory management without requiring global locking, as the reference count operations are atomic and thread-safe, allowing parallel operations to proceed without blocking.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Productivity

If multiple threads access shared script objects simultaneously, then resource utilization is improved, but deadlocks and thread-safety issues occur

Engineering Contradiction:
Improveresource utilizationVSAvoidthread-safety
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system segments shared script objects into instance-specific copies within each single-threaded script engine instance. Each instance has its own copy of script objects, eliminating the need for complex thread-safety mechanisms while maintaining high resource utilization through independent parallel execution. When object sharing is needed, reference counted base value objects provide safe sharing without deadlocks.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS9459935B2Methods and systems for deterministic and multithreaded script objects and script engine
Publication Date: 2016.10.04 GLOBALWAFERS CO LTD
  • US9459935B2 patent drawing
  • US9459935B2 patent drawing
  • US9459935B2 patent drawing

AI summary

A computing device is configured to execute a first instance of a single-threaded script engine in a first thread associated with a first execution context, wherein the first instance of the single-threaded script engine accesses at least one shared script object through a first reference counted script base value object. The computing device is also configured to concurrently execute a second instance of the single-threaded script engine in a second thread_associated with a second execution context, wherein the second instance of the single-threaded script engine accesses the at least one shared script object through a second reference counted script base value object. The script engine does not switch between the execution contexts.