Data processing: measuring – calibrating – or testing – Measurement system – Performance or efficiency evaluation
Reexamination Certificate
2001-08-16
2004-10-12
Hoff, Marc S. (Department: 2857)
Data processing: measuring, calibrating, or testing
Measurement system
Performance or efficiency evaluation
C710S022000
Reexamination Certificate
active
06804630
ABSTRACT:
BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention relates to a method for measuring a quantity of usage of a device, in particular, to a method for measuring a quantity of usage of a CPU.
2. Background of the Related Art
There are various kinds of algorithms for predicting a quantity of usage of a system in the related art. In general, more complicated algorithms yield more credible predictions; less complicated algorithms yield less credible predictions.
In addition, a method for calculating a quantity of usage of a CPU can be differentiated in accordance with an operating system. For example, in a MS-Windows 9x system, system usage of a CPU is updated by the CPU itself using its own algorithm. However, it is recommended to use the registry information when an application program is developed.
Furthermore, because an Operating System (OS) kernel takes charge of the CPU multi-tasking in all threads in a present ready-to-run state, the OS kernel generally knows whether there are OS threads in the ready-to-run state or an action state (all threads do not wait for certain event to resume execution). For example, when the OS determines there are no threads in the ready-to-run state, a value of a power management timer is read, and the CPU is maintained in sleep mode. In this mode the power management timer operates independently from the CPU, and measures accurately time duration of reads (regular increase with a fixed rate of 3.579545 Mhz). After that, the OS reads the value of the power management timer when the CPU is waken up.
In addition, measuring time difference between initial timer read in the sleep mode of the CPU and second timer read in the wake mode is a measure of idle time of the CPU. In other words, the CPU idle time can be measured by dividing a total of the difference between the second timer and initial timer for a large sampling interval, by the sampling interval. It can be described as in Equations 1 and 2,
Idle Ticks=Sum (across sampling interval)[Second Timer Read−Initial Timer Read] [Equation 1]
CPU Idle(%)=Idle Ticks×Tick Period(s)/Sampling Interval(s)×100% [Equation 2]
Herein, the first timer read describes a processor in sleep mode (initial timer read), and the second timer read describes the CPU is in the wake mode.
In contrast, related art algorithms yield large values of CPU usage, even though the system does not perform an operation. In addition, in the related art, there is no time interval information available for updating a quantity of usage of a CPU, accordingly it is not appropriate for measuring a quantity of usage of a CPU in short time. In addition, in the related art, because an algorithm has to be amended in order to adapt it to the MS-Windows system or a complicated code is required, it degrades the MS-Windows system performance.
SUMMARY OF THE INVENTION
An object of the invention is to solve at least the above problems and/or disadvantages and to provide at least the advantages described hereinafter.
An object of the present invention is to provide a method for measuring a quantity of usage of a CPU which is capable of getting directly a result by using various functions provided by the operating system on the behalf of a registry storing a quantity of usage of a CPU inside the system.
In order to achieve the object of the present invention, the method for measuring a quantity of usage of the CPU comprises reading execution time of all threads excluding a system thread with a known time interval, adding the values, subtracting a total of the execution time of the former stored thread from the grand total, and measuring a quantity of usage of a CPU by dividing the subtracted execution time by the known time interval.
To achieve at least the above objects and advantages in a whole or in parts and in accordance with the purpose of the present invention, as embodied and broadly described, a method for measuring a quantity of usage of a CPU in a system, including reading execution time of all threads excluding a system thread with a certain timer time interval, adding the read values, subtracting a total of execution time of the former stored thread from the grand total, and measuring a quantity of usage of a CPU by dividing the subtracted execution time of the thread by the certain timer time.
To further achieve at least the above objects and advantages in a whole or in parts and in accordance with the purpose of the present invention, as embodied and broadly described, a method for measuring CPU usage, including reading an execution time of a thread over a time interval, adding the execution times to obtain a grand total, reading a total execution time for a previously stored thread, subtracting the total execution time for the previously stored thread from the grand total to obtain a result, and outputting the result.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objects and advantages of the invention may be realized and attained as particularly pointed out in the appended claims.
REFERENCES:
patent: 5463775 (1995-10-01), DeWitt et al.
patent: 5797115 (1998-08-01), Fuller
patent: 6003061 (1999-12-01), Jones et al.
patent: 6006248 (1999-12-01), Nagae
patent: 6009452 (1999-12-01), Horvitz
patent: 6049798 (2000-04-01), Bishop et al.
patent: 6092095 (2000-07-01), Maytal
patent: 6434714 (2002-08-01), Lewis et al.
patent: 6542940 (2003-04-01), Morrison et al.
WinTasks 4 Professional User's Manual (no date).*
SmartLine Inc., Dec. 14, 1999, Remote Task Manager
Lee Sang Ho
Oh Jang Keun
Fleshner & Kim LLP
LG Electronics Inc.
LandOfFree
Method for measuring quantity of usage of CPU does not yet have a rating. At this time, there are no reviews or comments for this patent.
If you have personal experience with Method for measuring quantity of usage of CPU, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Method for measuring quantity of usage of CPU will most certainly appreciate the feedback.
Profile ID: LFUS-PAI-O-3279838