.DA
.TL
Unix at CIRES
.AU
the staff
.AI
CIRES Computing Facility
.SH
.LG
Purpose of this document
.SM
.PP
This note catalogs local variations of the
.i vanilla
seventh edition of
.B Unix
implemented at CIRES.
One of its functions is to
provide a dumping place
for notes and memoranda
which are not otherwise easily classified.
As such,
it values completeness over coherence.
.SH
.LG
System documentation
.SM
.NH 0
Manual pages
.PP
New or revised manual pages
(
.I i.e.,
entries for vol. 1)
are placed in
.B /usr/man,
where the original manual pages reside.
Notice of new or revised pages is mailed
to active users,
and clean originals are available for
individual copying in the receptionist's
office on the second floor.
Users may ignore changes,
copy them at their own cost,
or
.B vroff
their own copies.
In the latter extremity,
remember to use the
.B -man
macros instead of
.B -ms.
.NH
Other documents
.PP
A few scattered notes,
as well as the current rate sheet
and this note,
are available in
.B /usr/doc/local
for your perusal.
Copies of these are also available upstairs.
These documents use the
.B -ms
macros.
.SH
.LG
Fortran libraries
.SM
.PP
There are several libraries
of fortran-callable subroutines
available,
in addition to the default
.I f77
libraries.
Any subroutine described by a vol. 1
manual page which requires the inclusion
of one of these will indicate the necessary
loader flags
( arguments of the form
.B -lxx
on the f77 command line).
The current libraries are:
.NH 0
HP Plot21
.IP
These are fortran routines for driving the HP 7221a
plotter in the user room
and are documented in an expensive, slick,
glossy by HP.  Several copies are available
in the user room,
where they shall remain.
This library requires the loader flag
.B -lHP.
.LP
.NH
CIRES fortran
.IP
This library contains miscellaneous,
non-numerical (see below)
subroutines of occasional interest to
.I f77 users.
Available routines are documented in
vol. 1.
This library requires the loader flag
.B -lCf
(note the upper-case C).
.LP
.NH
CIRES mathematical
.IP
This library contains subroutines
of possible interest to number-crunchers.
Entries are documented in
.B X?
This library requires the loader flag
.B -lCm.
.LP
.NH
Disvec library
.IP
This library contains the
.B disvec
routines described in a special note
under
.B /usr/doc/local.
This library is accessed
.I via
.B -lDV.
.LP
.SH
.LG
Priorities and scheduling
.SM
.PP
User processes normally run at
one of four priorities:
.IP [0]
.B normal,
which you get when you log in and keep
until you make explicit provisions otherwise;
.IP [1]
.B nohup,
which you get from the
.I nohup
command or
.I nice -5;
.IP [2]
.B low,
which you get from the
.I low
command or
.I nice -10;
.IP [3]
.B ultralow,
which you get from the
.I ultralow
command or
.I nice -15.
.LP
The system priority algorithm
has been diddled so that the
run-time priorities for these
four classes never overlap.
Thus,
.B nohup
jobs get the cpu only when
no
.B normal
jobs can use it,
.I etc.
Intermediate values of
.I nice
may be used;
.I nice -4
allows you to pay
.B normal
rates for (almost)
.B nohup
priority.
Note that
.I nice
is cumulative;
.I nice -10
.I nice -5
is the same as
.I nice -15.
.PP
We have also fiddled with the swapping task
so that the system administration may force all
processes with priorities worse than a
given threshold
to be swapped out to disk and held there.
This means that we can,
for example,
checkpoint all
.B low
and
.B ultralow
jobs to disk until the system is relatively idle.
Checkpointing, or swapping,
does not disrupt the process checkpointed;
it merely freezes the victim for a while.
(We cannot save processes across a system boot.)
The purpose of this feature is to help us to
maintain time-sharing response when:
.IP 1
there is heavy swapping traffic because of large
numbers of
.B low
and
.B ultralow
jobs
(this hasn't happened yet), or
.IP 2
an i/o bound low-priority jobs is
hogging the disk
(this has happened).
.LP
Thus, when the system gets slow, we will try
checkpointing various priority classes,
starting with
.B ultralow,
until things get better.
Only in the event of near-deadlock,
however,
will
.B nohup
processes be checkpointed.
.PP
Most often,
a sluggish system is due to numerous
.B normal
priority jobs clogging our single disk
controller
(a piece of fancy hardware).
Compiling, loading,
file inspection and manipulation,
and process pipelining all generate
substantial disk traffic:
the cpu may, in fact, be relatively idle
even when terminal response is slow.
The real solution to this problem is to add
additional disks with individual controllers.
Some
.I interim
aids are:
use
.I mv
instead of
.I cp
where possible,
use
.I make
to minimize unnecessary compilations,
.I etc.
Mostly,
however,
be patient.
