ALTWG


     Alters the scheduling characteristics of an existing workgroup.
To alter the membership criteria (and create a new workgroup),
use the NEWWG command.

SYNTAX

     ALTWG [WORKGROUP=] workgrp
[ [;BASE=] base]
[ [;LIMIT=] limit]
[ [;MINQUANT=] min]
[ [;MAXQUANT=] max]
[ [;BOOST=] {DECAY } ]
{OSCILLATE}
[ [;TIMESLICE=] tslice]
[ [;MINCPUPCT=] minpercent]
[ [;MAXCPUPCT=] maxpercent]

PARAMETERS

workgrp             The name of the workgroup whose scheduling
characteristics will be modified. This is a
required parameter. Wildcarding is not allowed.

base An integer specifying the priority at which
processes executing in the specified workgroup
begin their Dispatcher transactions. Priority
is inversely related to the integer: a higher-
priority process has a lower number. While the
full range is provided for compatability, avoid
setting the base priority between 150 and 152,
since user processes running at a higher priority
than 152 can adversely affect system performance.

limit An integer specifying the lowest priority
which processes executing in the specified
workgroup can attain. Priority is inversely
related to the integer: a higher- priority
process has a lower number. The limit, which
can range from 150 to 255, must be greater than
or equal to the base.

min The minimum number of milliseconds that a
process may use the CPU before its priority is
reduced. The min is a lower bound for the
quantum value. The quantum value determines
the rate of priority decay for processes
within the workgroup. Values range between
1 and 32,767.

max The maximum number of milliseconds that a
process may use the CPU before its priority is
reduced. The max is an upper bound for the
quantum value. The quantum value determines the
rate of priority decay for processes within the
workgroup. The value of max must be greater than
or equal to the value of min. Values range between
1 and 32,767.

DECAY Indicates if the workgroup is to demonstrate
the default decay behavior associated with circular
queues. If set, a process will decay normally to the
limit priority and will return to the base priority
when the Dispatcher transaction is completed.

OSCILLATE Indicates if the workgroup is to
demonstrate oscillation. If set, a process will be
placed back to the base priority once its priority
has decayed to the limit priority, even if it has
not completed a Dispatcher transaction.

tslice The timeslice is the maximum number of
milliseconds a process in the workgroup can
hold a CPU before returning to the Scheduler to
have its priority recalculated. Values must be
multiples of 100, with a minimum value of 100
and a maximum value of 32700.

minpercent Indicates the minimum percent of time which
the CPU will be made available to the workgroup's
member processes. Within the target workgroup,
this CPU time is allocated according to the
processes' priorities. The workgroup is guaranteed
this minimum percentage of time even if higher-
priority processes in other workgroups are ready
to run.

If the processes in the workgroup do not require
as much CPU time as their guaranteed minimum,
that time will be available to processes in other
workgroups. The default value for this optional
workgroup characteristic is that the workgroup is
not guaranteed any minimum CPU percent and that
CPU allocation is based on process priority only.

maxpercent Indicates the maximum percent of time which
the CPU will be made available to the
workgroup's member processes. The workgroup
will be limited to this maximum percentage of
time even if no other process in another
workgroup is ready to run. In other words, a
workgroup will be limited to this maximum
percentage of time even if the system must
remain idle for the remainder of the time.

The default value for this optional workgroup
characteristic is that there is no maximum which
would prevent a workgroup's processes from
obtaining the CPU time their priorities warrant.

OPERATION


Each workgroup consists of three components, a name, membership
criteria, and scheduling characteristics. The membership criteria
(MEMB_LOGON, MEMB_PROGRAM, and MEMB_QUEUE parameters) determine
process assignment, which occurs on six occasions:

o at process creation
o whenever you change one of the process attributes on which
membership can be based
o when you explicitly move a process to a workgroup via the
ALTPROC command
o when you purge a workgroup, and the subsequent purgescan
redistributes processes to remaining workgroups
o when you add a new workgroup to the current workgroup
configuration
o when the current workgroup configuration is replaced

Membership conflicts are resolved by assigning a process to
the first workgroup for which it qualifies. (Workgroups are
maintained in an ordered list in which position is important.
For more information, read the discussion of the POSITION
parameter of the NEWWG command. Since the Workload Manager
uses a first-fit algorithm, other workgroups are not considered
once a match is found.

The scheduling characteristics define the scheduling policies which
govern processes within the workgroup. The MPE/iX Dispatcher is
priority-driven, giving a CPU to the highest priority process
ready to run. Each workgroup has a base and a limit, defining the
priority range for processes within that workgroup. Processes will
begin their Dispatcher transactions at the base priority and decay
towards the limit priority as they consume system resources. The
process priority will never drop below the limit of the workgroup.
If the boost property of the workgroup is set to oscillate, the
process priority will be reset to the base priority when it decays
to the limit priority. Processes completing Dispatcher transactions
(typically via a terminal read) are reset to the base priority.

Each system is configured with five default workgroups,
AS_Default, BS_Default, CS_Default, DS_Default, ES_Default.
Each of these workgroups represents one of the five scheduling
queues, AS through ES. A default workgroup will have a specific
queue's scheduling policies and specify that scheduling queue as
its only membership criteria. By defining the default workgroups
as the last five workgroups in the ordered list, the Scheduler
can guarantee that all processes will be assigned to a workgroup.

The ALTWG command allows a user to alter only the
scheduling characteristics of an existing workgroup. ALTWG is
similar in function to TUNE. In fact, there is overlap between
the two commands. Both commands maybe used to adjust the
scheduling characteristics of the CS_Default, DS_Default, and
ES_Default workgroups. The ALTWG command changes scheduling
characteristics of a workgroup, not membership criteria. As a
result, there is no need for a system-wide scan since workgroup
membership has not been changed.

Altering the scheduling characteristics of a workgroup will be
deferred while a scan (for example, purge-pending) is in progress.

The ALTWG command may be issued from a session, job, program
or in BREAK. Pressing [Break] has no effect on this command.
ALTWG requires System Supervisor (OP) or System Manager (SM)
capability.


NOTE

The default workgroups are defined by the system and cannot be
purged. In fact, only the scheduling characteristics of the
CS_Default, DS_Default, and ES_Default workgroups may be modified.

User-defined workgroups may be created, altered, and/or purged.
However, only the scheduling characteristics of an existing user-
defined workgroup may be altered (for example, a user must use
NEWWG to change the name or membership criteria of an existing
user-defined workgroup).

WARNING

Altering the scheduling characteristics of a workgroup will affect each
of the member processes. That is, the Scheduler might need to adjust
each process' priority attribute. The time required to make these
priority adjustments is related to the number of processes in the
workgroup.

EXAMPLE(S)

     To set the Program_Development workgroup's base to 158, limit
to 168, and boost priority to decay, enter:

ALTWG Program_Development, 158, 168, , , decay

To set the Program_Development workgroup's timeslice to 500
milliseconds, enter:

ALTWG Program_Development ;timeslice=500

RELATED INFORMATION

Commands :   NEWWG, PURGEWG, SHOWWG, TUNE, SHOWQ, ALTPROC, SHOWPROC

Manuals  :   MPE/iX Intrinsics Reference Manual (32650-90028)
             Using the HP3000 Workload Manager (B3879-90001)