Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for detecting task endless loop in operating system and operating system

A technology for operating systems and detection tasks, applied in error detection/correction, instruments, calculations, etc., can solve problems such as dead loop missed detection

Active Publication Date: 2010-10-06
MAIPU COMM TECH CO LTD
View PDF4 Cites 15 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

When the detected task does not run continuously but intermittently, although the task may already be in an endless loop state, it will still temporarily give up the CPU passively
For example, a task has an infinite loop, but because there are higher priority tasks, the infinite loop task will still temporarily stop. At this time, the existing infinite loop detection method has temporarily given up the control of the CPU due to the infinite loop task. The running time of the task is cleared, and the infinite loop is missed

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 endless loop in operating system and operating system
  • Method for detecting task endless loop in operating system and operating system
  • Method for detecting task endless loop in operating system and operating system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0031] Such as figure 1 As shown, the operating system includes a system control module, a detection task module, a task control module, and a ready state cumulative time calculation module;

[0032] The system control module is used to periodically start the detection task module with the highest priority to control task switching;

[0033] The detection task module is used for the detection task to check the cumulative time of the ready state in the task control module of each task, and the task whose cumulative time of the ready state is greater than the threshold is judged to have an infinite loop; after the detection task module judges the infinite loop task, every other TICK Call the infinite loop task multiple times and get the value of the infinite loop task register;

[0034] The task control module is used to record the accumulated time of the ready state of each task.

[0035] The ready state cumulative time calculation module is used to calculate the ready state ...

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 provides a more comprehensive method for detecting task endless loop in an operating system and an operating system for realizing the method. Different from the existing endless loop detection method which compares the continuous running time of a task with a threshold value to judge whether an endless loop exists, the method of the invention compares the accumulated length of time of ready mode with a threshold value to judge whether an endless loop exists. The invention is based on the theory that in the priority-based preemptive operating system, when a task performs an endless loop and does not quit the CPU actively, the task is always in the ready mode in any conditions. By counting the accumulated length of time of the ready mode of one task to judge the endless loop, the omission of the endless loop which quits the CPU passively can be avoided.

Description

technical field [0001] The invention relates to a computer operating system, in particular to an infinite loop detection technology in an operating system based on task priority preemption. Background technique [0002] In the operating system based on the task priority scheduling policy, when the high priority task is in the ready state, the low priority task must not be scheduled. In general, high-priority tasks will not run all the time, and task designers will actively or passively give up CPU execution so that low-priority tasks can be executed. The form of a task voluntarily giving up the CPU is generally: delaying its own execution, waiting for a period of time before resuming execution; or blocking itself because it is waiting for a certain event. The passive form is mainly: the task is preempted by a higher priority task. When a high-priority task causes an infinite loop due to design or coding errors, and the code in the infinite loop does not actively give up th...

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/00
Inventor 曾健
Owner MAIPU COMM TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products