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

Method and system for detecting CPU (Central Processing Unit) occupancy rate of vxWorks

A technology of vxworks and detection methods, applied in the direction of hardware monitoring, etc., to achieve the effect of simple implementation, strong versatility, and short code

Inactive Publication Date: 2015-04-29
BANGYAN TECH
View PDF7 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] However, these two algorithms require the hardware system to be equipped with a corresponding high-precision auxiliary clock. In order to save costs, there is usually no such clock. Compared with the first method, it is not necessary to accurately calculate the CPU usage of each task. As an alarm, the calculation The total CPU usage of the system is enough; although the second method is to calculate the usage rate of the entire system, it must be interrupted by the hardware clock to realize it.

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 and system for detecting CPU (Central Processing Unit) occupancy rate of vxWorks
  • Method and system for detecting CPU (Central Processing Unit) occupancy rate of vxWorks

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0034] Combine now Figure 1-2 , the specific embodiments of the present invention are described in detail to illustrate the technical solutions of the present invention.

[0035] Such as figure 1 As shown, it is a flowchart of an embodiment of the CPU usage detection method for vxWorks according to the present invention, including steps:

[0036] S1: After the VxWorks system task is started and before the user task is started, start a task A with the lowest priority, and set a statistical time t at the same time, so as to increment a static variable s from the statistical time t and record its count value i , until the statistical time t ends.

[0037] Specifically, the statistical time t can be provided by a delay function f, such as a 2-second delay of a system function taskDelay(), or can be set to a longer or shorter other stable uniform delay , as the statistical time t.

[0038] S2: When the statistical time t corresponding to the task A with the lowest priority end...

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 method for detecting the CPU (Central Processing Unit) occupancy rate of vxWorks. The method comprises the steps: (S1) starting a task with the lowest priority before starting a user task, and progressively increasing a static variable and recording count values at the start of a statistical time until the statistical time ends; (S2) saving the recorded static variable count value to a comparison base number corresponding to the end of the statistical time, and resetting the static variable; (S3) progressively increasing the static variable and recording the count values in a statistical time during the task with the lowest priority when the vxWorks is idle; (4) starting a task with relatively high priority, and calculating the increment value of the static variable in each statistical time; (S5) calculating the CPU occupancy rate by using the ratio of the recorded static variable increment value to the comparison base number. The invention further provides a corresponding system for detecting the CPU occupancy rate of the vxWorks. The method and the system, provided by the invention, have the advantages that a high-precision clock is not required, and the cost is reduced; the implementation is simple and easy, the flexibility is high, and the universality is strong.

Description

technical field [0001] The invention relates to a CPU occupancy rate detection method and system for vxWorks, belonging to the field of embedded operating systems. Background technique [0002] The VxWorks operating system is an embedded real-time operating system (RTOS) designed and developed by WindRiver Corporation of the United States in 1983. It is a key component of the embedded development environment and has good sustainable development capabilities, high-performance kernels, and friendly user development. Environment, occupies a place in the field of embedded real-time operating system. With its good reliability and excellent real-time performance, it is widely used in communication, military, aviation, aerospace and other high-tech and high-real-time demanding fields, such as satellite communication, military exercises, ballistic guidance, aircraft navigation etc. On American F-16, FA-18 fighter jets, B-2 stealth bombers and Patriot missiles, even the Mars probe ...

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/34
CPCG06F11/34
Inventor 吴乾锋
Owner BANGYAN TECH
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