Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

GATE(4)  —  UNIX Programmer’s Manual

NAME

gate − SLIC gate usage

DESCRIPTION

Drivers in DYNIX need to use gates, locks, and semaphores.  Since the SLIC chip provides a finite number of gates to build these constructs, the gates must be allocated to the various functions in the operating system. 

Of the 64 gates currently supported by the SLIC chip, the last 10 are pre-allocated by the DYNIX kernel for the purpose of building device-drivers and related code.  These gates are defined in /sys/machine/gate.h, via:

#defineG_DRIVERMIN54
#defineG_DRIVERMAX63

The current usage of gates by the drivers supported by DYNIX is given below:

ttyc∗SEC Console Ports54
rts∗SEC Tape57
sd∗SEC Disk58
se∗SEC Ether59
tty[hijk]∗MULTIBUS Systech MTI-800/160061
xp∗MULTIBUS Xylogics 450 Disk62
xt∗MULTIBUS Xylogics 472 Tape62

The implementation of sleep()/wakeup() for mono-processor drivers uses gate 63.  This gate is not used unless there are mono-processor drivers in the system. 

The typical use of gates in a driver is to build locks and semaphores.  Since these constructs hold the gate for brief periods, contention on the gate is low.  Thus it is acceptable to use a given gate in multiple drivers. 

Most drivers configure the gate(s) they’re using in their binary configuration file (for example in /sys/conf/conf_sd.c), using a line like:

gate_t  sdgate = 58;

This technique is recommended since it removes the dependency on an explicit gate from the driver source.  This also better supports the ability to tune the usage of the gates for a given hardware/software configuration. 

FILES

/sys/machine/gate.h defines SLIC gate usage

/sys/conf/conf_∗.c driver binary-configuration files

CAVEAT

This description is implementation specific and subject to change.  There will always be at least 10 gates pre-allocated to driver purposes, however. 

BUGS

A more dynamic allocation strategy for gates might be better. 

DYNIX

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026