|
|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 155136 (0x25e00)
Types: TextFile
Names: »tbanker«
└─⟦00964e8f7⟧ Bits:30007478 RC8000 Dump tape fra HCØ.
└─⟦b2ec5d50f⟧
└─⟦0b92c64d5⟧ »ctb«
└─⟦this⟧
(bbanker = set 1 disc
bbanker = slang proc.options
scope user bbanker
print bbanker integer words.4 0.6
)
b. w.
p.1
; sl 16.9.71 boss 2, banker, ...1...
s0= 0, s1=1
s. a10, d40, f50, g120, j45 ,h1 w.;
h0, h1 ;
78 03 31, 88 ; version id:
m. boss 2 tbanker
a0:
k=10000 ; list of external words:
g30., g31., g32., g33., g34., g35., g36., g37., g38., g39.
g40., g41., g42., g43., g44., g45., g46., g47., g48., g49.
g50., g52., g53., g54., g55., g56., g57., g58., g59.
g60., g61., g62., g63., g64., g65., g66., g67., g68., g69.
g70., g71., g72., g73., g74., g75., g76., g77., g78., g79.
g87.
g90., g91., g93., g95., g96., g97., g98., g100.
g101.,g102.,g103.,g104.,g109.,g110.
0 ;
jl. g14. ;
; block structure and contents: page structure:
; s. d, g
; external words initialization 1
; b. a, b, c
; initialization initialization 2
; i.e.
; variable page variable page
; b. a, b, c
; local variables main banker page
; central wait -
; main actions -
; subroutines, leaf level -
; testoutput -
; i.e.
; b. b, c
; local variables core allocation page
; set claims1 -
; allocate core -
; set timer -
; timer corutine -
; subroutines -
; swopout, swopin -
; i.e.
; b. b, c
; local variables resource allocation page
; main actions -
; subroutines, medium, leaf level -
; allocate -
; test output -
; i.e.
; i.e.
\f
; sl 16.9.71 boss 2, banker, ...2...
b. a20, b70, c30 w. ; initialization:
b0: g87: 23 ; name of main console
b1: g62: 12 ; reserve virt
b2: g63: 13 ; move to virt
b3: g64: 14 ; simulate lock
b4: g65: 15 ; end init
b5: g66: 24 ; put in active que
b6: 0 ; save virt variable page
b7: 3<12, 0,0,0 ; input message to catalog, user cat.
0 ;+8 output to user cat
b8: <:catalog:>,0,285 ;
b9: <:usercat:>,0,286 ;
b10: 0 ; for set base
b11: g68: 31 ; init alarm
b12: <:<10>too few protection keys <10>:>
b13: h. 1<3+e81,g7 w. ; entry timer
b14: h. 2<3+e82,g15 w. ; entry banker
b15: g69: 0 ; base external
b16: 8, r.8 ; answer
b17: <:<10>catalog input trouble <10>:>
b18: -1-1<18 ; all except end document
b19: <:drum:>, 0,0 ; drum descr. later: +0 bsrel
; +2 total entries promised, negative repr.
; +4 free entries
; +6 free slices on drum (or 0)
0 ;+8 ext number for slice length
b20: <:disc:>, 0,0 ; disc descr. later: +0 bsrel
4 ; +6 free slices on disc
b21: 0,0 ; work
b22: d24 ; length banker variables
b23: <:<10>usercat incorrect <10>:>
b24: <:<10>usercat input trouble <10>:>
b25: <:<10>drum or disc missing <10>:>
b26: <:<10>entries do not match usercat <10>:>
b27: 0 ; old project number
; b28 , b29, see end init.
b30: 0 ; last pool
b31: 0 ; next rec address
b32=k+2,1<23,1<23-1 ; large interval
b33: 1<12+0 ; increment: 1 entry, slices
b34: 0 ; bsrel
b35: 0 ; pool
b36: 0, r.i29 ; sum rest claims
b37: <:<10>too many bs devices <10>:>
b38: <:<10>process too small <10>:>
b39: g83 ; length of main banker page + core allocate
b40: 0 ; possibly pool length
g47: 19 ; first semafore = top pool table
b49: 0 ; chain table addr of last bs device found
b50: g0. ; first of init buffer = first of main banker page
b51: g20. ; last of init buffer
b52: g105. ; top of init buffer
b53: g16. ; base of pool table
b54: 0 ; chain table address of <:disc:>
b56: g48. ; banker queue sem
b57: i105*16-i14 ; no of free account records
b58: 0 ; total overdraft (slices)
b59: 0 ; total overdraft (entries)
g70=b8+8, g71=b9+8
\f
; sl 23.5.72 boss 2, banker, ...3...
g14: rl w3 66 ; init free keys, key pattern:
bz w1 x3+32 ; w3:= boss process addr;
ld w1 24+12+4;
ns w0 3 ;
ac w1 x1-1 ; w1:=some pk allowed in pr;
bz w2 x3+33 ; w2:=if not monitor mode then pk else allowed pk;
c. e16
c. e80
sp 8 ;
jl. 4 ;
z.
c.-e80
sp. 0 ;
z.
bl w2 3 ;
z.
bz w1 x3+32 ; w1:=255-protection reg;
ac w1 x1-255 ;
rs. w1 b41. ; pr;
rs. w2 b42. ; pk;
ac w2 x2-7 ; w2:= 7 - protection key;
al w0 1 ;
ls w0 x2 ; w0:= 1 shift key place;
c. -e16-1
se w2 7 ; pk 0;
z.
ws w1 0 ; w1:= total key pattern:=
am. g2. ;
rs w1 g11 ; all boss keys - boss own key;
al. w0 b12. ;
sh w1 0 ; if total key pattern <= 0 then
jl. (b11.) ; init alarm(too few keys);
al w2 0 ; w2:= number of free keys:= 0;
a1: al w0 x1-1 ; rep:
la w1 0 ; w1:= w1 remove rightmost one;
al w2 x2+1 ; w2:= number of free keys:= w2 + 1;
se w1 0 ; if w1 <> 0 then
jl. a1. ; goto rep;
am. g2. ;
hs w2 g10 ; number of free keys:= w2;
rs. w2 b43. ; no of free keys;
rl w0 x3+22 ; init semafores, boss start
al. w2 g2. ; w2:= addressing base;
rs w0 x2+g12 ; boss start addr:= first storage of process;
al w0 1 ;
rs w0 (x2+g23) ; timer manipulation:=
rs. w0 (g55.) ; answer semafore:= 1;
rl w1 x2+g24 ;
al w1 x1-e13*2 ; decrease bases of psjob que and
rs w1 x2+g24 ; job in core to account for downer and
rl w1 x2+g25 ; converter.
al w1 x1-e13*2 ;
rs w1 x2+g25 ;
\f
; sl 23.5.72 boss 2, banker, ...4...
al w0 i100 ; init corutine descr, res and move code pages:
al w1 g3 ;
jl. w3 (b1.) ; w2:= reserve virt(core allocate);
am 1900 ;
al. w0 g2. ;
jl. w3 (b2.) ; move to virt(core allocate);
am 2000 ;
rs. w2 g13. ; save virt of core allocate page on main
am. (b39.) ; and resource allocation page;
rs. w2 g81. ;
am. g2. ;
rl w1 g22 ; w1:= corutine descr of timer;
rs w2 x1+6 ; page 0 of timer:= core allocate;
rl. w0 b13. ;
rs w0 x1+4 ; set testmode, rel return;
jl. w3 (b5.) ; put timer in active que;
al w0 i100 ;
al w1 g18 ; w2:= reserve virt(resource allocation page);
jl. w3 (b1.) ;
am 2000 ;
rs. w2 g82. ; save virt of resource allocate on main;
al w0 i100 ;
al w1 g1 ;
jl. w3 (b1.) ; w2:= reserve virt(main banker);
am. (b50.) ;
al. w0 b50. ;
jl. w3 (b2.) ; move to virt(main banker);
am. g2. ;
rl w1 g22 ; w1:= corutine descr of timer;
rs w2 x1+6+e12 ; page 0 of banker:= main banker;
am. (b39.) ;
rs. w2 +g80. ; save virt of main on resource allocate;
rl. w0 b14. ;
rs w0 x1+4+e12 ; set testmode, rel return;
am 2000 ;
rl. w2 g82. ; virt of resource allocate
am. (b39.) ;
al. w0 +g17. ; abs start
al w1 g18 ; length
jl. w3 (b2.) ; move to virt;
am. g2. ;
rl w1 +g22 ; w1:=banker descr;
al w1 x1+e12 ;
am. (b56.) ;
rl. w2 b56. ; w2:= banker que;
jl. w3 (b3.) ; simulate lock;
rs. w2 b48. ; banker que;
al. w2 b20.-16;
jl. w3 c9. ; search kit name (disc)
am 0 ;
rl. w3 b49. ; move nta of disc
rs. w3 b54. ;
am b20-b19; w2:= disc descr; skip
a2: al. w2 b19.-16; rep: w2:= drum descr;
jl. w3 c9. ; search kit name(w2);
jl. c4. ;+2 if not found then alarm;
am (x3) ;
rl w0 -8 ; w0:= slice length;
am (x2+24) ; ext(descr):= slice length;
rs. w0 b44. ;
ws w3 92 ;
rs w3 x2+16 ; descr.0:= bsrel;
c. i27 ;
se. w2 b19.-16; if drum exists and w2 <> drum then
jl. a2. ; goto rep;
z. ;
rl w2 96 ;
ws w2 92 ; w2:= top bs chain - first bs chain;
sl w2 i29<1+1; if w2 > number of bs devices * 2
jl. c17. ; then goto alarm;
\f
; re 76.05.11 boss 2, banker ...5...
al w0 i100 ;
rl. w1 b22. ;
jl. w3 (b1.) ; w2:= reserve virt(banker variables);
al w2 x2+1 ; writing page;
rs. w2 b6. ; save virt banker variables;
am. g2. ;
rl w1 g22 ; w1:= corutine addr of timer;
rs w2 x1+8 ; page 1 of timer:=
rs w2 x1+8+e12 ; page 1 of banker:= virt banker variables;
rs. w2 b45. ; ext(280);
am. (b15.) ;
rl w2 280<1 ;
jl. w3 (2) ; set externals;
g110: 40 ;
b41: 0 , -12 ; pr;
b42: 0 , -11 ; pk;
b43: 7 , 283 ; no of free keys;
b48: 0 , 67 ; banker que;
d25, 281 ; rel of account name;
g98: 2<12+19, 282 ; addr of old time - old boss run time;
f9 , 284 ; length psjob descr;
d28, 267 ; rel unclaimed accounts;
j31, 268 ; rel free accounts;
d29, 269 ; rel account accounts;
j32, 497 ; rel priority in job descr;
j20, 270 ; rel finis time record;
j7 , 271 ; rel state record;
j33, 292 ; time class;
j14, 293 ; rest claims;
f2 , 294 ; length of resource vector;
d22, 272 ; in core, a;
j34, 273 ; in core, b;
j10, 522 ; rel arrival time
j15, 274 ; rel reserve all record;
j35, 275 ; rel job name record+2;
j36, 276 ; rel job name record +6;
d0 , 277 ; first psjob (downer);
j37, 278 ; dead head;
j38, 279 ; resource head;
d13, 309 ; rel terminal input semaphore;
j39, -10 ; rel free-total;
j40, -9 ; rel total margin;
j21, 308 ; rel first core place on banker page;
b44: 0 , 287 ; slice length drum;
0 , 288 ; slice length disc;
b45: 0 , 280 ; virt banker variables;
0 , -1000 ; end of externals;
se w2 0 ; if second pass then
jl. c1. ; goto catalog balancing;
\f
; sl 5.4.72 boss 2, banker, ...6...
rl w2 66 ; prep access to catalog and user cat:
dl w1 x2+70 ; w2:= boss addr;
ds. w1 b21.+2 ; save current catalog base;
al. w3 b10. ;
rl w1 x2+76 ;
al w0 x1 ; set catalog base(first element of std int);
jd 1<11+72;
al. w3 b8. ;
jd 1<11+52; create area process(catalog);
al. w1 b16. ;
jd 1<11+16; send dummy message;
jd 1<11+18; wait answer;
al. w3 b9. ;
jd 1<11+52; crate area process(usercat);
jd 1<11+8 ; reserve process;
jd 1<11+16; send dummy message;
jd 1<11+18; wait answer;
rl. w3 b15. ;
rl. w0 b8.+8 ; ext(285):= name table addr of catalog;
rl. w1 b9.+8 ; ext(286):= name table addr of usercat;
rs. w0 b46. ; ext(285);
rs. w1 b47. ; ext(286);
jl. w3 (2) ; set externals;
g109: 40 ;
b46: 0 , 285 ; name table address of catalog;
b47: 0 , 286 ; name table address of usercat;
0 , -1000 ; end of externals;
al. w3 b10. ;
dl. w1 b21.+2 ; reset catalog base;
jd 1<11+72;
jl. (b4.) ; goto end init;
; the following pages are executed in second initialization pass
; only. the purpose of the code is to clear all non-permanent
; entries in the main catalog and update the user catalog in
; accordance with the permanent entries belonging to each pool.
b. a10 w. ;
a1: 0, 0 ; name tab addr, return
c9: rs. w3 a1.+2 ; search kit name(w2): w2 unchanged.
rl w3 92 ; name tab addr:= first bs device;
a2: rs. w3 a1. ; rep:
rl w3 x3 ; w3:= bs chain addr;
dl w1 x2+18 ;
sn w0 (x3-18) ;
se w1 (x3-16) ;
jl. a3. ;
dl w1 x2+22 ; if kit name = document name then
sn w0 (x3-14) ;
se w1 (x3-12) ;
jl. a3. ; begin
rs. w3 b49. ; save bs chain addr for possible warning message;
rl. w3 a1. ; w3:= name tab addr;
am. (a1.+2) ; return + 2;
jl +2 ; end;
a3: rl. w3 a1. ;
al w3 x3+2 ; next name tab addr;
se w3 (96) ; if name tab addr = last bs then
jl. a2. ; goto rep;
jl. (a1.+2) ; return + 0;
e. ;
\f
; sl 5.4.72 boss 2, banker, ...7...
b. a10 w. ;
c10: rs. w3 b21. ; start user cat input:
al w0 0 ; save return;
rs. w0 b7.+6 ; segment count:= 0;
rs. w0 b27. ; old project := 0;
jl. w2 c14. ; read;
jl. c3. ;+2 if end document then alarm;
rl w0 x2 ; w2 = buffer addr.
rs. w0 b19.+2 ; move total entries rpomised;
al w1 0 ;
a1: al w2 x2+2 ; rep: w2:= next of index table;
al w1 x1+1 ; segment count:= segment count + 1;
rl w0 x2 ;
sh w0 -1 ; if index table(w2) < 0 then
jl. a1. ; goto rep;
rs. w1 b7.+6 ; store segment count;
am. (b53.) ;
al. w1 b53. ;
rs. w1 b30. ; last pool:= base pool;
a2: jl. w2 c14. ; next segm: read;
jl. c3. ;+2 if end document then alarm;
a3: rl w1 x2 ; next record: w1:= record type, length;
se w1 0 ; if end record then
jl. a4. ; begin
jl. w2 c13. ; write; dummy in first part.
jl. a2. ; goto next segm;
a4: ; end;
am. (b51.) ;
sh. w2 b51. ; if recstart > last of buf
sh w1 -1 ; or rectype < 0 then
jl. c19. ; alarm(usercat incorrect);
bz w0 x2+1 ;
se w0 0 ; if reclength = 0
sz w0 1 ; or odd (or negative, as tested below) then
jl. c19. ; alarm(usercat incorrect);
wa w2 0 ; w2 := top record address;
am. (b52.) ;
sl. w2 b52. ; if top is outside buffer then
jl. c19. ; alarm(usercat incorrect);
rs. w2 b31. ; w2:= next rec addr:= top record addr;
bz w1 2 ; w1:= record type;
se w1 0 ; if project record then
jl. a5. ; begin
rl w0 x2-10 ;
sh. w0 (b27.) ; if project number <= old proj then
jl. c19. ; alarm(usercat incorrect);
rs. w0 b27. ; old proj := project number;
sl. w0 (b32.) ; if project number = large then
jl. (b21.) ; return + 0;
a6: rl. w3 b54. ; new pool:
rs. w3 b49. ; move nta of disc
rl. w3 b30. ;
a0=k+1 ; pool length
al w3 x3+4+i29<1; last pool:= last pool + 4 + bs devices * 2;
rs. w3 b30. ;
al w1 x3+i29<1+9; if top pool + safety > banker que sem
sl. w1 (g47.) ; then
jl. c18. ; alarm(process too small);
al w0 0 ; possibly pool length:= 0;
rs. w0 b40. ;
dl w1 x2-6 ; last pool.interval:= project or user interval;
ds w1 x3+2 ;
wa. w3 b20. ; w3:= last pool addr + disc claim rel;
a7: am. (b21.) ; exit: return + 2;
jl +2 ; end;
a5: sn w1 34 ; if user pool record then
jl. a6. ; goto new pool;
\f
; sl 5.4.72 boss 2, banker, ...8...
c. i27 ;
se w1 44 ; if drum exists and drum record then
jl. a10. ; begin
rl. w3 b30. ; w3:= last pool + drum chain rel + possibly pool length;
wa. w3 b19. ; goto exit;
wa. w3 b40. ;
jl. a7. ; end;
z. ;
a10: bz. w0 a0. ; if user record then
sn w1 2 ; possibly pool length:= pool length;
rs. w0 b40. ;
a8: se w1 6 ; if not private kit then
jl. a3. ; goto next record;
al w2 x2-14-16 ; w2:= document name -16;
jl. w3 c9. ; search kit name(w2);
jl. a9. ;+2 if not found then goto load w2, next record;
ws w3 92 ;
wa. w3 b30. ; w3:= bsrel + last pool + possibly pool length;
wa. w3 b40. ;
rl. w2 b31. ; w2:= next record - 2;
al w2 x2-2 ;
jl. a7. ; goto exit;
c11: rs. w3 b21. ; next user rec:
a9: rl. w2 b31. ; save return; w2:= next rec addr;
jl. a3. ; goto next record;
e. ;
b. a10 w. ;
a1: 0 ; return
c13: dl. w1 b7.+8 ; write: w0:= segm count;
sn w1 0 ; if output to user cat = 0 then
jl x2 ; return;
al w2 x2-2 ; prepare return + 0 in normal case;
bs. w0 1 ;
rs. w0 b7.+6 ; segm count:= segm count - 1;
am 2 ; operation := output; skip.
c14: al w0 3 ; read: operation:= input;
hs. w0 b7. ;
al. w3 b9. ; name:= user catalog;
c15: rs. w2 a1. ; cat read: w3 = name. save return;
al. w1 b7. ;
jd 1<11+16; send message;
al. w1 b16. ;
jd 1<11+18; wait answer;
rl. w1 b16. ; w1:= status;
sn w0 1 ; if result <> 1 or
sz. w1 (b18.) ; status <> end document at most then
jl. c16. ; goto alarm;
rl. w2 b7.+6 ;
al w2 x2+1 ; segm count:= segm count + 1;
rs. w2 b7.+6 ;
al. w2 g0. ; w2:= first of buffer;
rl. w3 a1. ;
sn w1 0 ; if status = 0 then
jl x3+2 ; return + 2 else
jl x3 ; return;
e. ;
\f
; sl 5.4.72 boss 2, banker, ...9...
b. a20 w. ;
c1: al. w1 g0. ; catalog balancing:
al w2 x1+510 ; set buffer addresses for read/write;
ds. w2 b7.+4 ; use main banker page as buffer.
am c10-c11; initialize pool table: start user cat input;
a1: jl. w3 c11. ; rep: next user rec;
jl. a3. ;+2 if end scan then goto cat scan;
al w0 0 ; w3 = addr of pool record.bs used;
rs w0 x3+4 ; bs used:= 0;
jl. a1. ; goto rep;
a3: al w0 0 ; cat scan: segments:= 0;
rs. w0 b7.+6 ;
a2: al. w3 b8. ; next cat segm:
jl. w2 c15. ; cat read(w3 = catalog);
jl. c2. ;+2 if end document then goto update usercat;
a5: rl w0 x2+0 ; next entry: w0 = first word of entry;
sn w0 -1 ; if unused entry then
jl. a7. ; else
so w0 3 ; if cat key = 3 then
jl. a6. ; begin permanent, sum in bs used.
rl w0 x2+14 ; w0:= size;
sh w0 -1 ; if size >= 0 then
jl. a4. ; begin area entry:
jl. w3 c9. ; w3:= search kit name(w2);
jl. a7. ;+2 if not found then goto next entry;
rl w1 x2+14 ;
al w0 0 ; w1 SLICES:= size/slice length(w3);
am (x3) ;
wd w1 -8 ;
se w0 0 ; round up;
al w1 x1+1 ;
ws w3 92 ; w3:=bsrel
jl. a9. ; end else
a4: bz w3 x2 ; begin no area entry:
al w3 x3-2048 ; w3:= first slice - 2048;
al w1 0 ; w1:= 0 slices;
sh w3 -1 ; if first slice=0 then
c.i27,rl.w3 b19.z. ; w3:=maincat rel
c.-i27,rl.w3 b20.z. ; end
a9: rs. w3 b34. ; bsrel:= w3 or w3 - first drum;
hs. w1 b33.+1 ; increment:= 1, slices;
\f
; sl 5.4.72 boss 2, banker, ...10...
dl. w1 b32. ; search closest pool:
ds. w1 b21.+2 ; closest yet:= large;
al w0 0 ; pool:= undef;
rs. w0 b35. ;
am. (b53.) ;
al. w3 b53. ; w3:= base pool;
a11: al w3 x3+4+i29<1; rep: w3:= next pool;
am. (b30.) ;
sl w3 +1 ; if next pool >= last pool + 1 then
jl. a10. ; goto closest found;
dl w1 x2+4 ;
al w1 x1-1 ; w01:= entry interval - 1 upper;
sl w0 (x3) ;
sl w1 (x3+2) ; if entry in pool interval then
jl. a11. ; begin
dl w1 x3+2 ; w01:= pool interval;
sl. w0 (b21.) ;
sl. w1 (b21.+2); if pool interval in closest yet then
jl. a11. ; begin
al w1 x1+1 ;
ds. w1 b21.+2 ; closest yet:= pool interval + 1 upper;
rs. w3 b35. ; pool:= w3;
jl. a11. ; end end; goto rep;
a10: rl. w3 b35. ; closest found:
sn w3 0 ; if pool undef then
jl. a7. ; never mind;
wa. w3 b34. ; w3:= pool + bs rel;
rl w0 x3+4 ; increase pool.bs rel by
wa. w0 b33. ; 1 entry and slices as computed;
rs w0 x3+4 ; end permanent entry
jl. a7. ; else
a6: al. w3 b10. ; begin temp or login entry.
dl w1 x2+4 ;
jd 1<11+72; set base(entry base);
al w3 x2+6 ; remove entry;
sn w0 0 ;
jd 1<11+48; end;
a7: al w2 x2+34 ; w2:= next entry address;
am. (b51.) ;
se. w2 b51. ; if w2 <> last of buf then
jl. a5. ; goto next entry;
jl. a2. ; goto next cat segm;
e. ;
\f
; sl 5.4.72 boss 2, banker, ...11...
b. a10 w. ;
a5: ; first address of text
<:<10><10>:>
<:overdraft: :>
0, 0, a6=k-2, <: slices, :>
0, 0, a9=k-2, <: entries:>
<:<10><10>:>
a7=k-2 ; last address af text
a8: 5<12, 0, 0 ; message
c2: al w0 1 ; update usercat:
rs. w0 b7.+8 ; output:= true;
am c10-c11; start user cat input;
a1: jl. w3 c11. ; next: next user rec;
jl. c12. ;+2 if end scan then goto end balancing;
a2: bz w1 x3+4 ; rep: w1:= pool record.bs used;
bz w0 x2-2 ; w0:= promised in user cat;
sh w0 x1-1 ; if promised < used then
jl. c20. ; display
ws w0 2 ; w0:= rest claim in usercat
c22: hs w0 x2-4 ; := promised - used;
al w2 x2+1 ; w2:= usercat addr + 1;
al w3 x3+1 ; w3:= pool addr + 1;
sz w3 1 ; if w3 odd then
jl. a2. ; repeat for handling of slices;
bz w1 x3+2 ; w1:= pool record.entries used;
ws. w3 b30. ; w3:= bs rel + 2;;
wa. w0 x3+b36.-2 ; sum rest claims.bs rel:=
rs. w0 x3+b36.-2 ; sum rest claims.bs rel + rest claim in w0;
wa. w1 b19.+2 ; total entries promised:=
rs. w1 b19.+2 ; total entries promised + entries used;
jl. a1. ; goto next;
c12: jl. w2 c13. ; end balancing: write last segm of usercat;
rl. w0 b58. ; if overdraft>0 then
wa. w0 b59. ;
sh w0 0 ; begin
jl. a4. ;
rl. w0 b58. ;
jl. w1 c21. ; convert slices;
ds. w3 a6. ; store in text;
rl. w0 b59. ;
jl. w1 c21. ; convert entries;
ds. w3 a9. ; store in text;
al. w1 a8. ;
al. w2 a5. ;
al. w3 a7. ;
ds w3 x1+4 ; message:=text;
rl. w3 b0. ;
jd 1<11+16; send message;
al. w1 b16. ; wait answer;
jd 1<11+18; end;
a4: am b20-b19; w2:= disc descr; skip;
a3: al. w2 b19. ; rep: w2:= drum descr;
rl w3 x2 ; w3:= bs rel;
rl. w0 x3+b36. ; w0:= sum rest claims;
wa w3 92 ;
rl w3 x3 ; w3:= chain table addr;
rl w3 x3-36 ;
wa w3 66 ; w3:= claim addr in own process;
bz w1 x3+1 ;
ws w1 0 ; w1:= free slices:=
rs w1 x2+6 ; own claim - sum rest claims;
c. i27 ; if drum exists
se. w2 b19. ; and w2 <> drum then
jl. a3. ; goto rep;
z. ;
rl. w1 b19.+2 ; w1:= total entries promised;
sl w1 1 ; if w1 > 0 then
jl. c5. ; goto alarm;
bz w0 x3 ; free entries:= own claim
wa w1 0 ;
rs. w1 b19.+4 ; + total entries promised;
e. ;
\f
; sl 5.4.72 boss 2, banker, ...12...
c8: ; init free and total resources:
al. w3 g9. ; b19, b20 = free resources.
al w0 0 ; w3:= base variable page;
jl. w2 c7. ; init(stations, +0);
rl. w0 b19.+4 ;
jl. w2 c7. ; init(temp entries,+free);
rl. w0 b20.+6 ;
jl. w2 c7. ; init(temp disc slices, + free);
al w0 0 ;
jl. w2 c7. ; init(std readers, + 0);
jl. w2 c7. ; init(remote readers, + 0);
jl. w2 c7. ; init(convert, + 0);
am. (b15.) ;
ac w0 (+430<1) ; free accounts:= - used accounts;
rs w0 x3+d10 ; w0:= total accounts
rl. w0 b57. ; - account accounts - end record + 1
jl. w2 c7. ; init(account, +w0);
am (66) ;
bz w0 +26 ;
jl. w2 c7. ; inti(mess bufs, + boss buf claim);
am (66) ;
bz w0 +27 ;
jl. w2 c7. ; init(area procs, + boss area claim);
am (66) ;
bz w0 +28 ;
jl. w2 c7. ; init(internals, + boss internal claim);
al w0 0 ;
jl. w2 c7. ; init(suspends, + 0);
\f
; sl 26.11.71 boss 2, banker, ...13...
al w0 0 ;
jl. w2 c7. ; init(temp drum entries, + 0);
rl. w0 b19.+6 ;
jl. w2 c7. ; init(temp drum slices, + free);
al w0 0 ;
jl. w2 c7. ; init(devices1, + 0);
jl. w2 c7. ; init(devices2, + 0);
al. w3 g9. ; init psjobs and move to virt:
am j6 ;
al w2 x3+d18 ; w2:= convert job virt;
wa. w3 b22. ; w3:= last of var page;
ld w1 -100 ;
a11: ds w1 x2+2 ; rep:
al w2 x2+4 ;
sh w2 x3+2 ; clear core from w2 to w3;
jl. a11. ;
al. w3 g9. ; init convert and account job:
al w3 x3+d18 ; w3:= convert job abs;
al w0 i115 ;
rs w0 x3+j9 ; gross run left:= option;
dl w1 110 ;
ld w1 -13 ; arrival := now;
rs w1 x3+j10 ;
al w0 -1 ;
ls w0 -1 ; max wait := large;
rs w0 x3+j11 ;
al w0 5 ;
hs w0 x3+j15 ; reserved.all:= all static and conv included;
al w0 d27 ;
hs w0 x3+j5 ; priority chain:= account job;
al w3 x3+f9 ; w3:= account job abs;
al w0 2047 ;
rs w0 x3+j9 ; gross run left:= large;
am. (b15.) ;
rl w0 +430<1 ; accounts:= ext(430);
am 1 ;
hs w0 x3+j13 ;
al w0 2 ;
hs w0 x3+j15 ; reserved.all:= accounts included;
\f
; sl 8.12.71 boss 2, banker, ...14...
a13: al w0 f3 ; set states in no que: w3 = account job.
a14: al w3 x3+f9 ; rep: w3:= next psjob abs;
hs w0 x3+j7 ; state:= in no que;
am. (b22.) ;
sh. w3 g9. ; if w3 <= top variable page then
jl. a14. ; goto rep;
al. w0 g9. ; move to virt:
rl. w1 b22. ; w1:= length banker page;
rl. w2 b6. ; w2:= saved virt of variables;
jl. w3 (b2.) ; move to virt;
jl. (b4.) ; goto end init;
; init: w3 = base free resources, w2 = return, w0 = increment.
; return: w3 increased by 2, w0 saved.
c7: al w1 x3+g21 ; init: save return;
ds. w2 b21.+2 ; stop:= base + 3 * length resource class;
rl w1 x3+d10 ;
wa w1 0 ; w1:= free resources + increment;
al w2 x3 ; w2:= first time class;
a15: rs w1 x2+d10 ; rep:
rs w1 x2+d12 ; free resources:= total resources:= w1;
ws w1 x3+d13 ; w1:= w1 - diff between classes;
se. w3 d26. ; if w3 = base free accounts then
jl. a16. ; begin
rs w0 x2+d12 ; total resources:= increment;
ws w0 x3+d13 ; w0:= increment:= w0 - diff between classes;
a16: ; end;
al w2 x2+f2 ; w2:= next time class;
sh. w2 (b21.) ; if w2 <= stop then
jl. a15. ; goto rep;
al w3 x3+2 ; w3:= next free resource;
sh. w3 g26. ; if w3 > free resources then return;
sl w1 1 ; if w1 >= 1 then
jl. (b21.+2); return;
al. w0 g9. ;
ws w3 0 ; w3:= 2*(resource number+1)
wm. w3 b28. ; * text length/2;
al. w0 x3+b29. ; w0 := text addr;
jl. (b11.) ; init alarm;
; display warning message
; called if the promised claim in the usercatalog is less than
; the used claim according to the cat scan
;
; call:
; w0 = promised claim
; w1 = used claim
; w2 = irrel.
; w3 = if even then claims concern entries
; if odd then claims concern slices
;
; returns to c22:
; w0=0, other registers unchanged
;
b. a30 w.
a7: <:clock:>, 0, 0, 0; clock process
a22: <: entries<0>:>
a23: <: slices:>, 0
c20: rs. w1 a1. ;
ds. w3 a3. ; save registers;
ws w1 0 ;
rs. w1 a5. ; save overdraft;
sz w3 1 ; if entries overbooked then
jl. a8. ; begin
rl. w0 b19.+2 ; entries promised:=
ws w0 2 ; entries promised - overdraft;
rs. w0 b19.+2 ; notice: neg. representation.
wa. w1 b59. ; count entries;
rs. w1 b59. ; text:=<:entries:>;
al. w2 a22. ; end
jl. a16. ; else
a8: wa. w1 b58. ; begin
rs. w1 b58. ; count slices; text:=<:slices:>;
al. w2 a23. ; end;
a16: al. w3 a14. ;
dl w1 x2+2 ; move text;
ds w1 x3+2 ;
dl w1 x2+6 ;
ds w1 x3+6 ;
rl. w0 a5. ;
jl. w1 c21. ; convert overdraft;
ds. w3 a13. ; store in text
rl. w0 b27. ;
jl. w1 c21. ; convert project no;
ds. w3 a11. ; store in text;
rl. w2 b49. ;
al. w3 a15. ;
dl w1 x2-16 ; move kit name
ds w1 x3+2 ; from chain table head
dl w1 x2-12 ; to text
ds w1 x3+6 ;
; make certain that there is at least one event in the que
; and then inspect the event que.
; skip output if there is a message from the main console.
al. w1 a7.+4 ;
al. w3 a7. ; send dummy message
jd 1<11+16; to clock;
rs. w2 a0. ; store buffer address;
rl. w3 b0. ;
jd 1<11+4 ; w3:=process description address
rl w3 0 ; of main console;
al w2 0 ; buffer:=0;
a10: jd 1<11+24; next event: wait event;
sn w3 (x2+6) ; if message from main console
jl. a12. ; then goto after output;
se. w2 (a0.) ; if buffer<>own buffer
jl. a10. ; then goto next event;
al. w1 a6. ;
al. w2 a20. ; set fa, la of text
al. w3 a21. ; in message;
ds w3 x1+4 ;
rl. w3 b0. ;
jd 1<11+16; send message;
al. w1 b16. ;
jd 1<11+18; wait answer;
a12: al. w1 b16. ; after output:
rl. w2 a0. ;
jd 1<11+18; wait answer(dummy message);
al w0 0 ; clear w0 (=rest claim)
rl. w1 a1. ; reestablish other registers;
dl. w3 a3. ;
jl. c22. ; return;
a0: 0 ; own buffer address
a1: 0 ; saved w1
a2: 0 ; saved w2
a3: 0 ; saved w3
a4: 10 ; constant
a5: 0 ; work
a6: 5<12, 0, 0 ; message and work
a20: ; first text address
<:<10>:>
<:project no: :>, 0,0, a11=k-2
<: rest claim: -:>,0,0, a13=k-2
a14:
<: resource:>
<: on :>
a15: 0, r.4 ; kit name
<:<10>:>
a21=k-2 ; last text address
; procedure convert number: jl. w1 c21.
;
; call: return:
; w0 = number 0
; w1 = link undef.
; w2 = irrel. first three digits
; w3 = irrel. last three digits
c21: rs. w1 a5. ; save return;
ld w2 -100 ;
ds. w2 a6.+4 ; clear digit words;
a9: ld w3 -100 ; rep:
wd. w0 a4. ; w3w0:= remainder, quotient;
al w3 x3+48 ; w3:=next digit;
ld w3 x1 ; shift to right place;
aa. w3 a6.+4 ; store in digit words;
ds. w3 a6.+4 ;
al w1 x1+8 ;
se w0 0 ; if quotient <> 0 then
jl. a9. ; goto rep;
jl. (a5.) ; return;
e.
c16: se. w3 b9. ; alarms:
c6: am b17-b24;
c3: am b24-b25;
c4: am b25-b26;
c5: am b26-b37;
c17: am b37-b23;
c19: am b23-b38;
c18: al. w0 b38. ; w0:= alarm text addr;
jl. (b11.) ; init alarm;
\f
; sl 5.4.72 boss 2, banker, ...15...
b28: 11 ; text length/2
b29=k-22 ; base text addr
<:<10>too few stations <10>:>
<:<10>too few temp entries <10>:>
<:<10>too few temp disc slices <10>:>
<:<10>too few standard readers <10>:>
<:<10>too few remote readers <10>:>
<:<10>too few convert operations <10>:>
<:<10>too few account operations <10>:>
<:<10>too few message buffers <10>:>
<:<10>too few area processes <10>:>
<:<10>too few internal processes <10>:>
<:<10>too few suspend operations <10>:>
<:<10>too few temp drum entries <10>:>
<:<10>too few temp drum slices <10>:>
i.e. ; end init block
\f
; sl 23.5.72 boss 2, banker, ...16...
; definition of psjob states:
f1=0 ; skip: jobs not in one of the states below.
f5=1 ; res wanted: job wanting to reserve resources.
f4=2 ; core wanted: after start job operation.
f6=3 ; waiting: account or convert job with claims, etc. set, but
; waiting for resources to become sparse.
f7=4 ; kill: job killed while in skip state.
f3=5 ; in no que: on-line job between runs.
f8=825<6;i.e. 0.8192<16, compare set claims, c.8
g9: ; begin variable page
0,0 ; return from page procedures
;d0: base psjobs, defined later
d1=k-g9, 0<12 + 0 ; idle head, resource head
d2=k-g9, h. f9, 0 w. ; priority head(initially converter), deadly head
d6=k-g9, 0 ;-2 card job ready .number of unprocessed jobs
d3=k-g9, i206<12+i203 ; tape area ready, card area ready
d4=k-g9, 0<12+0 ; tape jobs flexo, iso mode. number of unprocessed jobs.
0 ; host ident (parent rb name table addr) for job requests
c.i119-1, r.i119*2, z.
d5=k-g9, ; top of tape job table
d37=k-g9 ; reader reservation table: first std reader
0<12+0, r.e52; device no, psjob rel of reserver
d40=d37+e55*2
d38=k-g9 ; top std reader, first remote reader
c.e53-1,0,r.e53,z. ; (remote device numbers are set by reserve reader)
d39=k-g9 ; top remote reader
d7=k+4-g9,0,0,0 ; work for reserve station, get psjob answer, allocate res, priority and start.
d8=k-g9, 0 ; work. return from get psjob answer, allocate res,
; swopin, swopout.
d9=k-g9, 0,1 ; to request display: chain,remove line
g55: e13<12+19 ;+4 answer semafore
0 ;+6 virt of line
d28=k-g9, 0 ; unclaimed accounts, for logout accounting
d33=-6 ; rel abs coreplace on set claim operation
d30=k-g9, 0, 0 ; locked in core a, b.
d22=k-g9, 0, 0 ;-4 in core. psjob rel for a-job and b-job.
; 0 indicates no job in that place.
d31=k-g9, 0 ;-2 summa corelock times
d32=k-g9, 0 ; no of corelock jobs
d35=k-g9+2,0,0 ; abs time for latest call of update time used
\f
; sl 23.5.72 boss 2, banker, ...17...
d10=k-g9; free resources: all integers are one too high to facilitate the
; tests in greater. resources available for fast jobs are given first
; (time class 0). resources available for longer jobs are given in
; the remaining time classes. before initialization, the words are
; either free resources(e.g. e26) or -preoccupied(e.g. -e31,0).
d36=g9+d10 ; (used for calculations only)
; dynamic resources:
f10=k-d36, e26+1 ; free stations
f11=k-d36, -e31+1 ; free temp disc entries
f12=k-d36, -e32+1 ; free temp disc slices
f13=k-d36, e55+1 ; free std readers
f14=k-d36, e53+1 ; free remote readers
; static resources:
f20=k-d36, i104+1 ; free convert operations
f21=k-d36, 1 ; free account operations
f22=k-d36, -e33+1 ; free mess bufs
f23=k-d36, -e34+1 ; free area procs
f24=k-d36, 1 ; free internals
f25=k-d36, i35+1 ; free suspends
f26=k-d36, 1 ; free temp drum entries
f27=k-d36, 1 ; free temp drum slices
f28=k-d36, g72: -6 ; free devices 1
f29=k-d36, g73: -5 ; free devices 2
f2=k-d36, 0,r.3*f2/2 ; resources for the remaining 3 time classes
d11=k-g9; potential resources: used in allocate resources with a format
; as free resources. used in core allocation as shown below.
0,0 ;+0 in core aux. format as d22, in core.
0 ;+4 saved core place. used in get virt and buf, swopout.
0,0,0,0 ;+6 message for swopping (operation, buffer, segm).
0 ;+14 saved psjob rel. used in init swop swopin.
0, r.4*f2/2-8; remaining words used only by allocate resources.
; d11+16 : psjob rel of job to release core. used in allocate core
d12=k-g9; total resources: specifies the resources available if all jobs
; were completed (including converter and accounter, excluding
; downer). used in test of claims. format as free resources.
0, r.4*f2/2 ; fill up for 4 time classes.
d13=k-g9; diff between classes: specifies the maximum difference
; between resources in two adjacent time classes. bit word
; resources are independent of time classes.
i106,i107,i108; diff stations, temp entries, temp disc slices.
0,0 ; diff std readers, remote readers
0,0 ; diff convert operations, account operations.
i109,i110 ; diff messbufs, area procs.
i133,0 ; diff internals, suspends.
0,i112 ; diff temp drum entries, temp drum slices.
0,0 ; diff devices1 and 2 (used in init only).
d14=k-g9, 0 ; job timed(psjob rel).
d15=k-g9, 0 ; saved psjob rel. set by central wait.
d16=k-g9, 0 ;+2 saved psjob abs. set by central wait.
;d17, d18: defined later
d20=k-g9, 0 ; deadly embrace. 0 or request line virt.
d21=k-g9, 0 ; jobs in core (number of, 0, 1, or 2).
;d22: on top of this page to facilitate testoutput.
d34=k-g9, g95: 16 ; free core places
d26=g9+f21 ; base free accounts
\f
; sl 16.9.71 boss 2, banker, ...18...
d0=k-g9 ; base psjobs: each psjob-like corutine is described in f9
; bytes(f9=62). the psjob-like corutines are in sequence:
; downer, converter, account job, initially off-line jobs,
; initially on-line jobs. the latter two classes may exchange
; members later as a result of submit commands.
; the bytes, all, below shows whether the static resources
; (i.e. convert operations, ..., devices2) should be included
; in the resource set in question. the format is:
; all = 4*converts included + 2*accounts ops included
; + all other static included.
g8: ; downer:
j5=k-g8, 0<12 + 0 ; priority or idle chain, resource or
; deadly chain. jobs may be in no chain.
j14=k-g8, 0<12 + 0 ;+0 rest claims: all, stations
0<12 + 0 ;+2 temp disc entries, temp disc slices
0<12 + 0 ;+4 std readers, remote readers
j13=k-g8, 0<12 + 0 ;+6 static resources: convert and account ops.
0<12 + 0 ;+8 mess bufs, area procs
0<12 + 0 ;+10 internals, suspends
0<12 + 0 ;+12 temp drum entries, temp drum slices
0 ;+14 devices1 (bit word)
0 ;+16 devices2 (bit word)
j21=k-g8, 0<12 + 0 ;+18 various: core place (first segm, top segm)
j12=k-g8, 0<12 + 0 ;+20 protection(255 - prot reg), priority factor
j9=k-g8, 0 ;+22,-2 gross run left (units of 0.8 sec).
j18=k-g8, 0 ;+24,-2 net run left -
j10=k-g8, 0 ;+26,-2 arrival -
j11=k-g8, 0 ;+28 max waiting -
j17=k-g8, 0,0,0,0 ; job name
j6=k-g8, 0 ;-2 virt of answer or dump name
j7=k-g8, f1<12+ 0 ; state (see page 16), time class<1 + corelock.
j19=k-g8, 0 ;-2 time to time out (units of 0.8 seconds).
j22=k-g8, 0 ; time to wait swopped out (units of 0.8 seconds)
j20=k-g8, 0 ; expected finishing time (units of 0.8 sec).
j15=k-g8, 0<12 + 0 ;+0 reserved resources: all, stations
0<12 + 0 ;+2 temp disc entries, temp disc slices
0<12 + 0 ;+4 std readers, remote readers
j16=k-g8, 0<12 + 0 ;+0 wanted resources: all, stations
0<12 + 0 ;+2 temp disc entries, temp disc slices
0<12 + 0 ;+4 std readers, remote readers
f9=k-g8 ; length psjob descr
d18=d0+f9 ; convert job: gross run left,
; priority chain, reserved are initialized.
0, r.j17>1, <:convert:>,0 ; dummy name.
d17=d18+f9 ; account job: reserved is initialized.
d27=2*f9 ; other psjobs follow here: they are initialized when
; the code pages have been moved to virt.
d24=d17+f9*i45 ; length banker variables
d25=d17+j17 ; rel of account name
d29=d17+j13+1 ; rel of account accounts
g21=3*f2 ; for init resources
g26=g9+f28 ; - - - , base free devices
\f
; re 76.06.16 boss 2, banker ...18a...
; j.code to move reader device numbers into banker variable page
a1=g9 + d37 ; banker.first reader
a3: ld w2 -100 ;
a4: am. (a5.) ;
a2: bl. w0 x2 ;
hs. w0 x1+a1. ;
al w2 x2+1 ;
al w1 x1+2 ;
se w2 e52 ;
jl. a4. ;
al w0 0 ; normal exit to slang:
al w2 0 ;
jl x3 ;
a5: e51 -a0-4 +10000 - a2; options.first std reader
jl. a3. ; execute
j.
\f
; sl 16.9.71 boss 2, banker, ...19...
; main banker page: contains the central waiting point and all
; actions concerned with chaining of psjobs.
b. a60, b70, c60 w. ; begin main banker page
g0: g20=g0+510 ; first and last of init buffer
g105=g20+2 ; top of buffer
g16=g20-i29<1 ; base pool table
b0: 0, r.5 ; page addresses
90<12 + 0 ; page ident: main banker
b1: g48: e13<12 + 19 ; banker que. chained semafore
b2: g49: 5 ; lock chain
b3: f9 ; job description length
b4: g50: 26 ; current corutine
b6: e13 ; semafore length
b7: g52: 76 ; base psjob answ. base address of semafores.
b8: g53: 4 ; open
b9: g54: 7 ; get pages
b10: 0 ; work. stop loop, host ident etc.
b14: 2047<12+4095 ; all fit core place
b15: 105 458 ; 24 hours in 0.8 seconds
b17=k+2, 0, 0 ; work. answer idle
b12: 0 ;-2: virt resource allocation page
b19: g19 ; rel allocate
g82=b12-2000
b20: g84 ; rel compute priority chain
b23: g57: 6 ; open chain
b26: 0 ; virtual of core allocation page
g13=b26-2000
b27: g60: 25 ; call
b28: g61: 21 ; coruno output
b29: 1<12 ; release convert, release all
b30:0, b31:0, b32:0, b33:0, b34:0, b35:0 ; working, leaf level procs.
\f
; sl 10.9.71 boss 2, banker, ...20...
g85=k-b0 ; return to wait from resource allocate page
al w2 x3+d37-2 ; w2:=base of reader reservation table;
a2: al w2 x2+2 ; rep: w2:=next reader entry;
sl w2 x3+d39 ; if w2=top reader entry then
jl. c0. ; goto wait;
bl w1 x2+1 ; if psjob is waiting for answer from
sl w1 0 ; reader reservation table then
jl. a2. ; begin
ac w1 x1 ; clear waiting for answer flag;
hs w1 x2+1 ;
ws w2 6 ; save rel reader entry;
rs w2 x3+d7-4 ;
jl. w2 c36. ; get psjob answer addr;
dl w1 x2+6 ; w0:=op.remote dev no; w1:=op.host ident;
wa w3 x3+d7-4 ; w3:=abs reader entry;
se w0 0 ; if host ident <> 0 then
hs w1 x3 ; entry.dev no:= op.dev no;
bl w1 x3+1 ; w1:=psjob rel;
jl. w3 c30. ; answer psjob;
al w2 x3 ;
wa w2 x3+d7-4 ; w2:=abs reader entry;
jl. a2. ; goto rep;
; end;
c0: rl. w1 (b4.) ; wait: w1:= current corutine;
bz w0 x1+4 ;
sz w0 4 ; if test bit 4 = 1 then
jl. w3 c50. ; testoutput free res;
c.+1
rl. w3 b0.+2 ; test fidifut:
rl w0 x3+d10+f10; test fidifut:
sl w0 e26+2 ; if free stations > max then
c.-1, o95, z. ; (bossfault xref)
jd -95 ; alarm;
z.
rl. w2 b1. ;
jl. w3 (b2.) ; lock chain(banker que); w1:= operation addr;
g15=k-b0 ; entry banker:
bz w2 x1+2 ;
bz. w2 x2+j1. ; w2:= action table(operation code);
bz w1 x1+3 ; w1:= if even action then
sz w2 1 ; operation.3 else
wm. w1 b3. ; psjob number * job descr length;
al. w0 x2+b0. ; w0:= abs action address;
am x3+d0 ; w1 = psjob rel or operation.3.
al w2 x1 ; w2:= psjob abs:= w1 + base psjobs;
ds w2 x3+d16 ; save psjob rel and psjob abs;
jl (0) ; switch to action;
c1: jl. w3 c46. ; reserve: test kill; w0:= state reserve;
jl. w3 c35. ; store virtual and state;
rl. w1 b0.+4 ; w1:= operation abs;
al w0 x1+3 ; check and adjust wanted resources:
rs. w0 b10. ; stop loop:= four times;
; adjusted bytes: all, stations, temp disc entries, temp disc slices
a1: bz w0 x1+4 ; rep: w0:= wanted in operation;
bz w3 x2+j14 ; w3:= rest claim;
sl w0 x3 ; if wanted >= rest claim then
al w0 x3 ; wanted in operation:= rest claim;
hs w0 x1+4 ;
hs w0 x2+j16 ; wanted:= wanted in operation;
al w2 x2+1 ; next in psjob descr;
al w1 x1+1 ; next in operation;
sh. w1 (b10.) ; if operation addr <= stop then
jl. a1. ; goto rep;
al w0 0 ;
rs w0 x2+j16 ; wanted.reader:= 0;
rl. w3 b0.+2 ; w3:= page 1 abs;
jl. w1 c48. ; allocate;
jl. c0. ; goto wait;
c2: am g27 ; release:
c4: am g28 ; release reader:
c7: am g29 ; release station:
c8: al w3 g51 ; set claims:
rl. w2 b12. ;
jl. w1 (b27.) ; call action;
jl. c0. ; goto wait;
\f
; sl 23.5.72 boss 2, banker, ...21...
c3: jl. w3 c46. ; reserve reader: test kill; w0:= state reserve;
jl. w3 c35. ; store virtual and state;
ld w1 -100 ;
ds w1 x2+j16+2 ; wanted:= 0;
al w2 x3+d38 ; w2:=ref top std reader
rl. w1 b0.+4 ;
dl w1 x1+6 ; if not remote reader then
se w0 0 ;
jl. a4. ;
al w2 x3+d37-2 ; search device no
a3: al w2 x2+2 ; in reader table
sl w2 x3+d38 ; if not found then
jd -99 ; boss fault 99
bl w0 x2 ;
se w0 x1 ;
jl. a3. ;
sh w2 x3+d40-1 ;
jl. a4. ; if exclusive device
ac w1 (x3+d15) ; then
hs w1 x2+1 ; entry.reserver:=psjob rel
am 0-1 ;
a4: al w0 1 ; reader claim:=if std then
sh w2 x3+d38-1 ; if exclusive device then
ls w0 12 ; 0 (= reader)
am (x3+d16) ; else
rs w0 +j16+4 ; 1<12 (=std reader)
; else
se w0 0 ; 1 (= remote reader)
jl. a5. ; if special reader device then
al w0 f1 ;
am (x3+d16) ;
hs w0 +j7 ; state:=skip
jl. b0.+g85; goto wait;
a5: jl. w1 c48. ; else allocate
jl. b0.+g85; goto wait
c5: jl. w3 c30. ; release job tape: answer psjob(w1);
bz w0 x3+d3 ;
ba. w0 1 ;
hs w0 x3+d3 ; tape area ready:=tape area ready + 1;
jl. c31. ; goto allocate idle;
c6: dl w1 x2+j7 ; reserve station:
ds w1 x3+d7-2 ; save psjob state and virt;
jl. w3 c46. ; test kill; w0:= state reserve;
jl. w3 c35. ; store virtual and state;
rl. w1 b0.+4 ; check and adjust wanted: w1:= operation addr;
bz w0 x2+j14+1 ; w0:= rest claims.station;
sl w0 (x1+4) ; if rest claims >= wanted in operation
bz w0 x1+5 ; then w0:= wanted in operation;
hs w0 x1+5 ; wanted in operation:=
rs w0 x2+j16+1 ; wanted.stations:= w0;
ld w1 -100 ;
ds w1 x2+j16+4 ; clear other wanted;
jl. w1 c48. ; allocate and test new state: allocate;
al w2 x3+d0 ; w2:= psjob abs:= base + saved psjob rel;
wa w2 x3+d15 ; note that allocate may wait.
dl w1 x3+d7-2 ;
rx w0 x2+j6 ; w01:= state and virt after allocate;
bz w3 x2+j7 ; state and virt:= value before allocate;
rx w1 x2+j7 ;
sn w3 f1 ; if state after allocate = skip then goto wait;
jl. c0. ; present state and virt correspond to core wanted.
rs w1 x2+j7 ; stop job: state:= state after allocate, i.e. res wanted;
am. (b0.+2) ;
rs w0 +d7-2 ; save virt after allocate, i.e. psjob answer addr;
rl. w2 b26. ;
al w3 g5 ; call allocate core;
jl. w1 (b27.) ;
rl w0 x3+d7-2 ;
am (x3+d15) ; virt of answer:= saved virt after allocate;
rs w0 x3+d0+j6 ;
jl. c0. ; goto wait;
\f
; sl 10.9.71 boss 2, banker, ...22...
c9: al w0 f1 ; psjob idle:
jl. w3 c35. ; store virtual and state(skip);
ld w1 -100 ;
ds w1 x2+j17+2 ; clear job name;
ds w1 x2+j17+6 ;
al w2 x3+d1 ;
rl w1 x3+d15 ; w1 := psjob rel;
jl. w3 c38. ; insert(w1, idle head);
jl. c32. ; goto allocate, idle ensured;
c10: bz w1 x3+d1 ; get psjob:
al w0 0 ;
wd. w1 b3. ; w1:= idle head // job descr length;
am. (b0.+4) ;
hs w1 +3 ; operation.3:= w1; 0 or psjob number.
jl. w3 c34. ; answer sender;
bz w1 x3+d1 ;
sn w1 0 ; if idle head = 0 then
jl. c0. ; goto wait;
al w0 4 ; w0:= on-line job;
jl. c33. ; goto answer idle;
\f
; sm 75.06.10 boss 2, banker, ...22a...
b. a10 w.
c11: ; tape jobs ready:
c12: ; regret tape jobs:
rl. w2 b0.+4 ; w2:=ref operation;
al w0 0 ;
rs. w0 b10. ; first scan:=true;
a4: ; start scan:
am x3+d4 ;
al w1 x1+0 ; w1:=ref std flexo/iso tape job;
a0: rl w0 x1+2 ; rep: if table.host ident=op.host ident then
se w0 (x2+8) ;
jl. a2. ;
; begin
rl w0 x2+6 ; w0:=op.no of tape jobs
ba w0 x1 ; +table.no of tape jobs;
sl w0 100 ; if w0>=100 then
al w0 100 ; w0:=100;
sh w0 -1 ; if w0<0 then
al w0 0 ; w0:=0;
hs w0 x1 ; table.no of tape jobs:=w0;
rl w0 x1 ; if neither iso - nor flexo
sn w0 0 ; jobs left then
rs w0 x1+2 ; clear table.host ident;
bl w0 x1 ; result:=no of jobs left;
a1: rs w0 x2+6 ; answer: save result in answer;
jl. w3 c34. ; answer sender;
am. (b0.+4); w1:=op.code;
bl w1 +2 ; if code=regret or
se w1 12 ; no room in table then
sn w0 -1 ;
jl. c0. ; goto wait
jl. c31. ; else goto allocate idle;
; end;
a2: sl w1 x3+d4+2 ; if first entry or
se w0 0 ; entry occupied then
jl. a3. ; goto next entry;
rl. w0 b10. ; if first scan then
sn w0 0 ;
jl. a3. ; goto next entry;
rl w0 x2+8 ; table.host ident:=
rs w0 x1+2 ; op.host ident;
jl. a0. ; goto rep;
a3: al w1 x1+4 ; next entry:
sh w1 x3+d5-1 ; w1:=ref next entry
jl. a0. ; if w1< top tape table then goto rep;
al w0 -1 ; result:=-1;
bz w1 x2+2 ; if code<>regret then
se w1 11 ; first scan:=true;
rx. w0 b10. ; if code<>regret and
se w0 -1 ; end of first scan then
jl. a4. ; goto start scan;
jl. a1. ; goto answer;
c13: jl. w3 c34. ; cards ready: answer sender;
al w0 1 ;
wa w0 x3+d6 ;
rs w0 x3+d6 ; cards ready:= cards ready + 1;
jl. c31. ; goto allocate idle;
e.
\f
; sl 10.9.71 boss 2, banker, ...23...
b. a10 w. ;
c31: bz w0 x3+d1 ; allocate idle: w3 = page 1 abs;
sn w0 0 ; if idle head = 0 then
jl. c0. ; goto wait;
c32: dl w1 x3+d3 ; allocate idle ensured: w0:= cards ready;
sz w1 2047 ; w1:= tape area ready, card area ready;
sh w0 0 ; if card area ready
jl. a1. ; and cards ready > 0 then
bs. w0 1 ; begin
al w1 x1-1 ; decrease(cards ready);
ds w1 x3+d3 ; decrease(card areas ready);
al w0 12 ; w0:= card job; goto answer idle;
jl. c33. ; end;
a1: sh w1 2047 ; if tape area ready = 0 then
jl. c0. ; goto wait;
al w2 x3+d4 ; w2:=ref std tape jobs;
a4: bl w1 x2+1 ; rep: w1:=no of tape jobs iso;
sh w1 0 ; if tape jobs iso>0 then
jl. a2. ; begin
al w1 x1-1 ; decrease tape jobs iso;
hs w1 x2+1 ;
al w0 13 ; w0:=tape job iso mode;
jl. a3. ; end else
a2: bl w1 x2 ; begin
sh w1 0 ; w1:=no of tape jobs trf;
jl. a5. ; if no of tape jobs trf >0 then
al w1 x1-1 ; begin
hs w1 x2 ; decrease tape jobs trf;
al w0 14 ; w0:=tape job flexo mode;
jl. a3. ; end;
a5: al w2 x2+4 ; w2:=ref next device host in tape table;
sl w2 x3+d5 ; if w2>=top tape table then
jl. c0. ; goto wait
jl. a4. ; else goto rep;
; end;
a3: rl w1 x2+2 ; save host ident
rs. w1 b10. ; for operation
rl w1 x2 ; if no more tape jobs
sn w1 0 ; from this device host
rs w1 x2+2 ; then clear the host ident;
bz w1 x3+d3 ;
al w1 x1-1 ;
hs w1 x3+d3 ; tape area ready:=tape area ready -1;
\f
; sm 75.06.10 boss 2, banker, ...23a...
rl. w2 b10. ; reader claim:= if host ident = std then
al w1 1 ; 1 std reader (1<12) else
sn w2 0 ; 1 remote reader (1<0);
ls w1 12 ;
am x1 ;
c33: al w1 0 ; answer idle: w0=job type; reader claim:=0;
ds. w1 b17. ; save job type, reader claim;
al w2 x3+d1 ;
jl. w3 c39. ; w1:= psjob rel:= remove(idle head);
al w2 x3+d2 ;
jl. w3 c38. ; w2:= psjob abs:= insert(priority head);
rl. w0 b17. ; adjust claims:
rs. w1 b17. ; save psjobrel;
rs w0 x2+j14+4 ; store reader claim;
al w0 i32 ;
rs w0 x2+j18 ; net run:=
rs w0 x2+j9 ; gross run:= time of one load;
dl w1 110 ;
ld w1 11 ; arrival := now;
al w1 -1 ;
ls w1 -1 ; max wait := large;
ds w1 x2+j11 ;
rl. w1 b15. ; time to wait:=24 hours;
rs w1 x2+j22 ;
ld w1 -100 ;
ds w1 x2+j14+2 ; clear rest claims. all, stations, temp disc;
ds w1 x2+j14+10 ; clear mess, area, internals, suspends;
ds w1 x2+j14+14 ; clear drum, devices 1, devices 2;
rs w1 x2+j14+16 ;
hs w0 x2+j7+1 ; time class:= 0;
hs w0 x2+j12 ; protection := all fit (0);
al w0 800 ; priority:= 800; job of 30 seconds.
hs w0 x2+j12+1 ;
rl. w1 b14. ; core place:= all fit;
rs w1 x2+j21 ;
dl. w1 b17. ; w0:= job type; w1:= psjob rel;
sh w0 11 ; if internal job then
jl. c0. ; goto wait;
\f
; sl 20.4.72 boss 2, banker, ...24...
jl. w2 c36. ; get psjob answer addr;
rs w0 x2+2 ; operation.2:= job type;
rl. w1 b10. ; move saved host ident
rs w1 x2+6 ; to operation;
al w1 x2 ; w1:=operation;
rl w2 x2+4 ; w2:=psjob que;
jl. w3 (b23.) ; openchain;
jl. c0. ; goto wait;
e. ;
c14: jl. w3 c34. ; kill: answer sender;
jl. w3 c51. ; release reader process (if reserved)
rl w2 x3+d16 ; w2:= psjob abs;
bz w0 x2+j7 ;
sl w0 3 ; if state = waiting, kill, or in no que then
jl. c0. ; goto wait;
rl w0 x2+j17 ;
sn w0 0 ; if job name = 0 then
jl. c0. ; goto wait;
al w0 -1 ; priority:= 4095; assures that job is swopped
hs w0 x2+j12+1 ; in as fast as possible.
jl. w1 c40. ; compute priority chain;
al w2 x3+d0 ;
wa w2 x3+d15 ; w2:=psjob abs;
bz w0 x2+j7 ;
se w0 f4 ; if state = core wanted then
jl. a14. ; begin
rl. w2 b26. ; kill job wanting core:
al w3 g5 ; call allocate core;
jl. w1 (b27.) ; goto wait;
jl. c0. ; end;
a14: al w1 f7 ;
hs w1 x2+j7 ; state:= kill;
sn w0 f1 ; if state was skip then
jl. c0. ; goto wait;
rl w1 x3+d15 ; kill job wanting resources: w1:= psjob rel;
jl. w2 c36. ; get psjob answer addr;
al w0 0 ;
hs w0 x2+2 ; operation.2:= 0; kill indication.
jl. w3 c30. ; answer psjob(w1);
jl. c0. ; goto wait;
\f
; kll 29.12.72 boss 2, banker, ...24a...
c28: rl w0 x2+j18 ; priority and start:
rs w0 x3+d7 ; work:= net run left;
rl. w3 b0.+4 ;
dl w1 x3+10 ; net run left:= op.time;
ds w1 x2+j10 ; arrival:= op.arrival;
al w0 f4 ;
hs w0 x2+j7 ; state:= core wanted;
dl w1 x3+6 ;
rs w0 x2+j6 ; virt of dump:= op.4;
hs w1 x2+j12+1 ; priority:= op.priority;
al w3 g86 ;
rl. w2 b26. ; call priority;
se w1 0 ; (unless priorityfactor=0)
jl. w1 (b27.) ;
jl. w1 c40. ; compute priority chain;
rl w0 x3+d7 ;
wa w3 x3+d15 ; net run left:= work;
rs w0 x3+d0+j18 ;
al w3 g5 ; prep call allocate core;
jl. a15. ; goto common call;
c15: al w3 g6 ; set timer: prep call set timer;
a15: rl. w2 b26. ; common call:
jl. w1 (b27.) ; call procedure on core allocation page;
a16: rl w1 x3+d15 ; after stop: w1:= psjob rel;
jl. w3 c30. ; answer psjob;
jl. c0. ;
b. a0 w. ;
c16: am. (b0.+4) ; start job:
rl w0 +4 ; virtual of dump:= operation.4;
rs w0 x2+j6 ;
jl. a0. ; goto prep;
c17: al w0 0 ; stop job:
sn w1 (x3+d30+2) ; if locked in core = psjob rel then
rs w0 x3+d30+2 ; locked in core := 0;
am f1-f4 ; state:= skip; skip line;
a0: al w0 f4 ; prep: state:= core wanted;
hs w0 x2+j7 ;
a17: al w3 g5 ; call allocate core: prep call of allocate core;
jl. a15. ; goto common call;
e. ;
\f
; sl 10.9.71 boss 2, banker, ...25...
c18: jl. w3 c34. ; start account: answer(sender);
al w1 2*f9 ; w1:= account job rel;
c29: am x3+d0 ; activate:
al w2 x1 ; w2:= psjob abs;
bz w0 x2+j7 ; if state = waiting then
se w0 f6 ; begin
jl. c0. ;
al w3 f1 ; state:= skip;
hs w3 x2+j7 ; answer psjob(w1);
jl. w3 c30. ; end;
jl. c0. ; goto wait;
c19: al w0 0 ; unclaim reader:
rs w0 x2+j14+4 ; reader claim:= 0;
c52: al w0 0 ; unclaim std reader:
hs w0 x2+j14+4 ; std reader claim := 0
jl. w3 c30. ; answer psjob;
jl. w1 c48. ; call allocate
jl. b0.+g85; goto return from resource allocation page
c20: al w0 f6 ; wait for activate:
jl. w3 c35. ; store virtual and state(waiting);
jl. c0. ; goto wait;
c21: am. (b0.+4) ; unclaim convert:
rl w1 +4 ; w1:= operation.4;
se w1 0 ; if slices = 0 then 0 else;
wa. w1 b29. ; w1:= 1 entry, slices;
rl w0 x3+d18+j15+2;
wa w0 2 ; increase converter.reserved temp disc;
rs w0 x3+d18+j15+2;
rl w0 x2+j15+2 ;
ws w0 2 ; decrease psjob.reserved temp disc;
rs w0 x2+j15+2 ;
rl w0 x3+d18+j13 ;
wa. w0 b29. ; increase converter.converts by 1;
rs w0 x3+d18+j13 ;
rl w0 x2+j13 ;
ws. w0 b29. ; decrease psjob.converts by 1;
rs w0 x2+j13 ;
rl w1 x3+d15 ; w1:= saved psjob rel;
jl. w3 c30. ; answer psjob;
jl. c0. ; goto wait;
\f
; sm 75.06.10 boss 2, banker, ...25a...
; release reader process
;
; if a reader process is reserved for this job then release it
; to make shure, that spooling terminates within a finite amount of time
;
; call return
; w0 irrelevant unchanged
; w1 irrelevant unchanged
; w2 irrelevant unchanged
; w3 return abs ref page 1
;
b. a10 w.
a0: 0 ; saved w0
a1: 0 ; saved w1
a2: 0 ; saved w2
a3: 0 ; saved w3
a4: 0 ; 0 for set cat base
c51: ds. w1 a1. ; save w0,w1
ds. w3 a3. ; save w2,w3
rl. w3 b0.+2 ; w3:=abs ref page 1
al w2 x3+d38 ; w2:=top special reader table
rl w1 x3+d15 ; w1:=psjob rel
a5: al w2 x2-2 ; w2:=next reader
sh w2 x3+d40-2 ; if base of special readers then
jl. a6. ; no reader processes to release
bz w0 x2+1 ;
se w0 x1 ; if reserver<>psjob rel then
jl. a5. ; repeat
bz w2 x2 ; w2:=device no
ls w2 1
wa w2 74 ;
rl w2 x2 ; w2:=process descr address
al. w3 a4. ; w3:=abs ref 0
am (66) ;
dl w1 +74 ; w0,w1:=boss max base
jd 1<11+72; set cat base
al. w3 b30. ;
dl w1 x2+4 ; move process name
ds w1 x3+2 ;
dl w1 x2+8 ;
ds w1 x3+6 ;
jd 1<11+10; release process
rl. w3 b0.+2 ; w3:=abs page 1
a6: dl. w1 a1. ;
rl. w2 a2. ; reestablish registers
jl. (a3.) ; return
e.
c22: am. (b0.+4) ; update run left:
dl w0 +6 ; gross run left:= gross run left
aa w0 x2+j18 ; + operation.4;
ds w0 x2+j18 ; net run left:= net run left
dl w0 110 ;
ld w0 -13 ; arrival := now;
rs w0 x2+j10 ;
jl. w1 c40. ; call compute priority chain;
al w3 g5 ; prep call allocate core;
jl. a15. ; goto common call;
c23: jl. w3 c30. ; release card area: answer psjob(w1);
bz w0 x3+d3+1 ;
ba. w0 1 ;
hs w0 x3+d3+1 ; card area ready:= card area ready+1;
jl. c31. ; goto allocate idle;
c24: ; start convert: not implemented
c.-1, o92, z. ; (bossfault xref)
jd -92 ; bossfault 92
\f
; sl 16.9.71 boss 2, banker, ...26...
b. a5 w. ;
c25: al w0 x1 ; lock job in core:
jl. w2 a0. ; set lock state(locked);
jl. w3 c30. ; answer psjob;
jl. c0. ; goto wait;
c26: al w0 0 ; open job in core:
jl. w2 a0. ; set lock state(open);
jl. a17. ; goto call allocate core;
; entry: w0 = new state, w1 = psjobrel, w2 = return, w3 = page 1.
a0: se w1 (x3+d22+2) ; set lock state(new state):
jl. a1. ; if rel psjob = in core b then
rs w0 x3+d30+2 ; begin locked b:= rel psjob;
am 1 ; answer:= ok;
a1: al w0 -1 ; end else answer:= not ok;
am. (b0.+4) ;
hs w0 +2 ;
jl x2 ; goto return;
e. ;
c27: jl. w3 c51. ; release reader process (if reserved)
al w0 f1 ; stop and clear name:
hs w0 x2+j7 ; state:= skip;
al w0 0 ; if locked in core = psjob rel then
sn w1 (x3+d30+2) ; locked in core:= 0;
rs w0 x3+d30+2 ;
al w3 g99 ;
rl. w2 b26. ; call release and allocate core;
jl. w1 (b27.) ;
al w2 x3+d0 ;
wa w2 x3+d15 ; w2:= psjob abs;
ld w1 -100 ;
ds w1 x2+j17+2 ; clear job name;
ds w1 x2+j17+6 ;
jl. a16. ; goto after stop;
c37: jl. w3 c51. ; releasse reader process (if reserved)
al w0 f1 ; stop and release core:
hs w0 x2+j7 ; state := skip;
al w0 0 ; priority:=0;
hs w0 x2+j12+1 ; if locked in core = psjob rel then
sn w1 (x3+d30+2) ; locked in core := 0;
rs w0 x3+d30+2 ;
al w3 g99 ; prep call release and allocate core;
jl. a15. ; goto common call;
; action table: odd addresses correspond to operations with a psjob number.
j1=k-1, a0=b0-1
h. c1-a0, c2-a0, c3-a0, c4-b0, c5-a0, c6-a0, c7-a0, c8-a0, c9-a0
c10-b0, c11-b0, c12-b0, c13-b0, c14-a0, c15-a0, c16-a0, c17-a0, c18-a0
c19-a0, c20-a0, c21-a0, c22-a0, c23-a0, c24-a0, c25-a0, c26-a0, c27-a0
c28-a0, c37-a0, c15-a0, c52-a0
w.
\f
; sl 10.9.71 boss 2, banker, ...27...
; answer psjob: w1 = psjob rel, w3 = return. return: w3 = page 1 abs.
c30: rs. w3 b30. ; answer psjob: w1 = psjob rel. save return;
rs. w1 b31. ; save psjob rel for testoutput;
al w0 0 ;
wd. w1 b3. ; w1:= psjob rel // job descr length
wm. w1 b6. ; * semaphore length
wa. w1 b7. ; + first psjob answer sem;
al w2 x1 ;
jl. w3 (b8.) ; open(psjob answer sem); w3:= page 1 abs;
rl. w1 (b4.) ; w1:= current corutine;
bz w0 x1+4 ;
sz w0 2 ; if test bit 2 = 1 then
jl. c49. ; goto testoutput;
jl. (b30.) ; return;
; answer sender: page 2 = operation, w3 = return. return: w3 = page 1 abs.
c34: am. (b0.+4) ; answer sender:
rl w2 +4 ; w2:= operation.4;
jl. (b8.) ; open(answer); return to w3;
; store virtual and state: page 2 = operation, w0 = state, w2 = psjob abs,
; w3 = return. return: w12 unchanged, w3 = page 1 abs.
c35: rs. w3 b30. ; store virtual and state: save return:
hs w0 x2+j7 ; state:= w0;
rl. w3 (b4.) ;
rl w0 x3+10 ; virt of answer:= page 2 descr;
rs w0 x2+j6 ;
rl. w3 b0.+2 ; w3:= page 1 abs;
jl. (b30.) ; return;
; get psjob answer addr: getpages, w1 = psjob rel, w2 = return, w3 = page 1 abs.
; return: w01 unchanged, w2 = page 2 abs = answer page, w3 = page 1 abs.
c36: ds w1 x3+d7 ; get psjob answer addr:
ws. w2 b0. ; save w01;
rs w2 x3+d8 ; save rel return;
am x3+d0 ;
rl w2 x1+j6 ; w2:= page 2 descr:= psjob.virtual of answer;
rl. w3 (b4.) ;
rs w2 x3+10 ;
jl. w3 (b9.) ; get pages;
rl. w2 b0.+4 ; w2:= page 2 abs;
dl w1 x3+d7 ; reestablish w01;
am (x3+d8) ;
jl. b0. ; return;
\f
; sl 10.9.71 boss 2, banker, ...28...
; insert: w1 = psjob rel, w2 = head addr, w3 = return.
; return: w1 unchanged, w2 = psjob abs, w3 = page 1 abs.
c38: rs. w3 b30. ; insert: save return;
rl. w3 b0.+2 ; w3:= page 1 abs;
bz w0 x2 ; w0:= head;
hs w1 x2 ; head:= psjob rel;
am x3+d0 ;
al w2 x1 ; w2:= psjob abs;
hs w0 x2 ; chain(w2):= old head;
jl. (b30.) ; return;
; remove: w2 = abs of preceding element, w3 = return.
; return: w1 = removed psjob rel, w2 unchanged, w3 = page 1 abs.
c39: rs. w3 b30. ; remove: save return;
rl. w3 b0.+2 ; w3:= page 1 abs;
bz w1 x2 ; w1:= chain(preceding element);
am x3+d0 ;
bz w0 x1 ; w0:= chain(element);
hs w0 x2 ; chain(preceding element):= w0;
jl. (b30.) ; return;
c40: am b20-b19; call compute priority chain:
c48: rl. w3 b19. ; call allocate:
rl. w2 b12. ; virtual of resource allocation page;
jl. (b27.) ; call and return to w1;
; test kill: w1 = psjob rel, w2 = psjob abs, w3 = return. return:
; w0 = state res wanted, w12 unchanged. jumps to wait in kill state.
c46: rs. w3 b30. ; test kill: save return;
al w0 f5 ; w0:= state res wanted;
bz w3 x2+j7 ;
se w3 f7 ; if state <> kill then
jl. (b30.) ; return;
al w0 0 ;
am. (b0.+4) ;
hs w0 +2 ; operation.2:= 0; signals killed.
jl. w3 c30. ; answer psjob(w1);
jl. c0. ; goto wait;
\f
; sl 23.5.72 boss 2, banker, ...29...
; testoutput: return in b30, psjob rel in b31, w3 = page 1 abs.
b. a10 w.
c49: al w1 x3+d0 ; testoutput:
wa. w1 b31. ; w1:= save:= psjob abs;
rs. w1 b31. ;
al w0 20<6+10; w0:= 20 bytes, kind 10;
jl. w3 (b28.) ; coruno output(rest claims);
rl. w1 b31. ;
al w1 x1+j15 ;
al w0 12<6+10; w0:= 12 bytes, kind 10;
jl. w3 (b28.) ; coruno output(reserved and wanted);
rl. w1 b31. ;
al w1 x1+j21 ;
al w0 16<6+10; w0:= 16 bytes, kind 10;
jl. w3 (b28.) ; coruno output(coreplace to jobname 2);
rl. w1 b31. ;
al w1 x1+j17+4 ;
al w0 14<6+10; w0:= 14 bytes, kind 10;
jl. w3 (b28.) ; coruno output(jobname 3 to expected finish);
jl. (b30.) ; return;
; testoutput free res: called from central wait. w3 = return.
c50: rs. w3 b30. ; testoutput free res: save return;
rl. w3 b0.+2 ;
al w1 x3+d22 ; w1:=in core abs;
al w0 4<6+11 ; w0:= 4 bytes, kind 11;
jl. w3 (b28.) ; coruno output(in core);
al w2 x3+d10 ; w2:= free resources, class 0;
a1: al w1 x2 ; rep: w1:= resource addr;
al w0 f2<6+11; w0:= f2 bytes, kind 11;
jl. w3 (b28.) ; coruno output(free res);
al w2 x2+f2 ; w2:= next resource class;
sh w2 x3+d11-1 ; if w2<pot resources then
jl. a1. ; goto rep;
jl. (b30.) ; return;
e. ;
g1=k-g0 ; end main banker page
i.e.
\f
; sl 10.9.71 boss 2, banker, ...30...
; core allocation page: contains various page procedures called from
; the main banker page (set claims1, allocate core, set timer).
; contains further the timer corutine.
b. b50, c20 w. ; begin core allocation page
g2=k-1900 ;
b0: 0, r.5 ; page addresses
91<12 + 0 ; page ident: core allocation
b1: 0 ; check core: first core place, top core place occupied
b2: 0 ;+2 check protection: protection keys occupied
b3: 0<12 + 0 ; fitcount, saved keys
b4: g32=k+1 ;
g10=k-g2,7<12+16 ; number of free keys, number of core places
b5: g11=k-g2,127 ; total key pattern (free keys of boss)
b6: g33: 17 ; first core place (abs address)
g22=k-g2 ;
b7: g34: e12<13 + 18 ; timer corutine. reserve for banker too
b8: g12=k-g2,0 ; boss start. first of process.
b9: 0, 86400 ; timer message. initially wait 24 hours.
b10: 0 ; work. stop loop, etc.
g23=k-g2 ;
b11: g35: e13<12 + 19 ; timer manipulation. binary semafore
b12: g36: 3 ; lock
b13: <:clock:>,0,0,0 ; clock process
b14: g37: 4 ; open
b15: g38: 8 ; page jump
b16: g39: 1 ; send and wait
b17: 105 458 ; 24 hours in 0.8 seconds
b18: g40: 7 ; get pages
g24=k-g2 ;
b19: g41: 63 ; base psjob que. base address of semafores.
b20: g42: 6 ; open chain
b21: f9 ; job description length
b22: e13 ; semafore length
b23: 0 ; saved return from leaf level procs
b24: 0 ; for set base
g25=k-g2 ;
b25: g43: 64 ; base job in core. base address of semafores.
b26: g44: 30 ; stop and wait
b27: g45: 156 ; first of core table
b28: 1<23 ; for clear core
b29: g46: 11 ; clear core
b30: g96: 36 ; search limit
b31: 10000 ; conversion 0.8 seconds to seconds
b32: 4095 ; max priority
b33: 0,0,0,0 ; work used by c15 and c8
b34: 400 ; compute core table length in
b35: i11 ; i11 per cent of number of core places;
b36: g97: 282 ; addr of old time - old boss run time. for update net run.
b37: <:wrk:> ; first part of swop area name
b38:g100: 33 ; terminate access
b39:g101: 5 ; lock chained
b40:g102: 51 ; request queue
b41:g103: 52 ; request free sem
b42: 2,b43.,<:only one protection key available:>
b43=k-2 ; last of request line
b44:g104: 283 ; number of available protection keys
b45: 0 ; saved return from medium level procs
\f
; sl 10.9.71 boss 2, banker, ...31...
b. a10 w. ;
g4=k-b0 ; set claims1: called from main banker page.
jl. w1 c8. ; update time used;
al w2 x3+d0 ;
wa w2 x3+d15 ; w2:= saved psjob abs:= base + psjob rel;
rs w2 x3+d16 ;
rl. w1 b0.+4 ; w1:= operation addr;
bz w0 x2+j13+1 ; if account job then
sn w2 x3+d17 ; operation.11:= rest claims.acc;
hs w0 x1+11 ;
al w0 x2+j11-j14; stop:= max waiting;
rs. w0 b10. ;
a1: rl w0 x1+4 ; copy operation to psjob descr:
rs w0 x2+j14 ; copy one word;
al w1 x1+2 ; next in operation;
al w2 x2+2 ; next in psjob descr;
sh. w2 (b10.) ; if w2 <= stop then
jl. a1. ; goto copy operation to psjob descr;
rl w2 x3+d16 ; adjust timer and priority: w2:= saved psjob abs;
rl w1 x2+j18 ; time to time out :=
al w1 x1-i5*10/8; net run left - warning period;
rs w1 x2+j19 ;
rl. w1 b17. ; time to wait:=24 hours;
rs w1 x2+j22 ;
rl w3 x2+j9 ;
jl. w1 c12. ; w1:= priority(gross run);
al w0 0 ; time class:= 0;
sh w1 f8/i101; if w1 <= class 0 limit then
al w0 f2 ; time class:= 1;
sh w1 f8/i102;
al w0 2*f2 ; class 1 limit;
sh w1 f8/i103; class 2 limit ;
al w0 3*f2 ;
ls w0 1 ;
am. (b0.+4) ;
g75=k+1 ;
rl w3 +266 ; w3:= max corelock;
sl w3 1 ; if w3 > 0 then
ba. w0 1 ; set corelock bit;
hs w0 x2+j7+1 ; store time class;
sh w3 0 ; if max corelock > 0 then
jl. a10. ; begin
rl. w1 b0.+2 ; no of corelock jobs:=
al w0 1 ; no of corelock jobs + 1;
aa w0 x1+d32 ; summa corelock times:=
ds w0 x1+d32 ; summa corelock times + max corelock;
jd-1
a10: rl w3 x2+j18 ; end;
jl. w1 c12. ; priority factor:= priority(net run);
hs w1 x2+j12+1 ; priority from cat overwritten;
\f
; sl 9.5.72 boss 2, banker, ...32...
al w1 511 ; compute core place as a-job:
wa w1 x2+j21 ;
ls w1 -9 ; psjob.core place:= check core:=
rs w1 x2+j21 ; (size + 511) // 512;
rs. w1 b1. ;
bz. w0 b4.+1 ; w0:= number of core places;
a6: sl w0 x1+29 ; if number of core places < top core place
sz w0 0 ; + work core then
jl. a7. ; goto size too big;
bz w1 x2+j12 ;
rs. w1 b3. ; save keys:= keys; fitcount:= 0;
bz. w0 b4. ;
sh w0 x1-1 ; if keys >= number of free keys + 1 then
jl. a8. ; goto keys too many;
bs. w0 b3.+1 ; w0:=free keys - save keys;
jl. w3 c7. ; remove ones(keys);
rs. w1 b2. ; check protection:= psjob.prot:=
hs w1 x2+j12 ; remaining ones from boss own protection;
bz w0 x2+j7+1 ;
sz w0 1 ; if corelock then
jl. a2. ; goto compute as b job;
rl w1 x3+d31 ; test abs a job:
al w0 0 ; w1:= mean of corelock times;
wd w1 x3+d32 ;
am. (b0.+4) ; w0:= abs place a;
rl w0 +d33 ;
sh w1 (x2+j18) ; if w1 > net time (job) or
se w0 0 ; w0 = true then
jl. a5. ; goto coreplace found;
al w2 x3+d2 ; count a-fits: w2:= priority head;
a3: jl. w1 c5. ; repa: w2:= next(w2);
jl. a2. ; if last then goto compute as b-job;
jl. w1 c6. ; if fitting then
jl. a3. ; begin
bz. w0 b3. ;
ba. w0 1 ; fitcount:= fitcount + 1;
hs. w0 b3. ; end;
jl. a3. ; goto repa;
g67= a6+1
\f
; sl 9.5.72 boss 2, banker, ...33...
a2: rl. w0 b4. ; compute as b-job:
rl w2 x3+d16 ; w2:= psjob abs;
bs w0 x2+j21+1 ; w0:= number of core places - top place as a-job;
ls w0 12 ;
hl. w0 b4.+1 ; check core:= w0 < 12 + number of coreplaces;
rs. w0 b1. ;
bz. w0 b3.+1 ; w0:= save keys;
jl. w3 c7. ; remove ones(w0);
rl. w0 b5. ; check protection:=
ws w0 2 ; total key pattern - remaining from remove;
rs. w0 b2. ;
bz w0 x2+j7+1 ;
sz w0 1 ; if corelock then
jl. a9. ; goto b-job best;
al w2 x3+d2 ; count b-fits: w2:= priority head;
a4: jl. w1 c5. ; repb: w2:= next(w2);
jl. a5. ; if last then goto core place found;
se w2 (x3+d16) ; if w2 = caller
jl. w1 c6. ; or not fitting then
jl. a4. ; goto repb;
bz. w0 b3. ;
bs. w0 1 ; fit count:= fit count - 1;
hs. w0 b3. ;
sl w0 1 ; if fit count >= 1 then
jl. a4. ; goto repb;
a9: rl w2 x3+d16 ; b-job best: w2:= psjob abs;
dl. w1 b2. ;
rs w0 x2+j21 ; psjob.core place:= check core;
hs w1 x2+j12 ; psjob.protection:= check protection;
a5: rl w2 x3+d16 ; core place found: w2:= psjob abs;
bz w0 x2+j21 ; w0:= psjob.first core place;
bz w1 x2+j12 ;
ac w1 x1-255 ; w1:= operation.24:= 255 - protection;
rl. w2 b0.+4 ; i.e. the protection register.
hs w1 x2+24 ;
ls w0 9 ; w0:= operation.22:= 512 * first core place
wa. w0 b6. ; + abs core base;
rs w0 x2+22 ;
am -20 ; error code:= 0; return;
a8: am 2 ; keys too many: error code:= 20; return;
a7: al w1 18 ; size too big: error code:= 18; return;
dl w3 x3+2 ;
rs. w1 (b0.+2) ; store error code
jl. (b15.) ; return;
e. ;
\f
; sl 10.9.71 boss 2, banker, ...34...
b. a10 w. ;
g99=k-b0 ; release and allocate core:
am (x3+d15) ; released psjob rel := psjob rel;
am -1 ;
g5=k-b0 ; allocate core: called from main banker page.
al w0 1 ;
rs w0 x3+d11+16 ; released psjob rel := 1;
rl. w2 b11. ;
jl. w3 (b12.) ; lock(timer manipulation);
dl w1 x3+d30+2 ;
ds w1 x3+d11+2 ; in core aux:= locked in core;
am x3+d0 ;
al w2 x1 ; w2 := abs locked in core;
rl w0 x2+j21 ; check core:=core place;
rs. w0 b1. ;
bz w0 x2+j12 ; check protection := protection;
rs. w0 b2. ;
al w2 x3+d2 ; w2:= priority head;
se w1 0 ; if job-b locked in core then
jl. a2. ; goto find a job fitting;
a1: jl. w1 c5. ; find first job wanting core: w2:= next(w2);
jl. a3. ; if last then goto swop;
rs. w1 b10. ; save ps job rel;
bz w0 x2+j7 ;
se w0 f4 ; if state <> core wanted
jl. a1. ;-4: or not lock in core fitting then
jl. w1 c15. ;-2: goto rep;
rl w0 x2+j21 ;-0: w0:= check core:= core place;
rl. w1 b10. ; w1:=saved psjob rel;
rs. w0 b1. ;
sl w0 2047 ; if first core place = 0 then
am 2 ; in core aux a else in core aux b
rs w1 x3+d11 ; := psjob rel;
bz w0 x2+j12 ;
rs. w0 b2. ; check protection:= protection;
a2: jl. w1 c5. ; find a job fitting: w2:= next(w2);
jl. a3. ; if last then goto swop;
rs. w1 b10. ; save psjob rel;
bz w0 x2+j7 ;
sn w0 f4 ; if state <> core wanted
jl. w1 c6. ; ,-2: or not fitting
jl. a2. ;-4,+0: or not lock in core fitting then
jl. w1 c15. ;-2,+2: goto find a job fitting;
rl w0 x2+j21 ;-0, :
rl. w1 b10. ; w1:= saved psjob rel;
sl w0 2047 ; if first in core = 0 then
am 2 ; in core aux a else in core aux b
rs w1 x3+d11 ; := psjob rel;
a3: jl. w1 c8. ; swop: update time used;
al w2 x3+d22 ;
jl. w1 c10. ; swopout(in core a);
al w2 x3+d22+2 ;
jl. w1 c10. ; swopout(in core b);
dl w1 x3+d22+2 ;
ds w1 x3+d11+6 ; save old in core;
se w0 (x3+d11) ;
al w0 0 ; clear jobs swopped out;
se w1 (x3+d11+2) ;
al w1 0 ;
ds w1 x3+d22+2 ;
sn w0 (x3+d11) ; if any job swopped
se w1 (x3+d11+2) ; out then
jl. w1 c8. ; update time used;
dl w1 x3+d11+2 ;
ds w1 x3+d22+2 ; in core:=in core aux;
dl w1 x3+d11+6 ;
ds w1 x3+d11+2 ; in core aux:=old in core;
al w2 x3+d22 ;
jl. w1 c11. ; swopin(in core a);
al w2 x3+d22+2 ;
jl. w1 c11. ; swopin(in core b);
\f
; sl 10.9.71 boss 2, banker, ...35...
c13: am. (b7.) ; regret present timer:
rl w2 +2 ; w2:= timer corutine.state;
sl w2 2 ; if w2 >= 2
sl. w2 (b8.) ; and w2 < boss start addr then
jl. a4. ; begin timer is waiting for an answer.
rl w1 x2+4 ; w1:= receiver of mess buffer;
sl w1 1 ; if answer is not send then
sl w1 6 ; begin
jl. 4 ;
jl. a4. ;
jd 1<11+82; regret message(w2);
rl. w3 b0.+2 ;
jl. w1 c9. ; next timer;
jl. w3 c3. ; set max base;
al. w1 b9. ; w1:= message addr;
al. w3 b13. ; w3:= clock;
jd 1<11+16; send message;
am. (b7.) ; timer corutine.state:= message buf;
; end;
rs w2 +2 ; end;
a4: rl. w2 b11. ;
jl. w3 (b14.) ; open(timer manipulation);
dl w3 x3+2 ;
jl. (b15.) ; page jump to return;
e. ;
g86=k-b0 ;
al w2 x3+d0 ; call priority:
wa w2 x3+d15 ; w2:= abs psjob:= w3 + saved rel;
rl w3 x2+j18 ; w3:= time;
jl. w1 c12. ;
hs w1 x2+j12+1 ; priority factor:= priority(net run, priority from cat);
dl w3 x3+2 ;
jl. (b15.) ; page jump to return;
\f
; sm 75.06.10 boss 2, banker, ...35a...
; code=15: set time to time out
; code=30: set time to wait
b. a10 w. ;
g6=k-b0 ; set timer: called from main banker page.
rl. w2 b11. ;
jl. w3 (b12.) ; lock(timer manipulation);
al w2 x3+d0 ;
wa w2 x3+d15 ; w2:= psjob abs;
rs w2 x3+d16 ; save psjob abs;
jl. w1 c8. ; update time used;
rl w2 x3+d16 ; w2:= psjob abs;
rl. w3 b0.+4 ;
bl w1 x3+2 ; if op.code=15 then
se w1 15 ;
jl. a0. ; begin
rl w1 x2+j18 ;
; exchange operation.4 and net run left now;
rx w1 x3+4 ;
wm. w1 b31. ; w1:= net run left at time out :=
ld w1 -13 ; operation.4 * 10000 shift(-13);
rl w0 x2+j18 ;
ws w0 2 ; time to time out:= net run left now -
sh w0 -1 ;
al w0 0 ;
rs w0 x2+j19 ; net run left at time out;
jl. c13. ; goto regret present timer;
a0: rl w1 x3+4 ; end else op.code:=30;
wm. w1 b31. ; time to wait:=
ld w1 -13 ; op.4*10000 shift(-13);
rs w1 x2+j22 ;
jl. c13. ; goto regret present timer;
e. ;
b. a10 w. ;
g7=k-b0 ; timer corutine:
rl. w2 b44. ; upstart test: if number of available keys < 2 then
sl w2 2 ; begin
jl. a1. ;
rl. w2 b41. ; lock chained(request free);
jl. w3 (b39.) ;
al. w2 b42. ;
a0: rl w0 x2 ; move <:only one pk available:> to line;
rs w0 x1+2 ;
al w1 x1+2 ;
al w2 x2+2 ;
sh. w2 b43. ;
jl. a0. ;
rl. w1 b0.+4 ;
rl. w2 b40. ; open chained(request queue, line);
jl. w3 (b20.) ;
\f
; sm 75.06.10 boss 2, banker, ...36...
a1: jl. w3 c3. ; set max base;
al. w1 b9. ; after initialization the message(wait 24 hours)
al. w2 b13. ; is sent to the clock.
jl. w3 (b16.) ; send and wait(clock message);
rl. w2 b11. ;
jl. w3 (b12.) ; lock(timer manipulation);
jl. w1 c8. ; update time used;
al w2 x3+d0 ;
wa w2 x3+d14 ; w2:= psjob abs for job timed;
sn w2 x3+d0 ; if job rel=0 then
jl. a2. ; goto endtimer;
dl w1 x2+j22 ;
sl w0 1 ; if time to time-out>0
sh w1 0 ; and time to wait>0
jl. 4 ; then
jl. a2. ; goto endtimer;
rl. w3 b17. ; the timer which
sh w0 0 ; caused the time-out
rs w3 x2+j19 ; is set to 24 hours
sh w1 0 ;
rs w3 x2+j22 ;
rl w0 x2+j6 ;
am. (b7.) ; page 3 descr:= virt of dump name;
rs w0 +12 ;
jl. w3 (b18.) ; get pages;
rl. w1 b0.+6 ; w1:= abs of dump name;
bz w0 x1+12 ;
se w0 0 ; if timer operation free then
jl. a2. ; begin
am (x3+d14) ;
rl w0 x3+d0+j18 ; timer operation.net left:= net run left;
rs w0 x1+14 ;
al w0 1 ; timer operation.free:= not free;
hs w0 x1+12 ;
rl w1 x3+d14 ; w1:= psjob rel;
jl. w2 c1. ; w2:= compute semafore(w1) + base psjob que;
wa. w2 b19. ;
rl. w1 b0.+6 ; open chain(psjob que, page 3 abs + 10);
al w1 x1+10 ;
jl. w3 (b20.) ; end;
a2: al w0 0 ; end timer:
am. (b7.) ;
rs w0 +12 ; page 3 descr:= 0;
jl. w1 c9. ; next timer;
rl. w2 b11. ;
jl. w3 (b14.) ; open(timer manipulation);
jl. a1. ; goto timer corutine;
e. ;
\f
; sl 10.9.71 boss 2, banker, ...37...
; compute semafore: w1 = psjob rel, w2 = return. return: w2 = semafore addr
; except base, w3 unchanged.
c1: al w0 0 ; compute semafore:
wd. w1 b21. ;
wm. w1 b22. ; w2:= psjob rel/ job descr length * sem length;
rx w1 4 ;
jl x1 ; return;
; get virt and buffer addr: w0 = increase to jobs in core, w1 = psjob rel,
; w2 = return, w3 = page 1 abs. return: w2 = psjob abs, page 3 descr =
; virt of psjob, w3 = page 1 abs, message first and last completed.
c2: rs. w2 b23. ; get virt and buffer addr: save return;
wa w0 x3+d21 ;
rs w0 x3+d21 ; jobs in core:= jobs in core + increment;
am x3+d0 ;
al w2 x1 ; w2:= psjob abs;
rl w0 x2+j6 ;
am. (b7.) ; page 3 descr:= virt of dump name;
rs w0 +e12+12 ;
rl w0 x2+j21 ;
rs w0 x3+d11+4 ; save core:= core place;
bz w0 x2+j21 ; w0:= first core index;
bz w1 x2+j21+1 ; w1:= top core index;
ld w1 9 ;
wa. w0 b6. ; w0:= first core abs;
wa. w1 b6. ; w1:= last core abs;
al w1 x1-2 ;
ds w1 x3+d11+10 ; store in operation;
al w1 0 ;
rs w1 x3+d11+12 ; segment number in operation:= 0;
jl. (b23.) ; return;
; set max base: w3 = return. return: w2 unchanged, w3 = page 1 abs.
c3: rs. w3 b23. ; set max base: save return;
al. w3 b24. ;
am (66) ;
dl w1 +78 ; set catalog base to own std interval;
jd 1<11+72;
rl. w3 b0.+2 ; w3:= page 1 abs;
jl. (b23.) ; return;
\f
; sl 10.9.71 boss 2, banker, ...38...
b. a10 w. ;
; init swop: w1 = return from swop, w2 = addr of in core, w3 = return.
; return: w1 = psjob rel, w3 = page 1 abs, d11+14 = psjob rel.
c4: rs. w3 b23. ; init swop: save return;
rl. w3 b0.+2 ; w3:= page 1 abs;
ws. w1 b0. ;
rs w1 x3+d8 ; save relative return from swop;
rl w0 x2+d11-d22; w0:= in core aux;
rl w1 x2 ; w1:= in core; w1 = psjob to be transferred.
se w0 x1 ; if in core = in core aux
sn w1 0 ; or in core = 0 then
jl. c14. ; goto exit swop;
rs w1 x3+d11+14 ; save psjob rel;
jl. (b23.) ; return;
; next: w1 = return, w2 = chain addr, w3 = page 1 abs. return to x1+2:
; w1 = psjob rel, w2 = next, w0, w3 unchanged. return to x1: last element,
; w0, w3 unchanged.
c5: rs. w1 b23. ; next: save return;
bz w1 x2 ; w1:= chain(w2); w1 = psjob rel.
sn w1 0 ; if end chain then
jl. (b23.) ; return;
am x3+d0 ;
al w2 x1 ; w2:= psjob abs;
am. (b23.) ;
jl +2 ; return + 2;
; fitting: w1 = return, w2 = psjob abs, check core and check protection ok.
; return to x1+2: fit. return to x1: no fit. in both cases w2, w3 are unchanged.
c6: rs. w1 b23. ; fitting: save return;
bl w0 x2+j21 ; w0:= psjob.first core;
bl. w1 b1.+1 ; w1:= check.top core;
a2: sl w0 x1+29 ; if psjob.first core >= check.top core
jl. a1. ; + work core then goto core ok;
bl w1 x2+j21+1 ; w1:= psjob.top core;
bl. w0 b1. ; w0:= check.first core;
a3: sl w0 x1+29 ; if check.first core >= psjob.top core
jl. a1. ; + work core then goto core ok;
jl. (b23.) ; return, no fit;
a1: bz w0 x2+j12 ; core ok: w0:= psjob.protection;
sz. w0 (b2.) ; if w0 has zeroes where check.protection
jl. (b23.) ; has ones then return, fit ok else not ok;
am. (b23.) ;
jl +2 ;
g30=a2+1, g31=a3+1
e. ;
\f
; sl 10.9.71 boss 2, banker, ...39...
b. a10 w. ;
; remove ones: w0 = number of ones to remove, w3 = return.
; return: w1 = remaining bit pattern, w2 saved, w3 = page 1 abs.
c7: rs. w3 b23. ; remove ones: save return;
rl. w1 b5. ; w1:= total key pattern;
a1: rl. w3 b0.+2 ; rep: w3:= page 1 abs; prepare return.
sh w0 0 ; if w0 <= 0 then
jl. (b23.) ; return;
bs. w0 1 ; w0:= w0 - 1;
al w3 x1-1 ; w3:= mask
la w1 6 ; remove rightmost one from w1;
jl. a1. ; goto rep;
; update time used: w1 = return, w3 = page 1 abs, jobs in core ok.
; return: w3 = page 1 abs.
c8: rs. w1 b45. ; update time used: save return;
jd 1<11+36; w0w1:=get clock;
ds. w1 b33.+2 ; save new abs time to update waiting time;
am (66) ; w01:= time - run time used by boss;
ss w1 +56 ;
ld w1 -13 ; w0:= w1:= (time - run time) shift(-13);
al w0 x1 ;
ws. w1 (b36.) ; w1:= time used by core jobs in common;
rs. w0 (b36.) ; old time - run time:= w0;
al w0 0 ;
sh w1 -1 ; timer inaccuracy!
al w1 0 ;
wd w1 x3+d21 ; used:= time used by core jobs / jobs in core;
rs. w1 b10. ;
a2: rl w2 x3+d22 ; rep: w2:= in core; w2 = psjob rel;
sn w2 0 ; if job is in core then
jl. a3. ; begin
am. (b0.+2) ; w2:= psjob abs;
al w2 x2+d0 ;
dl w1 x2+j18 ;
ws. w0 b10. ; decrease gross run left,
ws. w1 b10. ; net run left,
jd-1
sh w0 -1 ; test sign of gross run left;
al w0 0 ;
sh w1 -1 ; test sign of net run left;
al w1 0 ;
ds w1 x2+j18 ;
rl w1 x2+j19 ;
ws. w1 b10. ; and time to time out by used;
rs w1 x2+j19 ; end;
a3: al w3 x3+2 ; next job in core;
am. (b0.+2) ;
sh w3 +2 ; if not all tested then
jl. a2. ; goto rep;
\f
; sm 75.06.10 boss 2, banker, ...39a...
rl. w3 b0.+2 ; w3:= page 1 abs;
dl. w1 b33.+2 ; w0,w1:=(abs time-
ss w1 x3+d35 ; old abs time)
ld w1 -13 ; shift -13;
rs. w1 b33.+4 ; save time elapsed;
al w2 x3+d2 ; w2:=priority head;
a8: jl. w1 c5. ; rep: next in chain;
jl. a9. ; end chain:
rl w0 x2+j22 ; w0:=old time to wait
sl w2 x3+d17+2 ; (omit, convert and account)
ws. w0 b33.+4 ; - time elapsed;
rs w0 x2+j22 ;
jl. a8. ; goto rep;
a9: dl. w1 b33.+2 ; old abs time:=new abs time;
ds w1 x3+d35 ;
jl. (b45.) ; return;
e. ;
\f
; sl 10.9.71 boss 2, banker, ...40...
b. a10 w. ;
; next timer: w1 = return, w3 = page 1 abs, jobs in core ok.
; return: w3 = page 1 abs, timer message set, job timed set.
c9: rs. w1 b45. ; next timer: save return;
al w0 0 ;
rl. w1 b17. ; job timed:= 0;
rs w0 x3+d14 ;
rs. w1 b9.+2 ; timer message:= wait 24 hours;
al w2 x3 ;
a1: rl w1 x2+d22 ; rep: w1:= in core; w1 = psjob rel;
sn w1 0 ; if job is in core then
jl. a2. ; begin
am x3+d0 ;
rl w1 x1+j19 ;
wm w1 x3+d21 ; w1:= time to time out * jobs in core;
sl. w1 (b9.+2) ; if w1 < timer message then
jl. a2. ; begin
rs. w1 b9.+2 ; timer message:= w1;
rl w1 x2+d22 ; job timed:= in core;
rs w1 x3+d14 ; end;
a2: al w2 x2+2 ; end;
am. (b0.+2) ; next job in core;
sh w2 +2 ; if not all tested then
jl. a1. ; goto rep;
al w2 x3+d2 ; w2:=priority head;
a8: jl. w1 c5. ; rep1: next in chain;
jl. a9. ; end chain:
rl w1 x2+j22 ; w1:=time to wait;
sl w2 x3+d17+2 ; (omit convert and account)
sl. w1 (b9.+2); if w1<timer message then
jl. a8. ; begin
rs. w1 b9.+2 ; timer message:=w1;
al w1 x2-d0 ; job timed:=abs job;
ws. w1 b0.+2 ; end;
rs w1 x3+d14 ;
jl. a8. ; goto rep1;
a9:
rl. w0 b9.+2 ;
ad w1 -11 ; timer message:=
wd. w1 b31. ; timer message shift 13/10000+1;
al w1 x1+1 ; timer inaccuracy, rounding;
rs. w1 b9.+2 ;
jl. (b45.) ; return;
\f
; re 5.2.75 boss 2, banker ...40a...
; entry: w1 = return, w2 = swopin candidate, w3 = page 1.
; exit: w2, w3 unch, no fit: w1-4, fit: w1.
c15: bz w0 x2+j7+1 ; lock in core fit:
so w0 1 ; if corelock not allowed then
jl x1 ; return;
ds. w2 b33.+2 ; save return, candidate;
dl. w1 b2. ; save check core, check prot.
ds. w1 b33.+6 ;
rl w0 x2+j21 ; check core:=core place(candidate);
bz w1 x2+j12 ; check prot:=protection(candidate);
ds. w1 b2. ;
al w2 x3+d2 ; w2:= priority head;
a3: jl. w1 c5. ; rep3: w2:= next(w2);
c.-1, o90, z. ; (bossfault xref)
jd -90 ; if end chain then boss alarm;
sn. w2 (b33.+2); if w2 = candidate then
jl. a5. ; goto exit fit;
jl. w1 c6. ; if not fitting then
jl. a4. ; goto exit no fit else
jl. a3. ; goto rep3;
a4: dl. w1 b33.+6 ; exit no fit:
ds. w1 b2. ; restore check core and prot.
am -4 ; return - 4
a5: al w1 0 ; exit fit: return
jd-1
rl. w2 b33.+2 ; w2:= saved swopin candidate;
am. (b33.) ;
jl x1 ; goto return + fit;
e. ;
\f
; sl 10.9.71 boss 2, banker, ...41...
b. a9 w. ;
; swopout: w1 = return, w2 = addr of in core, in core describes
; job to swopout, in core aux job to swop in. waits. return:
; w3 = page 1 abs.
c10: jl. w3 c4. ; swopout: init swop; w1:= psjob rel;
jl. w2 c1. ; compute semafore;
wa. w2 b25. ;
jl. w3 (b12.) ; lock(job in core);
al w0 -1 ; prepare decrease jobs in core;
rl w1 x3+d11+14 ;
jl. w2 c2. ; get virt and buf(psjob rel); w2:= psjob abs;
jl. w3 c3. ; set max base;
al w2 x2+j17 ; w2:= job name;
jl. w3 (b26.) ; stop and wait;
rl w0 x3+d11+14 ;
sn w0 (x3+d11+16); if psjob rel = released psjob rel then
jl. a1. ; goto release core;
; output and release core:
al w0 5 ; page 3 = dump name;
ls w0 12 ; operation:= output;
rs w0 x3+d11+6 ;
al w1 x3+d11+6 ; w1:= operation;
rl. w2 b0.+6 ; w2:= dump name;
rl. w0 b37. ; if job not swopped in (hard error.) then
se w0 (x2) ;
jl. a1. ; goto release core;
jl. w3 (b16.) ; send and wait;
se w0 2 ; if not ok then boss alarm;
c.-1, o91, z. ; (bossfault xref)
jd -91 ;
a1: bz w2 x3+d11+4 ; release core: w2:= saved first core;
ls w2 2 ; w2:= 4 * first core + first of core table;
wa. w2 b27. ; core table address.
bz w0 x2+2 ;
ls w0 -2 ;
jl. w1 c16. ; adjust search limit(number of core places);
al w0 4 ;
hs w0 x2+2 ; length of section:= 4;
al w0 0 ;
hs w0 x2+1 ; priority(core place):=0;
c14: al w0 0 ; exit swop: also entered from init swop.
am. (b7.) ; page 3 descr:= 0;
rs w0 +e12+12 ;
am (x3+d8) ;
jl. b0. ; return;
c16: wa w0 x3+d34 ; adjust search limit(adjust places):
rs w0 x3+d34 ; free core places:= free core places + adjust places;
jd-1
wm. w0 b34. ;
wd. w0 b35. ;
rs. w0 (b30.) ; search limit:= i11 pct of free core places in core table;
rl. w3 b0.+2 ;
jl x1 ; return;
e. ;
\f
; sl 10.9.71 boss 2, banker, ...42...
b. a9 w. ;
; swopin: as swopout, but meaning of in core and in core aux is reversed.
c11: jl. w3 c4. ; swopin: init swop; w1:= psjob rel;
al w0 1 ; prepare increase jobs in core;
jl. w2 c2. ; get virt and buf(psjob rel); w2:= psjob abs;
rl w0 x2+j21 ; clear core and input:
wa. w0 b28. ;
am. (b7.) ; page 4 descr:= psjob.core place + 1<23;
rs w0 +e12+14 ;
bz w0 x2+j21 ;
bs w0 x2+j21+1 ;
jl. w1 c16. ; adjust search limit(- number of core places);
jl. w3 (b29.) ; clear core; page 3:= dump name;
al w0 0 ;
am. (b7.) ; page 4 descr := 0;
rs w0 +e12+14 ;
al w0 3 ;
ls w0 12 ; operation:= input;
rs w0 x3+d11+6 ;
rl. w2 b0.+6 ; w2 := dump name;
rl. w0 b37. ;
sn w0 (x2) ; if dump name (1) <> <:wrk:> then
jl. a0. ; begin comment first start;
bz w1 x2+1 ; last core abs := prog length
wa w1 x3+d11+8 ; + first core abs
al w1 x1-2 ; - 2 ;
rs w1 x3+d11+10 ;
ba w2 x2 ; w2 := prog name addr;
a0: al w1 x3+d11+6 ; end;
jl. w3 (b16.) ; w1 := operation;
se w0 2 ; send and wait;
jl. a1. ; if result etc <> ok then goto trouble;
rl. w2 b0.+6 ; w2 := dump name;
rl. w0 b37. ;
rx w0 x2 ; dump name (1) := <:wrk:>;
ba w2 0 ; w2 := prog name addr;
se. w0 (b37.) ; if first start then
jl. w3 (b38.) ; terminate access(prog name);
jl. w3 c3. ; start and open job in core: set max base;
rl w1 x3+d11+14 ; w1:= psjob rel;
am x3+d0 ; w3:= abs addr of job name;
al w3 x1+j17 ;
jd 1<11+58; start process;
a3: jl. w2 c1. ; no start: compute semafore(w1);
wa. w2 b25. ;
jl. w3 (b14.) ; open(job in core);
jl. c14. ; goto exit swop;
\f
; btj 20.6.74 boss 2, banker, ...42a...
a1: rl. w1 b0.+6 ; trouble:
rs w0 x1-2 ; save status in hard error operation (on job descr page);
rl w1 x3+d11+14 ; w1 := psjob rel;
jl. w2 c1. ; compute semafore(w1);
rl. w1 b0.+6 ;
al w1 x1-6 ; w1 := abs operation(psjob);
wa. w2 b19. ; w2 := abs psjob que(psjob);
bz w0 x1+2 ;
se w0 0 ; if operation free then
jl. a2. ; begin
al w0 1 ; operation := occupied;
hs w0 x1+2 ; open chained(psjob que, operation);
jl. w3 (b20.) ; end;
a2: rl w1 x3+d11+14 ; w1 := psjob rel;
jl. a3. ; goto no start;
; entry: w1 = return, w2 = abs psjob, w3 = time.
; exit: w1 = priority, w2 = abs psjob, w3 = page 1;
c12: rs. w1 b10. ; priority:
bz w0 x2+j12+1 ; save return;
al w1 0 ; w1:= priority:=
ld w1 -8 ; priority from cat * 2 ** 16 / time;
wd w1 6 ;
sh w1 0 ; if w1 <= 0 then priority:= 1;
al w1 1 ; time >= 14 hours.
sh. w1 (b32.) ; if w1 >= 4095 then priority:= 4095;
sx 1<1 ;
rl. w1 b32. ; time <= 12 seconds.
rl. w3 b0.+2 ; w3:= page 1;
sn w2 x3+d17 ; if accountjob then
al w1 0 ; priority:= 0;
jl. (b10.) ; return;
e. ;
g3=k-g2-1900
g83=g1+g3+2000
i.e. ; end core allocation page
\f
; sl 23.5.72 boss 2, banker, ...43...
; resource allocation page
b. b70, c60 w. ;
b. a1 w. ;
g17=k-g83 ;
b0: 0, r.5 ; page addresses
92<12 + 0 ; page ident: resource allocation
b2: g76: 5 ; lock chain
b3: f9 ; job descr length
b4: g77: 26 ; current corutine
b6: e13 ; semafore length
b7: g78: 76 ; base of psjob answer
b8: g79: 4 ; open
b11: 0<12+4095 ; mask, release
g80=k-g83,0 ; virt of mainpage
b12: g85 ; rel of wait on main page
b13: 1,0,0 ; release station and
0<12+0 ; release reader
b14: 1<23-2 ;
b15: 1<23-1 ; infinite
b16: 0 ; previous used in next
b18: 0 ; time class
b20: 1<3+1<1,a1,<:deadly embrace: kill one or more jobs:>
b21=k-2, a1=k-b20-4 ;
b22: g56: 3 ; lock
b23: g93: 6 ; open chained
b24: g58: 51 ; request que
b25: g59: 52 ; request free
g81=k-g83 ;
b26: 0 ; virt of core allocation page
b27: g90: 25 ; call
b28: g91: 21 ; coruno output
b30:0, b31:0, b32:0, b33:0, b34:0, b35:0 ; working, leaf level procs.
b40:0, b41:0, b42:0, b43:0, b44:0 ; working, medium level procs.
b50:0, b51:0, b52:0, b53:0, b54:0, b55:0 ; working. root level procs.
e. ;
c51: am c55 ; release:
c52: am c56 ; release reader:
c53: am c57 ; release station:
c54: al. w0 c8. ; set claims:
rl w1 x3+d15 ; w1:= psjob rel or operation.3;
am x3+d0 ;
al w2 x1 ; w2:= psjob abs:= w1 + base psjob;
rs w2 x3+d16 ;
jl (0) ; goto action;
c0: dl. w3 b12. ; wait:
jl. w1 (b27.) ; return to wait on main page;
g84=k-b0 ;
am c58 ; call compute priority chain;
g19=k-b0 ;
jl. w2 c48. ; call allocate:
dl w3 x3+2 ;
jl. w1 (b27.) ; return to main banker page;
\f
; sl 23.5.72 boss 2, banker, ...44...
b. a10 w. ; release:
c2: rl. w1 b0.+4 ; adjust partially released resources:
rl w0 x1+6 ; w1:= operation addr;
rx w0 x2+j15+2 ; reserved.temp disc:= released.temp disc;
ws w0 x1+6 ;
rs w0 x1+6 ; operation:= not released temp disc;
g74=k+1
ac w0 (x1+266) ;
sl w0 0 ; if max corelock > 0 then
jl. a1. ; begin
wa w0 x3+d31 ;
rs w0 x3+d31 ; summa corelock times:= summa - max corelock time;
rl w0 x3+d32 ;
bs. w0 1 ; no of corelock jobs:= no of corelock jobs - 1;
rs w0 x3+d32 ; end;
a1: rl w0 x1+4 ;
rx w0 x2+j13 ; rest claims.conv and acc:= released;
ws w0 x1+4 ; w0:= assumed not released conv acc;
bz w1 x2+j15 ; w1:= reserved.all;
so w1 2 ; w0 right:= operation.5:= if account reserved
hl. w0 b11. ; then rest claim - released else 0;
so w1 4 ; w0 left:= operation.4:= if conv reserved
la. w0 b11. ; then rest claim - released else 0;
am. (b0.+4) ; not released resources will later be added to acc
rs w0 +4 ; or convert job. note that these jobs also may release
; part of their resources.
al w0 x3+d10 ; adjust free resources:
al w1 x2+j15-j14; free resources:= free resources + reserved;
jl. w3 c43. ;
al w0 0 ; adjust job description:
sn w2 x3+d17 ; reserved.all:=
al w0 2 ; if account job then 2 else
sn w2 x3+d18 ; if converter then 5 else 0;
al w0 5 ;
ls w0 12 ;
rs w0 x2+j15 ; reserved.stations:= 0;
ld w1 -100 ;
ds w1 x2+j15+4 ; clear remaining reserved inf;
rs w1 x2+j13 ; clear rest claims.conv and acc;
; rest claims.conv and acc are only cleared in order to handle not released
; resources from convert and account job(code below). other
; rest claims will soon be set for account job( set claims). rest claims are
; 0 for convert job. they are not needed for other jobs because they are removed
; from the priority que. the same applies for priority factor and gross run left.
rl. w1 b0.+4 ; transfer not released resources to acc and convert:
rl w0 x1+6 ; w1:= operation addr;
wa w0 x3+d18+j15+2; add not released to
rs w0 x3+d18+j15+2; convert job.reserved.temp disc;
bz w0 x1+4 ;
ba w0 x3+d18+j13 ; add not released to
hs w0 x3+d18+j13 ; convert job.convert;
bz w0 x1+5 ;
ba w0 x3+d17+j13+1; add not released to
hs w0 x3+d17+j13+1; account job.account;
rl w0 x2+j18 ; operation.4 :=
rs w0 x1+4 ; net run left;
sh w2 x3+d17 ; if account or convert job then
jl. a3. ; goto answer;
\f
; sl 10.9.71 boss 2, banker, ...45...
al w0 f3 ; change state:
hs w0 x2+j7 ; state:= in no que;
al w2 x3+d2 ; remove from priority que: w2:= priority head;
a2: jl. w3 c37. ; rep: w2:= next(w2);
c.-1, o93, z. ; (bossfault xref)
jd -93 ; if last then boss alarm;
se w2 (x3+d16) ; if w2 <> psjob abs then
jl. a2. ; goto rep;
rl. w2 b16. ; w2:= previous;
jl. w3 c39. ; remove(w2);
a3: rl w1 x3+d15 ; answer: w1:= saved psjob rel;
jl. w3 c30. ; answer psjob(w1);
jl. w2 c48. ; allocate;
al w3 g5 ;
rl. w2 b26. ;
jl. w1 (b27.) ; call allocate core;
jl. c0. ; goto wait;
c4: jl. w3 c34. ; release reader: answer sender;
am. (b0.+4) ;
rl w0 +6 ; w0:=op.dev no;
jl. w2 c33. ; find reader entry;
jd -98 ;+2 not found: boss fault 98
;+4 found:
al w0 0 ; amount to release :=
sh w1 x3+d38-1 ; if exclusive device then 1 else
sh w1 x3+d40-1 ; 1<12
al w0 1 ; amount to release:=
sh w1 x3+d38-1 ; if remote then 1
ls w0 12 ; else 1<12;
rs. w0 b13.+6 ;
al w2 x3+d0+4 ;
ba w2 x1+1 ; w2:=psjob abs of reserver + 4;
al w0 0 ; (+4 accounts for reader displacement)
hs w0 x1+1 ; entry.reader:=0;
z.
al. w1 b13.+2-j14;
al w0 x3+d10 ; free resources:= free resources + reader;
jl. w3 c43. ; (w2 irrel but saved)
rl. w1 b13.+6 ; w1:= 1 reader (std or remote);
a4: rl w0 x2+j15 ; release: w1:= amount to release;
ws w0 2 ; reserved:= reserved - w1;
rs w0 x2+j15 ;
wa w1 x2+j14 ; rest claim:= w1:= rest claim + w1;
rs w1 x2+j14 ;
jl. w2 c48. ; allocate;
jl. c0. ; goto wait;
c7: jl. w3 c30. ; release station: answer psjob;
al. w1 b13.-j14;
al w0 x3+d10 ; free resources:= free resources + 1 station;
jl. w3 c43. ;
rl w2 x3+d16 ; w2:= saved psjob abs;
al w1 1 ; w1:= 1 station;
jl. a4. ; goto release;
e. ;
\f
; sl 23.5.72 boss 2, banker, ...46...
b. a8 w. ;
c8: rl. w2 b26. ; set claims:
al w3 g4 ; call set claims1 on core allocation page;
jl. w1 (b27.) ;
al w2 x3+d0 ;
wa w2 x3+d15 ; w2:= psjob abs;
rl w0 x3 ; w0:= error code;
se w0 0 ; if error then
jl. a0. ; goto refuse job;
jl. w1 c45. ; check claims: time class;
al w0 x3+d12 ;
al w1 x2 ;
jl. w3 c42. ; if total resources < rest claim then
jl. a0. ;+2 goto refuse job; w0:= resource index;
;+4
bz w0 x2+j7 ; insert into priority chain:
se w0 f3 ; if state = in no que then
jl. a1. ; begin
al w0 f1 ;
hs w0 x2+j7 ; state:= skip;
rl w1 x3+d15 ; w1:= saved psjob rel;
al w2 x3+d2 ; insert(w1, priority head);
jl. w3 c38. ; end;
a1: jl. w2 c40. ; compute priority chain;
jl. w2 c48. ; allocate;
am (x3+d15) ; comment allocate can not give deadly embrace
rl w0 x3+d0+j20 ; here and therefore page 2 is unchanged;
rl. w1 b0.+4 ; w1:= operation addr;
rs w0 x1+4 ; operation.4:= expected finish;
al w0 0 ;
hs w0 x1+2 ; operation.2:= ok;
a2: rl w1 x3+d15 ; w1:= saved psjob rel;
jl. w3 c30. ; answer psjob;
jl. c0. ; goto wait;
a0: am. (b0.+4) ; refuse job: w2 = psjob abs.
hs w0 +2 ; operation.2:= error code;
al w1 x2+j14 ; w1:= rest claim addr;
al w0 0 ;
a3: rs w0 x1 ; rep: clear rest claim;
al w1 x1+2 ; w1:= next of rest claim;
sh w1 x2+j14+16 ; if w1 <= last of rest claim
jl. a3. ; then goto rep;
jl. a2. ; goto answer and wait;
e. ;
\f
; sl 23.5.72 boss 2, banker, ...47...
; answer psjob: w1 = psjob rel, w3 = return. return: w3 = page 1 abs.
c30: rs. w3 b30. ; answer psjob: w1 = psjob rel. save return;
rs. w1 b31. ; save psjob rel for testoutput;
al w0 0 ;
wd. w1 b3. ; w1:= psjob rel // job descr length
wm. w1 b6. ; * semaphore length
wa. w1 b7. ; + first psjob answer sem;
al w2 x1 ;
jl. w3 (b8.) ; open(psjob answer sem); w3:= page 1 abs;
rl. w1 (b4.) ; w1:= current corutine;
bz w0 x1+4 ;
sz w0 2 ; if test bit 2 = 1 then
jl. c49. ; goto testoutput;
jl. (b30.) ; return;
; answer sender: page 2 = operation, w3 = return. return: w3 = page 1 abs.
c34: am. (b0.+4) ; answer sender:
rl w2 +4 ; w2:= operation.4;
jl. (b8.) ; open(answer); return to w3;
; time class:
; call: return:
; w0= irrel. unch.
; w1= return time class
; w2= psjob abs psjob abs
; w3= page 1 abs page 1 abs
c45: rs. w1 b30. ; time class:
bz w1 x2+j7+1 ;
ls w1 -1 ;
rs. w1 b18. ; w1:= store time class:= time class(w2);
jl. (b30.) ; return;
\f
; re 76.06.16 boss 2, banker ...47a...
; procedure for searching in reader reservation table
; leaf level procedures
; b30: return
; b31: top search limit
; find specified reader: c33: jl. w2 c33.
; not found: found:
; call: return to link: return to link+2:
; w0= dev no dev no dev no
; w1= irrel. top reader table abs reader entry
; w2= return undef. dev no
; w3= page 1 abs page 1 abs page 1 abs
;
; find free remote reader: c32: jl. w2 c32.
; not found: found:
; call: return to link: return to link+2:
; w0= irrel. 0 0
; w1= irrel. top reader table+1 abs reader entry+1
; w2= return undef. 0
; w3= page 1 abs page 1 abs page 1 abs
;
; find free std reader: c31: jl. w2 c31.
; not found: found:
; call: return to link: return to link+2:
; w0= irrel. 0 0
; w1= irrel. top std reader table+1 abs reader entry+1
; w2= return undef. 0
; w3= page 1 abs page 1 abs page 1 abs
;
b. a10 w.
c31: al w1 x3+d37-1 ; find free std reader:
al w3 x3+d40 ; pointer:=base std reader table;
jl. a0. ; top search limit:=top std reader table;
; goto find free
c32: al w1 x3+d38-1 ; find free remote reader:
al w3 x3+d39 ; pointer:= base remote reader table;
jl. a0. ; top search limit:=top remote reader table;
; goto find free;
c33: al w1 x3+d37-2 ; find specified reader:
al w3 x3+d39 ; pointer:=base reader table;
; top search limit:=top reader table;
am (0) ; find spec: w0 = dev no
a0: al w0 0 ; find free: w0 = no reserver
ds. w3 b31. ; save return,top search limit;
rl. w3 b0.+2 ; w3:=page 1 abs;
a1: al w1 x1+2 ; rep: step pointer;
sl. w1 (b31.) ; if pointer >= top search limit then
jl. (b30.) ; return to link;
bl w2 x1 ; if value found <> value wanted then
se w0 x2 ;
jl. a1. ; goto rep;
am. (b30.) ; found:
jl +2 ; return to link + 2;
e.
\f
; sl 23.5.72 boss 2, banker, ...48...
; next in chain:
; chain empty, element got,
; call: return to link: return to link+2:
; w0= irrel. unch. unch.
; w1= irrel. 0 psjob rel (elem got)
; w2= prev. psjob abs unch. (=prev.) psjob abs (elem got)
; w3= return page 1 abs page 1 abs
c37: rs. w3 b30. ; next: save return;
rs. w2 b16. ; previous:= w2;
rl. w3 b0.+2 ; w3:= page 1 abs;
bz w1 x2 ; w1:= chain(w2);
sh w1 1 ; if end chain then
jl. (b30.) ; return;
am x3+d0 ;
al w2 x1 ; w2:= next element:= w1 + base psjobs;
am. (b30.) ;
jl +2 ; return + 2;
; insert in chain:
; call: return:
; w0= irrel. following psjob rel
; w1= psjob rel unch. (psjob rel)
; w2= head addr psjob abs
; w3= return page 1 abs
c38: rs. w3 b30. ; insert: save return;
rl. w3 b0.+2 ; w3:= page 1 abs;
bz w0 x2 ; w0:= head;
hs w1 x2 ; head:= psjob rel;
am x3+d0 ;
al w2 x1 ; w2:= psjob abs;
hs w0 x2 ; chain(w2):= old head;
jl. (b30.) ; return;
; remove from chain:
; call: return:
; w0= irrel. following psjob rel
; w1= irrel. removed psjob rel
; w2= preceding psjob abs unch.
; w3= return page 1 abs
c39: rs. w3 b30. ; remove: save return;
rl. w3 b0.+2 ; w3:= page 1 abs;
bz w1 x2 ; w1:= chain(preceding element);
am x3+d0 ;
bz w0 x1 ; w0:= chain(element);
hs w0 x2 ; chain(preceding element):= w0;
jl. (b30.) ; return;
\f
; sl 23.5.72 boss 2, banker, ...49...
; compute priority chain: w2 = return, w3 = page 1 abs. return: w3 = page 1 abs.
; medium level procedure using working cells as follows:
; b40: return
; b41: aux head; chains not scheduled jobs
; b42: finish ; finishing time of last unscheduled job.
; b43: min priority
; b44: selected
; each time a job is scheduled, it is inserted at head of priority chain.
b. a10 w. ;
c40: rs. w2 b40. ; compute priority chain: save return;
bz w0 x3+d2 ;
hs. w0 b41. ; aux head:= priotity head;
al w0 0 ;
hs w0 x3+d2 ; priority head:= 0;
dl w0 110 ;
ld w0 -13 ; w0:= finish:= time now;
al. w2 b41. ; w2:= addr of aux head;
; sum net run times left:
a1: jl. w3 c37. ; rep1: w2:= next(w2); if not last then
jl. a2. ; begin
wa w0 x2+j18 ; w0:= finish:= w0 + net run left; goto rep1;
jl. a1. ; end;
a2: rs. w0 b42. ; schedule next: save finish; w3 = page 1 abs;
bz. w0 b41. ;
sn w0 0 ; if aux head = 0 then
jl. (b40.) ; return;
rl. w1 b15. ; min priority:= large;
al. w2 b41. ; w2:= selected:= addr of aux head;
ds. w2 b44. ;
a4: jl. w3 c37. ; rep3: w2:= next(w2); if not last then
jl. a7. ; begin
rl. w0 b42. ; w0:= turnaround:=
ws w0 x2+j10 ; finish - arrival;
sl w0 (x2+j11) ; w0:= priority:=
jl. a5. ; if w0 < max waiting then
bz w1 x2+j12+1 ;
wm w0 2 ; min(priority factor * turnaround
ld w0 -10 ; / 1024,
sn w3 0 ; large)
sh w0 -1 ; else
a5: rl. w0 b14. ; large;
sl. w0 (b43.) ; if priority < min prior then
jl. a4. ; begin min priority:= priority;
rl. w1 b16. ; selected:= previous;
ds. w1 b44. ; end; goto rep3;
jl. a4. ; end;
a7: rl. w2 b44. ; w2:= selected;
jl. w3 c39. ; w1:= remove;
al w2 x3+d2 ;
jl. w3 c38. ; w2:= insert(w2 = priority head);
rl. w0 b42. ; w0:= finish:=
ws w0 x2+j18 ; finish - net run left(inserted job);
jl. a2. ; goto schedule next;
e. ;
\f
; sl 10.9.71 boss 2, banker, ...50...
b. a10 w. ;
; copy free to pot: w2 = return, w3 = page 1 abs. return: w3 = page 1 abs.
c41: al w1 x3+d11-2 ; copy free to pot: stop:= pot resources - 2;
ds. w2 b31. ; save return;
al w2 x3+d10+2 ; w2:= addr of free resources;
a1: dl w1 x2 ; rep:
ds w1 x2+4*f2 ; copy 2 words from free to pot;
al w2 x2+4 ; next free resource;
sh. w2 (b30.) ; if w2 <= stop then
jl. a1. ; goto rep;
jl. (b31.) ; return;
; greater: time class set
; resources < wanted, resources >= wanted,
; call: return to link: return to link+2:
; w0= resource addr base rel give up resource undef.
; w1= dyn wanted addr unch. unch.
; w2= psjob abs unch. unch.
; w3= return page 1 abs page 1 abs
c42: ds. w0 b31. ; greater: save return;
rl. w3 b18. ; w3:= resource addr:=
wa w3 0 ; resource addr base + time class;
a0: ; test next time class:
bz w0 x1+j14 ; account tested first to activate acc as soon as needed.
so w0 2 ; if account then
jl. a6. ; begin
bz w0 x2+j13+1 ; if accounts wanted>= accounts available
sl w0 (x3+f21) ; then not ok;
jl. w3 a3. ; end;
a6: bz w0 x1+j14+1 ; if stations wanted >= stations available
sl w0 (x3+f10) ; then not ok;
jl. w3 a3. ;
bz w0 x1+j14+4 ; if std readers wanted>=
sl w0 (x3+f13) ; std readers available then
jl. w3 a3. ; not ok;
bz w0 x1+j14+5 ; if remote readers wanted >=
sl w0 (x3+f14) ; remote readers available then
jl. w3 a3. ; not ok;
bz w0 x1+j14 ;
so w0 1 ; if all static then
jl. a2. ; begin
rl w0 x3+f29 ; if devices 2 available
so w0 (x2+j14+16); does not include devices 2 wanted
jl. w3 a4. ; then not ok bits;
rl w0 x3+f28 ;
so w0 (x2+j14+14); test devices 1;
jl. w3 a4. ;
bz w0 x2+j14+13 ;
sl w0 (x3+f27) ; test temp drum segments;
jl. w3 a3. ;
bz w0 x2+j14+12 ;
sl w0 (x3+f26) ; test temp drum entries;
jl. w3 a3. ;
\f
; sl 10.9.71 boss 2, banker, ...51...
bz w0 x2+j14+11 ;
sl w0 (x3+f25) ; test suspends;
jl. w3 a3. ;
bz w0 x2+j14+10 ;
sl w0 (x3+f24) ; test internals;
jl. w3 a3. ;
bz w0 x2+j14+9 ;
sl w0 (x3+f23) ; test area procs;
jl. w3 a3. ;
bz w0 x2+j14+8 ;
sl w0 (x3+f22) ; test mess bufs;
jl. w3 a3. ; end all static;
a2: bz w0 x1+j14 ;
so w0 4 ; if convert then
jl. a5. ; begin
bz w0 x2+j14+6 ; test converts; tested last to activate conv
sl w0 (x3+f20) ; as late as possible without restraining other jobs.
jl. w3 a3. ; end;
a5: bz w0 x1+j14+3 ;
sl w0 (x3+f12) ; test temp disc segments;
jl. w3 a3. ; see note on converts.
bz w0 x1+j14+2 ;
sl w0 (x3+f11) ; test temp disc entries;
jl. w3 a3. ; see note on converts.
c.-1 ;******edit 30 begin ****** awaits further investigation
al w3 x3-f2 ; time class:=time class - 1;
sl. w3 (b31.) ; if time class > 0 then
jl. a0. ; goto next time class;
z. ;******edit 30 end ****** awaits further investigation
rl. w3 b0.+2 ; ok: w3:= page 1 abs;
am. (b30.) ;
jl +2 ; return + 2;
a4: am 2 ; not ok bits:
a3: bz w3 x3-5 ; not ok: w3:= displacement of wanted;
al w0 x3-j14 ; w0:=error code;
rl. w3 b0.+2 ; w3:= page 1 abs;
jl. (b30.) ; return;
e. ;
\f
; sl 10.9.71 boss 2, banker, ...52...
b. a20 w. ; block common for add and sub
; add: w0 = resource addr base, w1 = dyn want addr, w2 = psjob abs,
; w3 = return. return: w2 unchanged, w3 = page 1 abs. will always start
; adding to shortest time class, so that time class is unnecessary.
; working cells used as follows:
; b30: saved w2
; b31: saved return
; b32: action address handle byte
; b33: action address handle bits
; b34: return from handle
; b35: decrement
c43: ds. w3 b31. ; add: save psjob abs, return;
rl w2 0 ; w2:= resource addr base;
am. (b0.+2) ;
al w0 +d13 ; w0:= class diff addr:=
ws w0 4 ; addr of class diff - resource addr base;
hs. w0 a1. ;
al. w3 a2. ; w3:= addr of add byte;
al. w0 a3. ; w0:= addr of add bits;
a4: ds. w0 b33. ; add or sub: save action addresses;
al w1 x1+j14+1 ; w1:= want addr for stations;
jl. w3 (b32.) ; handle stations;
jl. w3 (b32.) ; handle temp disc entries;
jl. w3 (b32.) ; handle temp disc segments;
jl. w3 (b32.) ; handle std readers
jl. w3 (b32.) ; handle remote readers;
bz w1 x1-6 ;
al w0 x1+8 ; w0:= pattern:= all wanted + 8;
rl. w1 b30. ;
al w1 x1+j13 ; w1:= converts addr;
a7: hs. w0 a6. ; rep: save pattern;
so w0 4 ; if all(i.e. converts, accounts wanted)
jl. a8. ; then
jl. w3 (b32.) ; handle(converts or accounts)
jl. a15. ; else
a8: al w1 x1+1 ; increase wanted and resource addr;
al w2 x2+2 ;
a6=k+1
a15: al w0 ; w0:= pattern:= pattern shift 1;
ls w0 1 ;
so w0 32 ; if accounts not tested
jl. a7. ; then goto rep;
so w0 4 ; if static wanted then
jl. a5. ; begin
jl. w3 (b32.) ; handle mess bufs;
jl. w3 (b32.) ; handle area procs;
jl. w3 (b32.) ; handle internals;
jl. w3 (b32.) ; handle suspends;
jl. w3 (b32.) ; handle temp drum entries;
jl. w3 (b32.) ; handle temp drum segments;
jl. w3 (b33.) ; handle devices 1;
al w1 x1+2 ;
al w2 x2+2 ; handle devices 2;
jl. w3 (b33.) ; end;
\f
; sl 10.9.71 boss 2, banker, ...53...
a5: rl. w2 b30. ; w2:= saved psjob abs;
rl. w3 b0.+2 ; w3:= page 1 abs;
jl. (b31.) ; return;
; handle byte actions: w1 = wanted addr, w2 = resource addr(class 0),
; w3 = return. return: w1 and w2 increased.
; handle bit actions: entry as for byte action. return: w1 w2 unchanged.
a2: rs. w3 b34. ; add byte: save return;
bz w0 x1 ; w0:= wanted;
sn w0 0 ; if wanted = 0 then
jl. a9. ; goto exit;
wa w0 x2 ; w0:= res:= resource(class 0):=
rs w0 x2 ; resource(class 0) + wanted;
a1=k+1; class diff addr;
rl w3 x2+0 ; w3:= max diff between classes;
ws w0 6 ; w0:= res:= res - max diff;
sl w0 (x2+f2) ; if res >= resource(class 1) then
rs w0 x2+f2 ; resource(class 1):= res;
ws w0 6 ;
sl w0 (x2+2*f2) ; adjust class 2;
rs w0 x2+2*f2 ;
ws w0 6 ;
sl w0 (x2+3*f2) ; adjust class 3;
rs w0 x2+3*f2 ;
a9: al w1 x1+1 ; exit: increase wanted addr;
al w2 x2+2 ; increase resource addr;
jl. (b34.) ; return;
a3: rl w0 x1 ; add bits:
lo w0 x2 ; w0:= wanted or resource(class 0);
rs w0 x2 ;
rs w0 x2+f2 ; store in class 0 to 3;
rs w0 x2+2*f2 ;
rs w0 x2+3*f2 ;
jl x3 ; return;
\f
; sl 10.9.71 boss 2, banker, ...54...
; sub: entry and exit as for add, but time class is significant.
c44: ds. w3 b31. ; sub: save psjob abs, return;
rl w2 0 ; w2:= resource addr base;
al. w3 a10. ; w3:= addr of sub byte;
al. w0 a11. ; w0:= address of sub bits;
jl. a4. ; goto add or sub;
a10: rs. w3 b34. ; sub byte: save return;
bz w0 x1 ;
rs. w0 b35. ; decrement:= wanted;
al w3 0 ; class:= 0;
a12: rl w0 x2 ; rep1:
ws. w0 b35. ; w0:= resource(class):=
sh w0 1 ; max(resource(class) - decrement,
al w0 1 ; 1);
rs w0 x2 ;
a13: al w2 x2+f2 ; rep2: class:= class + length of resources;
al w3 x3+f2 ;
sh. w3 (b18.) ; if class <= time class then
jl. a12. ; goto rep1;
sl w3 4*f2 ; if class < 4 * length of resources then
jl. a14. ; begin resources may not increase through classes.
sh w0 (x2) ; if w0 <= resource(class) then
rs w0 x2 ; resource(class):= w0; goto rep2;
jl. a13. ; end;
a14: al w2 x2-4*f2+2 ; increase resource addr;
al w1 x1+1 ; increase wanted addr;
jl. (b34.) ; return;
a11: al w0 -1 ; sub bits:
lx w0 x1 ; w0:= -, wanted;
la w0 x2 ; w0:= resource remove wanted;
rs w0 x2 ;
rs w0 x2+f2 ; store in class 0 to 3;
rs w0 x2+2*f2 ;
rs w0 x2+3*f2 ;
jl x3 ; return;
e. ; end add and sub;
\f
; sl 10.9.71 boss 2, banker, ...55...
; assign resources: w1 = psjob rel, w2 = return, w3 = page 1 abs.
; return: w1 = psjob rel, w2 = psjob abs, w3 = page 1 abs.
b. a10 w. ;
c47: ds. w2 b41. ; assign resources: save psjob rel, return;
am x3+d0 ;
al w2 x1 ; w2:= psjob abs;
jd-1
jl. w1 c45. ; time class;
bz w0 x2+j7 ;
se w0 f5 ; if state <> res wanted then
jl. a1. ; answer:= false else
al w0 x3+d11 ;
al w1 x2+j16-j14;
jl. w3 c42. ; answer:= pot resources >= wanted;
a1: am -1 ;+2 false = 0.
al w0 1 ;+4 true = 1.
rs. w0 b42. ; store answer;
al w0 x3+d11 ;
al w1 x2 ; pot resources:= pot resources - rest claims;
jl. w3 c44. ;
rl. w0 b42. ;
sn w0 0 ; if answer then
jl. a2. ; begin
al w0 x3+d10 ;
al w1 x2+j16-j14; free resource:= free resources - wanted;
jl. w3 c44. ;
dl w1 x2+j14+2 ;
ss w1 x2+j16+2 ; rest claims:= rest claims - wanted;
ds w1 x2+j14+2 ;
rl w0 x2+j14+4 ;
ws w0 x2+j16+4 ;
rs w0 x2+j14+4 ;
dl w1 x2+j15+2 ;
aa w1 x2+j16+2 ; reserved:= reserved + wanted;
ds w1 x2+j15+2 ;
rl w0 x2+j15+4 ;
wa w0 x2+j16+4 ;
rs w0 x2+j15+4 ;
rl w0 x2+j16+4 ;
sn w0 0 ; if reader wanted <> 0 then
jl. a3. ; begin
sh. w0 (b11.) ; if wanted.std reader=0 then
am c32-c31; find free remote reader else
jl. w2 c31. ; find free std reader;
jd -97 ;+2 not found: boss fault 97
rl. w2 b40. ;+4 found: w1=abs reader entry + 1
ac w2 x2 ; reader entry.reserver:=-psjob rel;
hs w2 x1 ; nb: psjob is answered after return to
; main banker page to avoid paging now
jl. a4. ; end
a3: ; else begin
z.
rl. w1 b40. ; w1:= psjob rel;
jl. w3 c30. ; answer psjob;
a4: al w2 x3+d0 ; end;
wa. w2 b40. ; w2:= psjob abs;
al w1 f1 ; state:= skip;
hs w1 x2+j7 ; end;
a2: rl. w1 b40. ; w1:=psjob rel;
jl. (b41.) ; return;
e. ;
\f
; sl 10.9.71 boss 2, banker, ...56...
; allocate resources: w2 = return, w3 = page 1 abs, may wait. return:
; w3 = page 1 abs. root level procedure. uses work cells as follows:
; b50: finish ; for computation of expected finish
; b51: resource que index ; for insert between net and gross run
; b52: max finis ; end of gross run for stop
; b53: saved finis, psjob abs ;
; b54: stop ; the psjob for which the job is filled
; b55: found ; the psjob that shall be moved to the resource que
; x3+d7: saved acc job.acc, saved psjob.acc
; the procedure keeps all non-scheduled jobs in the deadly chain
; (in priority sequence). the jobs which might be executed are
; then scheduled and moved to the resource chain, which
; finally will contain all jobs - unless deadly embrace is present.
b. a20 w. ; allocate:
c48: ws. w2 b0. ;
rs w2 x3+d8 ; save relative return;
al w1 0 ; finis:=0;
rs. w1 b50. ;
jl. w2 c41. ; copy free resources to potential resources;
al w1 0 ; check and remove devices down:
jl. w2 c47. ; assign resources(psjob rel = 0);
al w2 x3+d2 ; copy priority chain to deadly chain: w2:= prior head;
a1: bz w0 x2 ; rep:
ba. w0 1 ; deadly chain(w2):= priority chain(w2) + 1;
hs w0 x2+1 ; note that deadly chain contains odd addresses.
jl. w3 c37. ; w2:= next(w2);
jl. a2. ;
jl. a1. ; if not last then goto rep;
a2: al w0 x3+d1+1 ; resource index:= addr of resource head;
rs. w0 b51. ;
al w0 0 ; resource head:= 0;
hs w0 x3+d1+1 ;
bz w0 x3+d17+j13+1; saved acc:= account job.account;
hs w0 x3+d7 ;
a3: rl. w0 b15. ; search for next to schedule:
rs. w0 b52. ; max finis:= infinite;
al w2 x3+d2+1 ;
rs. w2 b54. ; stop:= deadly head;
a15: ; fill up from net to gross time:
al w2 x3+d2+1 ; w2:= deadly head;
a4: jl. w3 c37. ; test next: w2:= next(w2);
jl. a16. ; if last then goto end que;
al w2 x2-1 ; w2:= even psjob abs;
jl. w1 c45. ; time class;
al w0 x3+d11 ; w0:= potential resources;
al w1 x2 ; w1:= rest claims;
jl. w3 c42. ; if potential resources < rest claims(psjob) then
jl. a5. ;+2 test for conv or acc activate and goto test next;
rl w0 x2+j9 ;+4
al w2 x2+1 ; w2:=odd psjob abs;
wa. w0 b50. ; if gross(psjob abs) + finis >=
sl. w0 (b52.) ; max finis then
jl. a4. ; goto test next;
\f
; sl 9.5.72 boss 2, banker, ...57...
; w2 = odd psjob abs
rs w0 x2+j20 ; next to schedule found:
rs. w0 b53. ; finis(found):= save finis:= gross(found) + finis;
rl w0 x2+j18 ;
wa. w0 b50. ; finis:= finis + net(found);
rs. w0 b50. ;
rs. w2 b55. ; save found;
rl. w2 b16. ; w2:= previous;
jl. w3 c39. ; w1:= remove(w2);
rl. w2 b51. ; put in resource que ordered after finis time:
rl. w0 b53. ; w2:= resource que index; w0:= saved finis;
a17: jl. w3 c37. ; rep: w2:= next(w2);
jl. a18. ; if not end of que and
sl w0 (x2+j20) ; finis(found) >= finis (w2) then
jl. a17. ; goto rep;
a18: rl. w0 b55. ; insert found between w2 and previous:
rl. w2 b16. ; w2:= previous;
ac w1 x3+d0 ;
wa. w1 b55. ; w1:= rel found;
jl. w3 c38. ; insert(w1, w2);
al w2 x2-1 ; w2 := even psjob abs;
al w1 x2 ; w1:= rest claims;
al w0 x3+d11 ; w0:= potential;
jl. w3 c44. ; potential:= potential - rest claims(found);
al w2 x2+1 ; w2 := odd psjob abs;
rl. w0 b52. ;
se. w0 (b15.) ; if max finis = infinite then
jl. a15. ; begin
rs. w2 b54. ; stop:= found;
rl w0 x2+j20 ;
rs. w0 b52. ; max finis:= finis(found);
jl. a15. ; end;
; goto fill up from net to gross time;
a16: rl. w0 b52. ; end que:
se. w0 (b15.) ; if max finis <> infinite then
jl. a19. ; goto simulate release;
bz w0 x3+d2+1 ;
sh w0 1 ; if dead que empty then
jl. a8. ; goto allocation ok else
jl. a9. ; goto deadly embrace;
\f
; sl 10.9.71 boss 2, banker, ...58...
a19: rl. w2 b51. ; simulate release of reserved resources:
jl. w3 c37. ; w2:= resource que index:=
c.-1, o94, z. ; (bossfault xref)
jd -94 ; next(resource que index);
rs. w2 b51. ; if end que then alarm;
al w2 x2-1 ; w2:=even psjob abs;
rl. w0 b50. ; finis:= max(finis,
sh w0 (x2+j20) ;
rl w0 x2+j20 ; finis(resource que index));
rs. w0 b50. ;
bz w0 x2+j13+1 ;
hs w0 x3+d7+1 ; w0:= save:= psjob.account;
al w1 0 ;
hs w1 x2+j13+1 ; psjob.account:= 0; not released in worst case.
ba w0 x3+d17+j13+1; add to account.account instead;
hs w0 x3+d17+j13+1; note: works also for psjob = account job.
al w0 x3+d11 ;
al w1 x2+j15-j14; potential resources:= potential resources
jl. w3 c43. ; + reserved(psjob);
al w0 x3+d11 ;
al w1 x2 ; potential resources:= potential resources
jl. w3 c43. ; + rest claim(psjob);
bz w0 x3+d7+1 ;
hs w0 x2+j13+1 ; psjob.account:= save;
al w2 x2+1 ; w2 := odd psjob abs;
se. w2 (b54.) ; if resource que index <> stop then
jl. a15. ; goto fill up from net to gross time else
jl. a3. ; goto search for next to schedule;
a5: sz w0 1<1 ; test for conv and acc activate: w0= give up cause
sl w0 j13+2-j14 ; if w0<>temp disc and w0<>conv and w0<>acc then
jl. a6. ; goto adjust and test next;
sn w0 j13+1-j14 ; w1:= psjob rel:=
am f9 ; if w0 = acc then psjob 2 else psjob 1;
al w1 f9 ; w1 = account or convert job;
rs. w2 b53. ; save current psjob abs;
am x3+d0 ;
al w2 x1 ; w2:= psjob abs;
bz w0 x2+j7 ;
se w0 f6 ; if state = waiting then
jl. a7. ; begin
al w0 f1 ; activate job:
hs w0 x2+j7 ; state:= skip;
al w0 800 ; if account job then
sn w2 x3+d17 ; priority := 800; job of 30 seconds.
hs w0 x2+j12+1 ;
dl w0 110 ;
ld w0 -13 ; arrival:= now;
rs w0 x2+j10 ; w3 spoiled;
jl. w3 c30. ; answer psjob(w1 = psjob rel); w3 = page 1 abs.
jl. w2 c40. ; compute priority chain;
a7: rl. w2 b53. ; end;
a6: al w2 x2+1 ; adjust and test next: w2:= odd psjob abs;
jl. a4. ; goto test next;
\f
; sl 10.9.71 boss 2, banker, ...59...
a8: rl w0 x3+d20 ; allocation ok:
sn w0 0 ; if request line address <> 0 then
jl. a10. ; begin remove operator message.
rl w2 x3+d9+4 ;
jl. w3 (b22.) ; lock(banker answer);
al w0 0 ;
rx w0 x3+d20 ; operation.6:=request line addr;
rs w0 x3+d9+6 ; request line addr:=0;
al w1 x3+d9 ; goto open request operation;
jl. a11. ; end;
a9: rl w0 x3+d20 ; deadly embrace:
se w0 0 ; if request line address = 0 then
jl. a10. ; begin write operator message.
rl. w2 b25. ;
jl. w3 (b2.) ; lock chain(request free);
rl. w2 (b4.) ; w2:= current corutine;
rl w0 x2+10 ;
rs w0 x3+d20 ; request line address:= operation virt;
al. w2 b20.-2 ;
a12: dl w0 x2+4 ;
ds w0 x1+4 ; copy deadly embrace message
al w2 x2+4 ; to request line;
al w1 x1+4 ;
sh. w2 b21. ;
jl. a12. ; w3 spoiled.
rl. w1 b0.+4 ; w1:= operation abs;
a11: rl. w2 b24. ; open request operation:
jl. w3 (b23.) ; open chain(w1= operation, w2 = request que);
; end;
a10: jl. w2 c41. ; distribute free resources as scheduled:
dl w1 110 ;
ld w1 -13 ; time base:= time now shift (-13);
rs. w1 b50. ;
al w2 x3+d1+1 ; copy free to potential; w2:= resource head;
a13: jl. w3 c37. ; rep: w2:= next(w2);
jl. a14. ; if last then goto exit;
rl w0 x2+j20 ;
wa. w0 b50. ; finis(w2):= finis(w2)+time base;
rs w0 x2+j20 ;
al w1 x1-1 ; w1:= psjob rel;
jl. w2 c47. ; assign resources(w1); w2:= psjob abs;
al w2 x2+1 ; w2:= chain addr;
jl. a13. ; goto rep;
a14: bz w0 x3+d7 ; exit:
hs w0 x3+d17+j13+1; accountjob.account:= saved;
rl w0 x3+d11+f21+3*f2; unclaimed accounts:=
rs w0 x3+d28 ; potential accounts class 3;
am (x3+d8) ;
jl. +b0. ; return rel to b0;
e. ; end allocate resources.
\f
; sl 10.9.71 boss 2, banker, ...60...
; testoutput: return in b30, psjob rel in b31, w3 = page 1 abs.
b. a10 w.
c49: al w1 x3+d0 ; testoutput:
wa. w1 b31. ; w1:= save:= psjob abs;
rs. w1 b31. ;
al w0 20<6+10; w0:= 20 bytes, kind 10;
jl. w3 (b28.) ; coruno output(rest claims);
rl. w1 b31. ;
al w1 x1+j15 ;
al w0 12<6+10; w0:= 12 bytes, kind 10;
jl. w3 (b28.) ; coruno output(reserved and wanted);
rl. w1 b31. ;
al w1 x1+j21 ;
al w0 16<6+10; w0:= 16 bytes, kind 10;
jl. w3 (b28.) ; coruno output(coreplace to jobname 2);
rl. w1 b31. ;
al w1 x1+j17+4 ;
al w0 14<6+10; w0:= 14 bytes, kind 10;
jl. w3 (b28.) ; coruno output(jobname 3 to expected finish);
jl. (b30.) ; return;
g27=c51-c52, c55=c2-c4 ; release
g28=c52-c53, c56=c4-c7 ; release reader
g29=c53-c54, c57=c7-c8 ; release station
g51=c54-b0 ; set claims
c58=c40-c48 ; compute priority chain
j31=d10+f21 , j32=j12+1 , j33=j7+1 , j34=d22+2
j35=j17+2 , j36=j17+6 , j37=d2+1 , j38=d1+1
j39=d10-d12 , j40=d12-d13
g18=k-b0 ; end resource allocation page
e. ;
i.e. ;
h0=s0, h1=s1 ; final check sums
i.e. ; end banker segment
e. e. ; end options, tbanker
\f
▶EOF◀