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
User Guide: C : Process Classes

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 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");

17.2. Using Process Classes

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.

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. To Change the Name of a Process Class:

Prototype: void set_name_process_class(CLASS c, char
*new_name)

Example: set_name_process_class(c, "high priority");

17.5. Resetting Process Classes

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();

17.6. Deleting 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.

17.7. Inspector Functions

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

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