$PAGE "INCLRINS"                                               <<07258>>00010000
                                                                        00015000
<<========================================================>>            00020000
<<                                                        >>            00025000
<<                   inclrins - h9        * mpe v *       >>            00030000
<<                                                        >>            00035000
<<========================================================>>            00040000
                                                                        00045000
                                                                        00050000
$if x8=on                                                               00055000
                                                                        00060000
comment:                                                                00065000
             rin table general layout (initialized state)               00070000
             --------------------------------------------               00075000
                                                                        00080000
  dst=%26      |-----------------------------------------------|--      00085000
               |           index of first free entry           | |      00090000
               |-----------------------------------------------| |      00095000
 --------------|            (# local+global rins)*3            | |      00100000
 |             |-----------------------------------------------| |      00105000
 |             |///////////////////////////////////////////////| |      00110000
 |             |-----------------------------------------------|<- first00115000
 |             | rt  |        index of next free               |-- free 00120000
 |             |-----------------------------------------------| | entry00125000
 | rt=rin type |                       0                       | |      00130000
 |  (when      |-----------------------------------------------| |      00135000
 |  allowed)   |                       0                       | |      00140000
 |             |-----------------------------------------------|<-      00145000
 |             | rt  |        index of next free               |--      00150000
 | 1-local rin |-----------------------------------------------| |      00155000
 | 2-global    |                       0                       | |      00160000
 |   rin       |-----------------------------------------------| |      00165000
 | 3-file rin  |                       0                       | |      00170000
 |             |-----------------------------------------------| |      00175000
 |             |                                               | |      00180000
 |             ~                                               ~ | .    00185000
 |             ~                                               ~ | .    00190000
 |             |                                               | |      00195000
 |             |-----------------------------------------------| | last 00200000
 |             | rt  |              0(eol)                     |<- free 00205000
 |             |-----------------------------------------------|   entry00210000
 |             |                       0                       |        00215000
 |             |-----------------------------------------------|        00220000
 |             |                       0                       |        00225000
 |             |-----------------------------------------------|        00230000
 ------------->|               free list pointer               |--      00235000
 secondary     |-----------------------------------------------| |      00240000
 table of 12-  |               total #of entries               | |      00245000
 word entries  |-----------------------------------------------| |      00250000
 for global    |              number free entries              | |      00255000
rin's only     |-----------------------------------------------| |      00260000
               |                   reserved                    | |      00265000
   ------------|-----------------------------------------------| |      00270000
        |      |if free, ptt to next free|                     |0<      00275000
        |      |-------------------------|                     |1       00280000
        |      ~                                               ~        00285000
     length=                                                            00290000
   # allocated                                                          00295000
   global rins                                                          00300000
       *12     ~                                               ~        00305000
        |      |                                               |10      00310000
        |      |                                               |11      00315000
   ------------|-----------------------------------------------|        00320000
                 allocation and locking of local rins                   00325000
                 ------------------------------------                   00330000
                                                                        00335000
                                                      dst22(10)=26(8)   00340000
                              rin table                                 00345000
          |-----------------------------------------------|             00350000
          |           index of first free entry           |             00355000
          |-----------------------------------------------|             00360000
          |        (number of local+global rins)*3        |             00365000
          |-----------------------------------------------|             00370000
          |///////////////////////////////////////////////|             00375000
          |-----------------------------------------------|             00380000
          |                                               |             00385000
          |                                               |             00390000
          |                                               |             00395000
          |                                               |             00400000
job infor-|-----------------------------------------------|  local      00405000
  mation  | 0  1|         index of next rin               |--  rin #1   00410000
  table   |-----------------------------------------------| |(unlocked) 00415000
  -----   |                                               | |           00420000
  (jit)   |                                               | |           00425000
|------|  |                                               | |           00430000
|      |  |                                               | |           00435000
|      |  |                                               | |           00440000
|      |43|                                               | |           00445000
|------|  |-----------------------------------------------|<-  local    00450000
| lock |->| 0  1|         index of next rin               |--rin #2     00455000
|  rin |  |-----------------------------------------------| |(unlocked) 00460000
|index |  |                                               | |           00465000
|------|  |-----------------------------------------------| |           00470000
          |                                               | |           00475000
          |-----------------------------------------------| |           00480000
          |                                               | |           00485000
          |                                               | |           00490000
          |                                               | |           00495000
          |-----------------------------------------------|<-  local    00500000
          | 0  1|               0 end of list             |   rin #3    00505000
          |-----------------------------------------------|   (last)    00510000
          |                pin of holder(p)               |-- (locked)  00515000
          |-----------------------------------------------| |           00520000
       ---|              head of waiting list             | |           00525000
       |  |-----------------------------------------------| |           00530000
       |                                                  | |           00535000
       |                                                    |           00540000
       |                                                    |           00545000
       |                                                    |           00550000
       -->pcb#  waiting processes   pcb#  pcb# of process <--           00555000
                linked through            that "holds" rin              00560000
                pcb impeded queue                                       00565000
                (pcb#  pointers)                                        00570000
p = pin#                                                                00575000
                                                                        00580000
                                                                        00585000
                 allocation and locking of file rins                    00590000
                 -----------------------------------                    00595000
                                                                        00600000
     dst #22 (%26)                                                      00605000
                              rin table                                 00610000
          |-----------------------------------------------|             00615000
          |           index of first free entry           |             00620000
          |-----------------------------------------------|             00625000
          |        (number of local+global rins)*3        |             00630000
          |-----------------------------------------------|             00635000
          |///////////////////////////////////////////////|             00640000
          |-----------------------------------------------|             00645000
          |                                               |             00650000
          |                                               |             00655000
          |                                               |             00660000
          |                                               |             00665000
          |                                               |             00670000
          |                                               |             00675000
          |                                               |             00680000
          |-----------------------------------------------|             00685000
          | 1  1|/////////////////////////////////////////|             00690000
          |-----------------------------------------------|             00695000
       ---|               pin of holder                   |             00700000
       |  |-----------------------------------------------|             00705000
       |  |          head of waiting list(p)              |---          00710000
       |  |-----------------------------------------------|  |          00715000
       |                                                     |          00720000
       |                                                     |          00725000
       |                                                     |          00730000
       --> pcb# waiting processes   pcb#  process that    <---          00735000
                linked through pcb       "holds" rin                    00740000
                impeded queue                                           00745000
                                                                        00750000
           p=pin#                                                       00755000
                                                                        00760000
                                                                        00765000
                allocation and locking of global rins                   00770000
                -------------------------------------                   00775000
                                                                        00780000
            dst #22 (%26)                                               00785000
                              rin table                                 00790000
          |-----------------------------------------------|             00795000
          |           index of first free entry           |             00800000
          |-----------------------------------------------|             00805000
          |        (number of local+global rins)*3        |             00810000
          |-----------------------------------------------|             00815000
          |///////////////////////////////////////////////|             00820000
          |-----------------------------------------------|             00825000
          |                                               |             00830000
          |                                               |             00835000
          |-----------------------------------------------|             00840000
          | 1 0 |    index of password, username          |-----------  00845000
          |-----------------------------------------------|          |  00850000
          |              pin of holder                    |----      |  00855000
          |-----------------------------------------------|   |      |  00860000
      ----|          head of waiting list(p)              |   |      |  00865000
      |   |-----------------------------------------------|   |      |  00870000
      |   |                                               |   |      |  00875000
      v   |                                               |   v      |  00880000
  pcb#    |                                               |  pcb#    |  00885000
          |                                               |          |  00890000
 waiting  |                                               |  process |  00895000
processes |                                               |   that   |  00900000
          ~                                               ~  'holds' |  00905000
          ~                                               ~   rin    |  00910000
          |                                               |          |  00915000
          |                                               |          |  00920000
          |-----------------------------------------------|          |  00925000
          |                                               |<----------  00930000
          |                                               |             00935000
          |                 rin password                  |             00940000
          |                                               |             00945000
          |                                               |             00950000
          |-----------------------------------------------|             00955000
          |                                               |             00960000
          |                                               |             00965000
          |                   username                    |             00970000
          |            (user name and account)            |             00975000
          |                                               |             00980000
          |                                               |             00985000
          |                                               |             00990000
          |-----------------------------------------------|             00995000
                                                                        01000000
           p=pin#                                                       01005000
           index of password = relative to base of secordary            01010000
                               table                                    01015000
;                                                                       01020000
$if                                                                     01025000
<< any change to the rin table will impact   >>                         01030000
<< the following modules:                    >>                         01035000
<<  73,60,64                                 >>                         01040000
<< global array declarations for the rin table  >>                      01045000
                                                                        01050000
integer array rin'globalptr(@) = db+1;                                  01055000
integer array rin'e(*) = db+0;                                          01060000
                                                                        01065000
                                                                        01070000
equate rin'dst         = %26,                                           01075000
       rin'sir         = 38;                                            01080000
                                                                        01085000
                                                                        01090000
equate rinentry        = 0,                                             01095000
       holder          = rinentry + 1;                                  01100000
                                                                        01105000
equate waithead        = holder + 1,                                    01110000
       rin'length      = waithead + 1;                                  01115000
                                                                        01120000
                                                                        01125000
<<secondary table definitions>>                                         01130000
                                                                        01135000
equate freeptr         = 0,                                             01140000
       totalentries    = freeptr + 1,                                   01145000
       numfreeentries  = totalentries + 1;                              01150000
                                                                        01155000
equate passwordf       = 0,                                             01160000
       passwordln      = 4,                                             01165000
       usernamef       = passwordf + passwordln,                        01170000
       usernmln        = 8;                                             01175000
                                                                        01180000
equate rin'passuserln  = passwordln + usernmln;                         01185000
                                                                        01190000
                                                                        01195000
<<         db relative declarations                      >>             01200000
<< to use the rin table via exchangedb, you must declare >>             01205000
<< a db relative array rin as follows:                   >>             01210000
<<       integer array rin(*) = db+0;                    >>             01215000
<<       integer array rin'e(*) = rin;                   >>             01220000
<< rinptr is an index for rin table entries.  it is      >>             01225000
<< declared as an integer in the process.                >>             01230000
<< the index for the array must also be declared.  the   >>             01235000
<< index for the array is rin'passuserinx, which is used >>             01240000
<< to step through each word of the password and username>>             01245000
                                                                        01250000
                                                                        01255000
define rin'firstfree  = rin'e(0)#,                                      01260000
       rin'totalnum   = rin'e(1)#;                                      01265000
                                                                        01270000
define rin'e'type     = rin'e(rinptr+rinentry).(0:2)#,                  01275000
       rin'e'index    = rin'e(rinptr+rinentry).(2:14)#,                 01280000
       rin'e'headq    = rin'e(rinptr+waithead)#,                        01285000
       rin'e'holder   = rin'e(rinptr+holder)#;                          01290000
                                                                        01295000
define rin'freeptr    = rin'globalptr(freeptr)#,                        01300000
       rin'totentries = rin'globalptr(totalentries)#,                   01305000
       rin'freentries = rin'globalptr(numfreeentries)#;                 01310000
                                                                        01315000
define rin'e'password = rin'globalptr(rin'e'index+passwordf+            01320000
                      rin'passuserinx)#,                                01325000
       rin'e'username = rin'globalptr(rin'e'index+usernamef+            01330000
                      rin'passuserinx)#,                                01335000
       rin'e'nextfree = rin'globalptr(rin'freeptr)#,                    01340000
       rin'e'link     = rin'globalptr(rin'e'index)#;                    01345000
$title " "                                                              01350000
