RTOS Tracking Buffer for Interrupt Latency Reduction
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing tracking methods for real-time operating systems (RTOS) prolong the time during which interrupts are disabled, leading to performance issues, potential data loss, and increased error rates due to slow serial communication.
Innovation Solution
A method and apparatus that write tracking results into a buffer when interrupts are disabled and read/send them when interrupts are enabled, utilizing a processor to quickly write results and minimize the duration of interrupt disablement.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If tracking results are sent through serial communication mode when interrupt is disabled, then communication peer can learn tracking results, but the longest time during which interrupts are disabled increases
Solution Approach 1:
The patent divides the tracking result transmission process into two separate phases: (1) writing tracking results to a buffer during interrupt-disabled period, and (2) reading and sending results from buffer during interrupt-enabled period. This segmentation allows the system to accumulate multiple tracking results efficiently without extending interrupt disable time, resolving the contradiction between reliable transmission and time loss.
Solution Approach 2:
The patent performs preliminary action by writing tracking results to a buffer in advance during the interrupt-disabled period, before the actual serial communication occurs. This allows the system to prepare data for transmission without holding interrupts disabled during the slow serial communication process, thus reducing the longest interrupt disable time while ensuring no tracking results are lost.
2Reliability
If serial communication is used to send tracking results, then communication peer receives data, but data loss of hardware device may occur
Solution Approach 1:
By segmenting the transmission process into buffer writing (during interrupt disable) and buffer reading/sending (during interrupt enable), the system ensures that hardware device data is not lost. The buffer acts as a safe storage intermediate, allowing interrupts to be re-enabled promptly while tracking results are accumulated and transmitted systematically without data loss.
Solution Approach 2:
The buffer serves as an intermediary between the tracking system and serial communication interface. It decouples the fast buffer writing operations from the slow serial transmission, allowing the system to maintain reliable data transmission without compromising hardware device interrupt responsiveness or risking data loss.
3Reliability
If serial communication mode is used for tracking, then tracking results are transmitted, but response time of task or program becomes slow
Solution Approach 1:
The patent segments tracking result handling into immediate buffer writing (fast, during interrupt disable) and delayed serial transmission (slow, during interrupt enable). This ensures task response time is not affected by serial communication delays, as the buffer writing completes quickly and interrupts are re-enabled promptly, while transmission occurs in the background.
Solution Approach 2:
The system performs preliminary action by writing all tracking results to the buffer in advance during the brief interrupt-disabled period. This preliminary buffering ensures that when interrupts are re-enabled, the system can respond to hardware events immediately while the buffered results are transmitted in the background, maintaining fast task response times.
4Loss of information
If interrupt is disabled for long duration to send tracking results, then complete tracking data is available, but RTOS performance deteriorates
Solution Approach 1:
The patent segments the tracking data collection and transmission into two independent phases: rapid buffer writing during interrupt disable (ensuring data completeness) and background serial transmission during interrupt enable (preserving RTOS performance). This segmentation allows the system to maintain complete tracking data while avoiding performance deterioration by not holding interrupts disabled during slow communication.
Solution Approach 2:
The system performs preliminary action by collecting and buffering all tracking results during a brief interrupt-disabled window, ensuring complete tracking data is captured. After re-enabling interrupts to maintain RTOS performance, the buffered results are transmitted in the background, thus achieving both data completeness and performance preservation.
Data Source
AI summary
A tracking method, an apparatus, a device, and a machine-readable medium are provided. The method specifically includes: writing a tracking result of an activity of an operating system and/or a running activity of a program into a buffer when an interrupt is disabled; and reading and sending the tracking result from the buffer when the interrupt is enabled. The embodiments of the present disclosure can effectively shorten the maximum time during which interrupts are disabled for an operating system, and thereby can effectively improve the performance of the operating system and/or a program.


