Non-blocking Block Execution in Graphical Modeling
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing technical computing environments (TCEs) face inefficiencies due to the blocking nature of blocks in block diagram-based systems, where execution is suspended until certain blocks complete, leading to idle processor time and prolonged execution times.
Innovation Solution
Implementing non-blocking blocks that allow the executive to continue executing other blocks without waiting for completion, using a compiler to identify and partition execution stages, and generate polling directives to optimize execution order based on dependency and execution time information.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If blocking execution semantics are used in block diagram-based systems, then execution simplicity is maintained, but processor utilization deteriorates and execution time increases
Solution Approach 1:
The execution process is segmented into distinct phases: blocking blocks execute synchronously and wait for completion, while non-blocking blocks execute asynchronously and allow the executive to continue with other blocks. This segmentation enables the system to differentiate between operations that require immediate completion and those that can proceed in the background, thereby reducing waiting time and improving processor utilization.
Solution Approach 2:
The compiler performs preliminary analysis to identify non-blocking blocks and generate appropriate polling directives before execution. By pre-determining which blocks are non-blocking and preparing the execution schedule in advance, the system avoids runtime delays and ensures that the executive can efficiently switch between blocking and non-blocking operations without unnecessary waiting.
2Productivity
If non-blocking blocks are implemented, then processor utilization improves and execution time reduces, but system complexity increases
Solution Approach 1:
The compiler acts as an intermediary that automatically analyzes the block diagram model, identifies non-blocking blocks, and generates the necessary polling directives and execution schedules. This intermediary processing shifts the complexity from runtime execution to compile-time preparation, allowing the runtime system to execute efficiently without manually managing the complexity of non-blocking operations.
Solution Approach 2:
Non-blocking blocks are designed to be self-managing during execution. Once identified by the compiler and assigned polling directives, these blocks autonomously execute their operations without requiring the executive to wait or actively manage their completion status. This self-service mechanism simplifies the runtime complexity by making non-blocking blocks independent units that handle their own execution lifecycle.
Data Source
AI summary
In an implementation, a computing device-implemented method includes identifying a non-blocking block in a graphical block diagram that includes the non-blocking block and other blocks, the other blocks including one or more non-blocking blocks, one or more blocking blocks, or a combination of one or more non-blocking blocks and one or more blocking blocks, determining whether one or more of the other blocks are dependent on an output from the non-blocking block, and partitioning execution of the non-blocking block into two or more execution stages, generating an order of execution of the graphical blocks, the order including a first stage of execution of the two or more execution stages for the non-blocking block, followed by an execution of one or more of the other blocks that have been determined not be dependent on the output from the non-blocking block, followed by a second stage of execution of the two or more execution stages.


