Guardian Programmer's Guide

Table Of Contents
Writing a Command-Interpreter Monitor ($CMON)
Guardian Programmer’s Guide 421922-014
23 - 22
Controlling Change of Process Priority
! Do not change the program-file name:
PROCESSCREATION^ACCEPT.PROGNAME ':='
PROCESSCREATION^MSG.PROGNAME FOR 12;
! Reply to the TACL process:
CALL REPLYX(PROCESSCREATION^ACCEPT,
$LEN(PROCESSCREATION^ACCEPT));
END;
Alternatively, you can prohibit use of certain CPUs that normally perform critical
processing. Here, you could check the incoming request for a request to use the
forbidden CPU and then either allocate some other CPU, again using a round-robin
algorithm, or simply reject the request.
Controlling Change of Process Priority
When a user requests to change the priority of an existing process using the ALTPRI
command, the TACL process sends an Altpri^msg message to $CMON to verify the
request. The $CMON process can either accept the request as it is or reject it.
Note that for the user to change the priority of a process, one of the following must be
true:
The process has the same process access ID as the user.
The user is the group manager of the process access ID of the process.
The user is the super ID (255, 255).
If none of the above is true, then the user cannot change the priority, regardless of
$CMON.