Method for measuring task CPU occupancy rate in multitasking operation system

An operating system and occupancy rate technology, applied in multi-program devices, hardware monitoring, etc., to achieve accurate measurement, high timing accuracy, and cost-saving effects

Active Publication Date: 2009-06-24
ZTE CORP
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0010] As can be seen from the above, there are many shortcomings in the existing methods that need to be improved.

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 measuring task CPU occupancy rate in multitasking operation system
  • Method for measuring task CPU occupancy rate in multitasking operation system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0026] The present invention will be described in further detail below in conjunction with the accompanying drawings and embodiments.

[0027] The 3G system consists of multiple embedded systems. Here we take one single-board embedded system as an example. This system uses PPC755 CPU and VXWORKS operating system.

[0028] figure 1 It is a structural block diagram of a device for measuring the CPU usage rate of a multitasking operating system task according to an embodiment of the present invention. Including hardware timer 101, PPC755 CPU and VXWORKS operating system 102, interrupt counter 103 and PC display device 104.

[0029] In this example, the hardware timer is a nanosecond-level hardware timer provided by the PPC755 CPU BSP. The common entry of all interrupts of the PPC755 CPU is the No. 500 exception vector processing routine, and all statistics are 4-byte variables.

[0030] In the method for measuring the CPU occupancy rate of multi-task operating system tasks prop...

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 present invention proposes a method for measuring the CPU occupancy rate of multi-task operating system tasks, comprising the following steps: (a) creating a high-priority timing statistical task, clearing all statistical quantities, and setting statistical intervals; (b) recording The time point of the entry and exit of the interrupt processing routine, the difference between the two is the execution time of the interrupt processing routine once, and it is accumulated; (c) when the task is switched, record the start time of the task switched in and the task switched out The task end time point of the same task, the difference between the task end time point and the task start time point of the same task, and then subtract the execution time of the interrupt processing routine included in the execution of the task, is the execution time of the task once. Accumulate; (d) when the statistical interval is up, add the total execution time of each task and the total execution time of the interrupt processing routine to obtain the total execution time of the system in the statistical interval, thereby calculating the total execution time of each task and interrupt CPU usage.

Description

technical field [0001] The invention relates to a multitasking operating system, in particular to a method for measuring the CPU occupancy rate of a multitasking operating system task. 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 increasing complexity of system applications and the increasing number of tasks in multi-tasking operating systems, the running status of tasks plays an increasingly important role in multi-task collaboration, and the CPU usage of tasks is a very important factor in the running status of tasks. An important part of. If the CPU usage of each task in the system can be accurately measured in real time, it can be used to determine whether the design of the entire system is normal, whether the design of each task is correct, and whether there is a problem with exe...

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/34G06F9/46
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