发明名称 Extract CPU time facility
摘要 Disclosed is a computer program that, when run, can determine the resource usage (for example, processor time) of tasks (or job, process, subroutine). The determination is performed on behalf of the user application such that is does not require calls to the Operating System (OS). When a task is started, a privileged instruction (i.e. one unavailable to the user application) stores the value of a CPU timer. When the user application wishes to know the amount of execution time, it executes a non-privileged instruction which calculates the elapsed time and reports it in a single uninterruptible operation. This is achieved by subtracting the start time from the end time such that the difference is equivalent to the execution time. The invention can also be used to determine the running time of a task that is switched in and out of execution. For each time slice that the task is running, the time taken is added into an accumulation value to give the time taken so far.
申请公布号 GB0813536(D0) 申请公布日期 2008.08.27
申请号 GB20080013536 申请日期 2008.07.24
申请人 INTERNATIONAL BUSINESS MACHINES CORPORATION 发明人
分类号 主分类号
代理机构 代理人
主权项
地址
您可能感兴趣的专利