2. COST ACCOUNTING CONCEPTS FOR IS ORGANIZATIONS › 2.3 Resource Accounting › 2.3.3 CPU Occupancy Time
2.3.3 CPU Occupancy Time
CPU occupancy time, also known as pseudo-elapsed time,
approximates how long a job would be in the system if it
ran all by itself, without the influence of the
multiprogramming mix. Two basic methods compute
pseudo-elapsed time: the algorithmic and wait-time methods.
ALGORITHMIC APPROACH
The algorithmic approach uses the following type of formula
to approximate the occupancy time:
Occupancy Time = CPU Time + (dms * Number of I/Os)
where "dms" is the average duration in milliseconds of one
input/output (I/O) operation.
The error in this approach, however, is that the user is
charged the full system rental, when the job may have
required only minimal system resources. For example, suppose
you submitted a tape copy program that would run for ten
minutes if it was the only job in an environment with thirty
tape drives and numerous disk drives. You would pay for much
more than the job was consuming.
Another problem with the algorithmic approach is its
inability to consider other important characteristics such as
device speed, overlap, channel separation, and access
methods. For instance, an indexed-sequential update
operation and a sequential read operation would be charged
exactly the same amount because they are one I/O operation
each. In actuality, however, the index-sequential is much
more time-consuming than the sequential operation.
WAIT-TIME APPROACH
The wait-time approach is based on the operating system
measurement wait time. Wait time is calculated with the
following formula:
Occupancy Time = CPU Time + Wait Time
where Wait Time is the amount of time that the task was
voluntarily waiting for its own I/O function to complete.
In theory, the wait-time approach is the most accurate.
However, measuring wait time accurately and equitably
presents another problem. In most uses of this approach,
wait time is not determined solely as the amount of time the
task required, but includes factors such as access contention
that is not the fault of the task.