The Tape operator (p3,tapeoperator)
program uses the Device Allocator (p2,device-allocator)
with a "receptionist" a resource allocator which has knowledge
of VOLUME ID's and mounted vs. unmounted state. The "device
driver" is a Resource object that holds the Device key and
will give it to a requestor.
A system administrator calls the device allocator and specifies
one of several "receptionists" for each tape drive in the
system. There is presumably an operator associated with
this receptionist and that operator will have an associated
tape library and set of tape keys that will request drives
(there may be a division based on geographical locations
The DEVDVRF (device driver factory) is really a RESOURCEF
(resource factory) that is simply a vessel for the device
key. The RESOURCE will call the "receptionist" which is
an ALLOCATE domain (it checks in) where it is saved as an
available resource. Subsequent requests to the ALLOCATE
domain will temporarily assign the resource to the requestor.
RESOURCEF(0;SB,METER,SB ==> c;RESOURCE)
RESOURCE(0;devicekey,allocator,logger ==> c)
Give a device key to a resource domain. The domain RETURNS
to allocator to register for subsequent allocation. The
resource domain becomes available and will accept the following
ordercodes. Hint! There are two Entry points and the domain
has "state" in that while it has a device key it behaves
in one way while without a device key it waits to get one.
RESOURCE(0; ==> ;devicekey)
RESOURCE(1; ==> ;logger)
RESOURCE(2; ==> ,(2,devad))
Return the device address of this resource.
Return to the state of having no device key. Return
to the device allocator (original caller) with a return
code of N. Caller is FORKed with order code 0.
0 - request for a new device key
3 - non-recoverable device error]
4 - non-recoverable inboard error
>4 do not reallocate this until after intervention
Create a resource allocator. The ALLOCATE1 key serves
as the receptionist for RESOURCE domains. The ALLOCATE1
and RESOURCEF keys are given to the administrator who will
use them to initialize devices with the DEVALOC key. The
ALLOCATE key is used to temporarily allocate the resource.
When the kernel restarts the first call to the RESOURCE
domain to fetch the device key will clue the caller into
using ordercode 16 on the RESOURCE key so that it will get
a new device key. The caller will then call the ALLOCATE
key for a new resource.
ALLOCATE1(0;RESOURCE ==> c)
"Receptionist" entry. This is RETURNed to by the RESOURCE
domain to announce availability of resource. This does
not effect the state of the resource as understood by the
ALLOCATE domain with respect to the volume id of the once
in use resource.
ALLOCATE(0,(6,volid); ==> c;RESOURCE)
Allocate a resource to mount a volume (VOLID) or return
the RESOURCE key of the resource upon which the volume was
last mounted. The resource is put into the "mounting" state.
ALLOCATE(1;RESOURCE ==> c)
The device key is checked for usefulness. Any time the device
key is found non-useful, the resource is marked as not configured
and RESOURCE is called with order code 16 to send it back
to the device allocator for another key.
1 "discovered" resource allocated (volume already mounted)
2 volume in use
3 no resources available
Deallocate the resource if the RESOURCE key is current.
If the device key is no longer valid, call RESOURCE with
order code 16 and mark the resource as not configured. The volume mounted will be remembered.
ALLOCATE(2;RESOURCE ==> c)
If the RESOURCE key is not current, call RESOURCE with order
code 16 and let the device allocator sort this out.
1 RESOURCE not current.
RESOURCE can become "not current" if the DEVALOC key
is called to initialize the device. In this case a new
RESOURCE domain will be build from RESOURCEF and a device
key will be given to it. Any existing RESOURCE domains
will not be destroyed until they discover (or are told)
that their device keys are no longer working. If this happens
in the middle of a mount, the tape operator must be informed
and another tape drive chosen. This situation can happen
when tape operators get impatient with some "hangup" and
start poking things.
2 device is unknown
As in order code 1 except that the volid will not be
ALLOCATE(3;RESOURCE ==> c)
ALLOCATE(4,(2,devad); ==> c,(2,devad)(6,volid)(1,status))
ALLOCATE(5; ==> c,(2,devad)(6,volid)(1,status))
Get status of resource with the lowest device address
ALLOCATE(6,(2,devad); ==> c,(2,devad)(6,volid)(1,status))
Get status of the resource with the next highest device
address after DEVAD.
ALLOCATE(7,(2,devad); ==> c)
1 no more devices
2 invalid parameter
Disable a resource. Do not allocate resource until the
resource is enabled.
ALLOCATE(8,(2,devad); ==> c)
1 resource unknown
2 invalid parameter
ALLOCATE(9,(2,devad); ==> c)