6. DATA SOURCES › 6.4 CPU Time Measurements › 6.4.1 What Is CPU Time?
6.4.1 What Is CPU Time?
CPU time is the accumulated time a program task executes on a
Central Processor (CP) for a given job step.
The complexities of CPU time measurement and reporting arise
because MVS is a multi-tasking operating system. Proper
accounting for processor utilization requires that processor
time be accurately distributed among many concurrently
running tasks. CPU time is recorded in hundredths of seconds
used.
Measurement of CPU time depends on a hardware facility, the
CPU timer. This system component is a subtracting register.
In use, it is loaded with some value and then decrements at a
steady rate while the processor is running. Sometimes the
value used is the "208-day value," a very large number that
requires just over 208 days worth of decrementing to go to
zero. If the task has executed an STIMER macro, then a Timer
Queue Element (TQE) will be used instead. Each time the
dispatcher gives control to a task, it sets the CPU timer to
one of the values and the decrementing begins. When the task
relinquishes processor control, the difference between the
current value of the timer and the value it had when the task
first got control represents the CPU time used.