Mesquite Software

Home
Products and FAQ
Customers
To Order
Contact Us
Site Map
Documentation
News & Events

Purchase & Download
Or, log in here to
access your account.
 
Documentation

17. Process Classes

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.

17.1. Declaring and Initializing Process Classes

To declare a pointer to a dynamic process class:

Example: process_class *c;

A process class must be initialized via the process_class statement before it can be used in any other statement.

Prototype: process_class::process_class(char *name)
Static Example: process_class cs("low priority");
Dynamic Example: c = new process_class("low priority")

17.2. Using Process Classes

To have the executing process join a process class:

Prototype: void process_class::set_process_class(void)
Dynamic Example: c->set_process_class();

To retrieve a pointer to the process_class for an active process:

Prototype: process_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.

17.3. Producing Reports

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.

PROCESS CLASS SUMMARY
             
id name number lifetime hold count hold time wait time
0 default 493 4.05680 0.99594 4.05680 0.00000
1 low priority 293 229.66986 0.54266 2.27873 227.39113
2 high priority 198 2.18412 1.00000 1.67845 0.50567

17.4. Changing the Name of a Process Class

Prototype: void process_class::set_name(char
*new_name)

Dynamic Example: c->set_name("high priority");

17.5. Resetting Process Classes

The statistics associated with a process class can be reset as follows:

Prototype: void process_class::reset(void)
Example: c ->reset();

The statistics associated with all of the process classes can be reset as follows:

Prototype: void reset_process_classes(void)
Example: reset_process_classes();

17.6. Deleting Process Classes

To delete a dynamic process class:

Dynamic Example: delete c;

If a facility is collecting statistics for the deleted class, this collection will continue.

17.7. Inspector Methods

These methods 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 methods is as indicated.

Prototype: Functional Value:
long process_class::id() id of process class
char *process_class::name() pointer to name of process class
long process_class::cnt() number of processes in process
class
double process_class::lifetime() total time for all processes in process class
long process_class::holdcnt() total number of holds for all processes in process class
double process_class::holdtime() total hold time for all processes in process class

Next Section

 
Home | Products/FAQ | Customers | To Order | Contact Us | Site Map | Documentation
© copyright 2005, Mesquite Software, all rights reserved.