Patent ID: 8898675

Claim:
A method of calculating a processor utilization for multiple logical processors in a computer having a physical processor, the multiple logical processors running on the physical processor and a memory on which an operating system (OS) is loaded; wherein the physical processor is a simultaneous multithreading (SMT) processor and each of the logical processors has two operation modes including a single task mode in which only one of them is active and a multitask mode in which the multiple logical processors are active; wherein the OS has a processor utilization rate monitoring means, and the processor utilization rate monitoring means is configured to execute a method that comprises the steps of: defining one computation interval, for which the processor utilization for each of the logical processors is to be calculated, as an interval of an arbitrary length in which the logical processor being calculated is active from its start to end without transiting to an inactive state; managing a sleep start time and a sleep exit time for each of the multiple logical processors; and calculating the processor utilization of a first logical processor of the multiple logical processors by the following steps of: determining a run time of the first logical processor in the computation interval based on a sleep start time and a sleep exit time of the first logical processor; determining a sleep time of a second logical processor of the multiple logical processors in the computation interval based on a sleep start time and a sleep exit time of the second logical processor; dividing the run time of the first logical processor in the computation interval into a single task mode execution interval of the first logical processor and a multitask mode execution interval of the first logical processor using the determined sleep time of the second logical processor in the computation interval; and taking a total value of the single task mode execution interval of the first logical processor and the multitask mode execution interval multiplied by a predetermined multitask mode processor resource assignment ratio as the processor utilization of the first logical processor being calculated in the computation interval.