Threadsafe Non-Threadsafe Library Execution via Bridge Routines

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing data analysis software, due to adherence to older programming practices, often becomes incompatible with multi-threaded execution environments, leading to inefficient use of processing resources and potential errors when executed across multiple threads, especially when relying on non-threadsafe library routines.

Innovation Solution

A processor-based system that parses analysis routines to determine multi-threaded execution and non-threadsafe library calls, instantiates separate processes and bridge routines to enable safe execution across multiple threads, allowing for parallel execution of non-threadsafe library functions within isolated processes.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If software adheres to older programming practices, then it maintains legacy functionality and compatibility, but it becomes incompatible with multi-threaded execution environments and cannot utilize modern processing capabilities

Engineering Contradiction:
Improvecompatibility with multi-threaded executionVSAvoidsoftware rewriting cost
Core Design Contradiction:
Adaptability or versatilityVSEase of manufacture

Solution Approach 1:

The patent introduces a thread safety layer that acts as an intermediary between multi-threaded analysis routines and non-threadsafe library routines. This layer detects calls to non-threadsafe functions and manages thread-safe execution contexts, allowing legacy software to run in multi-threaded environments without rewriting the core library code.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent segments the software execution environment into distinct contexts, creating isolated thread execution contexts for calls to non-threadsafe library routines. Each context maintains its own state, preventing interference between concurrent threads while allowing the legacy library code to remain unchanged.

Inventive Principle:
Principle #1Segmentation

2Reliability

If restrictions are imposed on software execution to maintain thread safety, then errors are prevented, but processing resources are wasted due to single-threaded execution

Engineering Contradiction:
Improvethread-safe executionVSAvoidprocessing resource utilization
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent implements dynamic context switching that allows the system to adaptively manage thread execution. When a non-threadsafe function is called, the system dynamically creates an isolated execution context for that specific call while allowing other threads to continue executing concurrently, thus maintaining both thread safety and parallel processing capability.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent ensures continuous parallel processing by managing multiple thread execution contexts simultaneously. Rather than blocking other threads when one thread calls a non-threadsafe function, the system maintains continuous useful action across all threads through context isolation and management.

Inventive Principle:
Principle #20Continuity of useful action

3Productivity

If non-threadsafe library routines are executed in a multi-threaded environment, then processing speed increases through parallel execution, but resource wastage and errors occur

Engineering Contradiction:
Improveparallel execution speedVSAvoidexecution correctness
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent introduces a thread safety layer that acts as an intermediary between multi-threaded analysis routines and non-threadsafe library routines. This layer detects calls to non-threadsafe functions and manages thread-safe execution contexts, allowing legacy software to run in multi-threaded environments without rewriting the core library code.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent creates isolated copies of execution contexts for each thread calling non-threadsafe library routines. Each context maintains its own state variables and execution environment, effectively copying the necessary state to prevent interference between concurrent threads while allowing parallel execution to proceed.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS9785467B1Threadsafe use of non-threadsafe libraries with multi-threaded processes
Publication Date: 2017.10.10 SAS INSTITUTE INC
  • US9785467B1 patent drawing
  • US9785467B1 patent drawing
  • US9785467B1 patent drawing

AI summary

An apparatus includes a processor and a storage storing instructions causing the processor to determine whether an analysis routine is multi-threaded and calls a library function of a non-threadsafe library, and if so, causes the processor to: instantiate an analysis process for executing the analysis routine on multiple threads; instantiate an instance of the library for execution within a isolated library process; instantiate another instance of the library for execution within another isolated library process; retrieve library metadata providing a function prototype of the library function; employ the function prototype to generate an instance of a bridge routine to enable a call from the analysis routine on a first thread to the library function; employ the function prototype to generate another instance of the bridge routine to enable a call from the analysis routine on a second thread to the library function; and begin execution of the analysis routine.