Method for detecting task closed loop of multi-task operating system

An operating system and infinite loop technology, which is applied in the field of detecting multi-task operating system task infinite loop, can solve the problems of extra requirements and low accuracy, and achieve the effect of simple implementation method, utilization of system resources, and flexible implementation

Active Publication Date: 2009-10-21
ZTE CORP
View PDF2 Cites 13 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The main disadvantage of this method is the use of hardware timers or clocks, which require additional hardware resources, and can only be detected for tasks that receive messages, which has relatively large limitations. Representative patents such as CN02128400
[0005] The other type is: pre-set the storage unit for recording the basic information of the operation, start a detection task, and each time the timer set by the detection task times out, it will save the logo of the last operation task performed before the current time point in the storage unit. If the identification of a task continuously appears in the storage unit, it is considered that the task has an infinite loop, but this is a method of collecting points, the accuracy is low, and additional storage space is required. Representative patents such as CN03121092

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for detecting task closed loop of multi-task operating system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] In order to better understand the present invention, the present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0021] In a multi-tasking operating system, considering that each task contains a loop body, the code in the loop body will be re-executed every time the task is rescheduled by the system kernel. If a statistical variable is added at the entry of the loop body , the value is incremented each time it is executed, so that each time the task is rescheduled, the value of the statistical variable will be incremented. If the task has an infinite loop, since the task has been running, the value of the statistical variable will remain unchanged from the beginning of the infinite loop. Using this feature of the task entity can be used to detect whether the task has occurred Infinite loop. If it is judged that the statistical variable value of the task is not zero and the time for which the statistica...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method for detecting task closed loop of a multi-task operating system, comprising the following steps: embedding piling code in task inlet function loop bodies, and measuring whether the task is in closed loop state accurately in real time by determining the piling value of the monitored task, the task operation state and the total CPU occupancy factor in the monitoringtask of high priority. The invention is accurate, reliable and efficient and is easy to realize by embedding the piling code in the loop body inlet of the task to be monitored; if the system counts the CPU occupancy rate through the monitoring task of high priority, the piling code determining the closed loop can be added to the monitoring task for counting the CPU occupancy rate, thereby greatlyutilizing the system resources; the piling code can be defined as macro which is embedded at the inlet of the task loop body, thus the invention can be realized flexibly.

Description

technical field [0001] The invention belongs to the field of multi-task operating systems, and in particular relates to a method for detecting task dead cycles of multi-task operating systems. Background technique [0002] In computer software systems, some form of multitasking operating system is basically adopted, and all applications and functions are carried by tasks and completed under multitasking cooperation. Due to the increasingly complex system applications and the increasing number of tasks in the multi-tasking operating system, the running status of tasks plays an increasingly important role in the multi-tasking collaboration. During the software development process, due to various reasons, Tasks may be in an endless loop, and other messages cannot be processed. If an accurate and efficient task monitoring method can be provided, it will greatly facilitate the positioning of R&D personnel. [0003] In the current operating system, there are mainly two types of e...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36
Inventor 廖通
Owner ZTE CORP
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products