Operating system failure testing method and device

An operating system and fault detection technology, which is applied in the field of operating systems, can solve problems such as operating system reliability reaching 99.999% or 99.9999%, unfavorable detection time, etc., and achieve the effect of reducing fault discovery time and improving speed

Inactive Publication Date: 2009-11-04
HUAWEI TECH CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This T is usually set to the second level. In the prior art, the default value of T is generally 10s for alarm and 40s for operating system reset. The detection time of this level is not conducive to the reliability of the operating system reaching 99.999% or 99.9999%.

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
  • Operating system failure testing method and device
  • Operating system failure testing method and device
  • Operating system failure testing method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0055] In this embodiment, the number of instructions and the execution time that have been executed when the CPU executes the task describe the occupation of the CPU by the task, and two of the performance statistics registers of the CPU are used as InstCounter (instruction register) and CycleCounter (clock cycle register). ).

[0056] see figure 1 , the embodiment of the present invention provides a method for operating system failure detection, specifically including:

[0057] S101: Preset an upper threshold of the number of instructions and an upper threshold of execution time.

[0058] For different operating systems, the number of instructions required by the CPU to execute tasks and the determination of the execution time are different. For a system based on time slice scheduling, the time length of the time slice is fixed, for example, 100ms. The length of the time slice is taken as upper threshold of execution time;

[0059] The number of instructions required by t...

Embodiment 2

[0082] In this embodiment, the CPU occupation of the task is described by the number of instructions executed by the CPU when executing the task, and one of the performance statistics registers of the CPU is used as an instruction register to record the number of instructions continuously executed by the task.

[0083] see Figure 4 , the embodiment of the present invention also provides a method for operating system failure detection, specifically including:

[0084] S201: Preset the upper threshold of the number of instructions.

[0085] In this embodiment, the number of instructions required by the CPU to execute a task with a higher priority or a task with a heavier load is preset as the upper threshold of the number of instructions, and the calculation method for the number of instructions required by the CPU to execute the task is the same as that in Embodiment 1. The above are the same and will not be repeated here.

[0086] S202: When a task is started to be executed...

Embodiment 3

[0095] see Figure 5 , the embodiment of the present invention provides a device for operating system failure detection, including a register, the register is used to accumulate the CPU usage of the task when the task is started to be executed in the operating system; when the cumulative usage of the register reaches When the overflow value of the register generates an internal interrupt signal, it is determined that the operating system is faulty.

[0096] Further, the above-mentioned registers may specifically include:

[0097] The setting module is used to preset the upper threshold and initial value of the number of instructions, and the initial value is the difference obtained by subtracting the upper threshold of the number of instructions from the overflow value of the register;

[0098] The recording module is used to increase and record the number of instructions continuously executed by the task from the initial value preset by the setting module when the task is st...

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 and a device for operating system fault detection, belonging to the field of operating systems. The method includes: when the operating system starts to execute a task, the register accumulates the CPU occupation of the task; when an internal interrupt signal is generated because the accumulated occupation of the register reaches the overflow value of the register, judging the The operating system failure described above. The device includes: a register, and the register specifically includes: a setting module, a recording module and a judging module. The invention improves the fault detection speed of the operating system by performing fault detection when the operating system executes each task.

Description

technical field [0001] The invention relates to the field of operating systems, in particular to a method and device for operating system failure detection. Background technique [0002] In a real-time operating system, operating system hang is a frequent software failure, which is manifested as a task (process, thread) due to an infinite loop, dead I / O (Input / Output, input / output) or deadlock and other failures The CPU (Central Processing Unit, central processing unit) is monopolized for a long time because of this reason, so that other tasks in the operating system cannot be scheduled, thereby causing the operating system to crash. [0003] In the prior art, the software dog is used to detect the fault of the operating system, wherein the software dog is realized by using the clock Tick interrupt of the CPU to clear the dog, and then adding the dog during the task switching process. There is no task switching within T, that is, the dog is not cleared within T, and the ope...

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 Patents(China)
IPC IPC(8): G06F11/36G06F11/34
Inventor 曹真尹相东毛晓磊郑明华
Owner HUAWEI TECH CO LTD
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