Process classes are used to segregate
data for reporting purposes A set of
usage statistics is automatically maintained
for each process class. These are "printed"
whenever a report
or a report_classes
statement is executed. In addition,
facility information (from report_facilities)
is kept by process class, when process
classes exist. See
section 19.2, "CSIM Report
Output", for details about the
reports that are generated.
To declare a process class:
Example:
CLASS c;
A process class must be initialized
via the process_class
statement before it can be used in any
other statement.
Prototype:
CLASS process_class(char*
name)
Example:
c = process_class("low
priority");
To have the executing process join a
process class:
Prototype:
void set_process_class(CLASS
c)
Example:
set_process_class(c);
Prototype:
CLASS current_class(void)
Example:
c = current_class();
If no set_process_class
statement is executed for a process,
that process is automatically a member
of the "default" class. A
report statement will not print process
class statistics for the default process
class. A report_classes
statement will print process class statistics
for the default process class, but ONLY
if it is the only process class. If
any other process class is defined,
report_classes
will only report on non-default process
classes.
Reports for process classes are most
often produced by calling the report
function, which prints reports for all
of the CSIM objects. Reports can be
produced for all existing process classes
by calling the report_classes
function. The report for a process class
gives the class id, the class name,
the number of entries into the class,
the average lifetime for a process in
this class, the average number of hold
operations executed by jobs in this
class, the average time per hold and
the average wait time per job in this
class.
Prototype:
void set_name_process_class(CLASS c,
char
*new_name)
Example:
set_name_process_class(c,
"high priority");
The statistics associated with a process
class can be reset as follows:
Prototype:
void reset_process_class(CLASS
c)
Example:
reset_process_class(c);
The statistics associated with all of
the process classes can be reset as
follows:
Prototype:
void reset_process_classes()
Example:
reset_process_classes();
To delete a process class:
Prototype:
void delete_process_class(CLASS
c)
Example:
delete_process_class(c);
If a facility is collecting statistics
for the deleted class, this collection
will continue.
These functions each return a statistic
which describes some aspect of the usage
of the specified process class. The
type of the returned value for each
of these functions is as indicated.
| Prototype: |
Functional
Value: |
| long class_id(CLASS
c) |
id of process
class |
| char* class_name(CLASS
c) |
pointer to name
of process class |
| long class_cnt(CLASS
c) |
number of processes
in process
class |
| double class_lifetime(CLASS
c) |
total time for
all processes in
process class |
| long class_holdcnt(CLASS
c) |
total number of holds for all
processes in process class |
| double class_holdtime(CLASS
c) |
total hold time
for all processes
in process class |