Table of Contents

1SJ

Table Of Contents

  • [00008] 1SJ - JOB SCHEDULER.
  • [00010] JOB SCHEDULER.
  • [00077] MACRO DEFINITIONS.
  • [00081] JOBSTAT - DEFINE JOB STATE ATTRIBUTES.
  • [00121] SUBSYST - GENERATE SUBSYSTEM TABLE.
  • [00147] DIRECT CELL ASSIGNMENTS.
  • [00178] TABLES.
  • [00181] TDAC - DEVICE ACTIVITY.
  • [00192] TTCU - ASSIGNED CM FL.
  • [00203] TTUE - ASSIGNED ECS FL.
  • [00220] TEPB - EJT/CP SCHEDULING PARAMETERS.
  • [00234] TJAM - SERVICE CLASS RESOURCE CONSTRAINTS.
  • [00254] TACP - ACTIVE CP-S AND PCP-S.
  • [00269] TJEC - JOB ECS FIELD LENGTH.
  • [00280] TJCM - JOB CM FIELD LENGTH (INCLUDING NFL).
  • [00291] TJPR - JOB SCHEDULING PRIORITY.
  • [00302] TJSC - JOB SERVICE CLASS.
  • [00313] SCJ - MAIN PROGRAM.
  • [00434] SUBROUTINES.
  • [00436] ASJ - ASSIGN JOB TO CONTROL POINT.
  • [00668] BST - BUILD SCHEDULING TABLES.
  • [00943] CCA - COMPUTE CPA/PCPA ADDRESS.
  • [00962] CCP - CHECK FOR FIRST OR LAST CONTROL POINT.
  • [00977] CFL - COMMIT FIELD LENGTH.
  • [01153] DDA - DETERMINE DEVICE ACTIVITY.
  • [01186] EJA - CALCULATE EJT ENTRY ADDRESS.
  • [01201] INT - INITIALIZE CELLS FOR EJT/CM SCHEDULING.
  • [01254] IRR - ISSUE ROLLOUT REQUEST.
  • [01280] IUT - ISSUE *UTEM* MONITOR FUNCTION.
  • [01335] RST - REQUEST STORAGE.
  • [01367] SCP - SELECT CONTROL POINT.
  • [01452] SFJ - SEARCH FOR JOB.
  • [02000] TEFP - TABLE OF ERROR FLAG PROCESSORS.
  • [02037] TJST - TABLE OF JOB STATE ATTRIBUTES.
  • [02069] SSA - SET SCHEDULER STATISTICAL AREA ADDRESS.
  • [02088] USD - UPDATE STATISTICAL DATA.
  • [02163] INITIALIZATION.
  • [02165] PRS - PRESET.
  • [02299] SSS - SCHEDULE SUBSYSTEM.
  • [02531] SCI - SET/CLEAR EJT INTERLOCK.
  • [02578] TSCI - SUBSYSTEM CPU PRIORITIES.
  • [02610] SIE - SCHEDULE INPUT FILES TO EJT.
  • [02672] CEE - CREATE EJT ENTRIES.
  • [02859] FLP - FIND LOWEST PRIORITY JOB.
  • [02907] IOA - CALCULATE QFT ENTRY ADDRESS.
  • [02922] SIQ - SCAN QFT.
  • [03157] PRESET.
  • [03160] PRS - PRESET *3SB*.
  • [03298] SEJ - SCAN EJT.
  • [03464] THLD - SCHEDULABLE HOST LID-S.
  • [03475] TJCT - JOB COUNTS.

Source Code

1SJ.txt
  1. IDENT 1SJ,SCJ
  2. PERIPH
  3. BASE MIXED
  4. LIST F
  5. SST
  6. *COMMENT 1SJ - JOB SCHEDULER.
  7. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  8. TITLE 1SJ - JOB SCHEDULER.
  9. SPACE 4
  10. *** 1SJ - JOB SCHEDULER.
  11. * G. R. MANSFIELD. 70/09/24.
  12. * R. E. TATE. 71/01/25.
  13. * R. M. DANISCH 81/01/28.
  14. SPACE 4
  15. *** *1SJ* IS RESPONSIBLE FOR SCHEDULING JOBS TO AND FROM
  16. * CENTRAL MEMORY.
  17. *
  18. * *1SJ* ALWAYS ATTEMPTS TO SATISFY CM/ECS FL INCREASE
  19. * REQUESTS OF JOBS ALREADY AT CONTROL POINTS BEFORE SELECTING
  20. * ROLLED OUT JOBS FOR SCHEDULING. WHEN NO CM/ECS FL INCREASE
  21. * REQUESTS ARE PRESENT, *1SJ* ATTEMPTS TO SCHEDULE ROLLED
  22. * OUT JOBS TO CONTROL POINTS. WHETHER OR NOT ANY SUCH
  23. * SCHEDULING ACTUALLY OCCURS DURING A GIVEN SCHEDULER CYCLE
  24. * DEPENDS ON MANY FACTORS INCLUDING - AVAILABILITY OF CM AND
  25. * ECS, AVAILABILITY OF CONTROL POINTS, PRIORITIES OF SCHEDULING
  26. * CANDIDATES, PRIORITIES OF JOBS PRESENTLY IN CM, AND SERVICE
  27. * CLASS CONSTRAINTS ON THE ALLOCATION OF MEMORY.
  28. *
  29. * IN ADDITION TO IT-S CM/EM SCHEDULING FUNCTION, *1SJ* ALSO
  30. * PERIODICALLY SCHEDULES INPUT FILES TO THE EJT.
  31. SPACE 4
  32. *** CALL.
  33. *
  34. *
  35. *T 18/ *1SJ*,6/ CP,11/ 0,1/ Q,24/
  36. * CP SYSTEM CONTROL POINT NUMBER.
  37. * Q = 0 NO QFT SCHEDULING.
  38. * = 1 PERFORM INPUT FILE SCHEDULING.
  39. SPACE 4
  40. ** PROGRAMS CALLED.
  41. *
  42. *
  43. * 1AJ - JOB INITIATION.
  44. * 1RI - ROLLIN JOB.
  45. SPACE 4,10
  46. ** COMMON DECKS.
  47.  
  48.  
  49. *CALL COMPMAC
  50. QUAL CPS
  51. *CALL COMSCPS
  52. QUAL *
  53. QUAL DSL
  54. *CALL COMSDSL
  55. QUAL *
  56. *CALL COMSDST
  57. LIST X
  58. *CALL COMSEJT
  59. LIST *
  60. *CALL COMSEVT
  61. *CALL COMSJIO
  62. *CALL COMSMSC
  63. *CALL COMSMSP
  64. *CALL COMSPIM
  65. LIST X
  66. *CALL COMSPRD
  67. LIST *
  68. *CALL COMSSCD
  69. *CALL COMSSCP
  70. LIST X
  71. *CALL COMSSSD
  72. LIST *
  73. *CALL COMSSSE
  74. QUAL 1DS
  75. *CALL COMS1DS
  76. QUAL *
  77. TITLE MACRO DEFINITIONS.
  78. ** MACRO DEFINITIONS.
  79.  
  80.  
  81. ** JOBSTAT - DEFINE JOB STATE ATTRIBUTES.
  82. *
  83. * JOBSTAT NAME,STATUS,SS,ES,FR,TE,PI
  84. * NAME TABLE NAME IF PRESENT.
  85. * STATUS JOB STATUS.
  86. * SS NON-BLANK IF SCHEDULABLE JOB STATUS.
  87. * ES NON-BLANK IF ERROR FLAG SET CAUSES JOB
  88. * STATUS TO BECOME SCHEDULABLE.
  89. * FR NON-BLANK IF JOB MAY BE FORCED ROLLED IN.
  90. * TE NON-BLANK IF TIMED/EVENT TYPE JOB STATUS.
  91. * PI NON-BLANK IF PRE-INITIAL JOB STEP TYPE
  92. * STATUS.
  93. * JOBSTAT A,B,C,D,E,F,G
  94. *
  95. * NOTE - ANY CHANGES TO THIS MACRO MUST BE ACCOMPANIED BY A
  96. * CORRESPONDING CHANGE TO THE *JOBSTAT* MACRO DEFINED
  97. * IN *1PP*.
  98.  
  99.  
  100. PURGMAC JOBSTAT
  101.  
  102. MACRO JOBSTAT,NAME,STATUS,SS,ES,FR,TE,PI
  103. .1 IFC NE,$NAME$$
  104. NAME INDEX
  105. .1 ELSE
  106. .V SET 0
  107. IFC NE,$SS$$,1
  108. .V SET .V+4000
  109. IFC NE,$ES$$,1
  110. .V SET .V+2000
  111. IFC NE,$FR$$,1
  112. .V SET .V+1000
  113. IFC NE,$TE$$,1
  114. .V SET .V+400
  115. IFC NE,$PI$$,1
  116. .V SET .V+200
  117. INDEX STATUS,.V
  118. .1 ENDIF
  119. ENDM
  120. SUBSYST SPACE 4,10
  121. ** SUBSYST - GENERATE SUBSYSTEM TABLE.
  122. *
  123. * SUBSYST NAME,ID,PR,PP,AUTO,DEF,DCP,CP,PROC,ABT
  124. *
  125. * ENTRY *PR* = CPU PRIORITY AT WHICH TO INITIATE THE
  126. * SUBSYSTEM.
  127. *
  128. * TABLE OF SUBSYSTEM CPU PRIORITIES.
  129. *
  130. *T 12/ PRIORITY
  131.  
  132.  
  133. PURGMAC SUBSYST
  134.  
  135. SUBSYST MACRO NM,ID,PT,PP,AU,DF,DC,CP,PR,AB
  136. .A IFC NE,$PT$$
  137. .SUB RMT
  138. INDEX (MXSI-ID),PT
  139. .SUB RMT
  140. .A ENDIF
  141. SUBSYST ENDM
  142. SPACE 4,10
  143. ** CONSTANTS.
  144.  
  145.  
  146. MXPR EQU 7777 MAXIMUM SCHEDULING PRIORITY (INTERNAL)
  147. TITLE DIRECT CELL ASSIGNMENTS.
  148. **** DIRECT CELL ASSIGNMENTS.
  149.  
  150.  
  151. T8 EQU 16 SCRATCH
  152. T9 EQU 17 SCRATCH
  153. AA EQU 20 - 24 SCRATCH (5 CELLS)
  154. TM EQU 25 - 26 SECONDS PORTION OF *RTCL* (2 CELLS)
  155. BB EQU 27 - 33 SCRATCH (5 CELLS)
  156. EO EQU 34 EJT ORDINAL
  157. IO EQU 35 QFT ORDINAL (USED ONLY IN *SIE*)
  158. TE EQU 36 LWA OF LAST *TACP* ENTRY
  159. AM EQU 37 - 40 AVAILABLE + ROLLING CM (2 CELLS)
  160. SC EQU 41 SERVICE CLASS
  161. AE EQU 42 AVAILABLE + ROLLING EM
  162. TP EQU 43 SCRATCH
  163. RM EQU 44 - 45 ROLLING CM (2 CELLS)
  164. RE EQU 46 ROLLING EM
  165. ES EQU 47 EXCESS ECS OF SERVICE CLASS
  166. EJ EQU 50 - 54 EJT BUFFER (5 CELLS)
  167. CS EQU 57 - 60 EXCESS CM OF SERVICE CLASS (2 CELLS)
  168. SP EQU 61 SERVICE CLASS OF SELECTED JOB
  169. JP EQU 62 SCHEDULING PRIORITY OF SELECTED JOB
  170. JC EQU 63 CONTROL POINT NUMBER OF SELECTED JOB
  171. JM EQU 64 CM FL REQUIRED BY SELECTED JOB
  172. JE EQU 65 ECS FL REQUIRED BY SELECTED JOB
  173. NC EQU 66 NUMBER OF CONTROL POINTS
  174. EP EQU 67 EJT ORDINAL OF SELECTED JOB
  175.  
  176.  
  177. ****
  178. TITLE TABLES.
  179. USE TABLES
  180. TABLES SPACE 4,10
  181. ** TDAC - DEVICE ACTIVITY.
  182. * ENTRY = 1 WORD.
  183. * INDEXED BY EST ORDINAL.
  184. *
  185. *T 12/ AC
  186. * AC ACTIVITY COUNT FROM MST OF DEVICE.
  187.  
  188.  
  189. TDAC BSS 0
  190. TDACE EQU 1 ENTRY SIZE
  191. TABLES SPACE 4,10
  192. ** TTCU - ASSIGNED CM FL.
  193. * ENTRY = 2 WORDS.
  194. * INDEXED BY SERVICE CLASS.
  195. *
  196. *T 24/ CM
  197. * CM CM FL ASSIGNED TO JOBS OF SERVICE CLASS.
  198.  
  199.  
  200. TTCU EQU TDAC+ESMX
  201. TTCUE EQU 2 ENTRY SIZE
  202. TABLES SPACE 4,10
  203. ** TTUE - ASSIGNED ECS FL.
  204. * ENTRY = 1 WORD.
  205. * INDEXED BY SERVICE CLASS.
  206. *
  207. *T 12/ EC
  208. * EC ECS FL ASSIGNED TO JOBS OF SERVICE CLASS.
  209.  
  210.  
  211. TTUE EQU TTCU+MXJC*TTCUE
  212. TTUEE EQU 1 ENTRY SIZE
  213. TABLES SPACE 4
  214. USE *
  215. TABLES SPACE 4,10
  216. * THE FOLLOWING TABLES ARE LOCATED TOWARD THE HIGH END OF PP
  217. * MEMORY TO FACILITATE *1SJ-S* OVERLAY STRUCTURE.
  218. TABLES SPACE 4,10
  219. TABLES SPACE 4,10
  220. ** TEPB - EJT/CP SCHEDULING PARAMETERS.
  221. * ENTRY = 4 WORDS.
  222. * INDEXED BY SERVICE CLASS.
  223. *
  224. *T 12/ LB,12/ UB,12/ WF,12/ IP
  225. * LB LOWER BOUND SCHEDULING PRIORITY OF EXECUTING JOBS.
  226. * UB UPPER BOUND SCHEDULING PRIORITY OF EXECUTING JOBS.
  227. * WF WEIGHTING FACTOR.
  228. * IP INITIAL SCHEDULING PRIORITY OF EXECUTING JOBS.
  229.  
  230.  
  231. TEPBE EQU 4 ENTRY SIZE
  232. TEPB EQU BFMS-MXJC*TEPBE
  233. TABLES SPACE 4,10
  234. ** TJAM - SERVICE CLASS RESOURCE CONSTRAINTS.
  235. * ENTRY = 6 WORDS.
  236. * INDEXED BY SERVICE CLASS.
  237. *
  238. *T 12/ MJ,12/ MCJ,24/ MCT,12/ MEJ,12/ MET
  239. * MJ MAXIMUM NUMBER OF JOBS OF SERVICE CLASS ALLOWED IN
  240. * SYSTEM (ASSIGNED TO EJT ENTRIES).
  241. * MCJ MAXIMUM CM FL/100B PER JOB OF SERVICE CLASS.
  242. * MCT MAXIMUM TOTAL CM FL/100B FOR ALL JOBS OF SERVICE
  243. * CLASS.
  244. * MEJ MAXIMUM ECS FL/100B PER JOB OF SERVICE CLASS.
  245. * MET MAXIMUM TOTAL ECS FL/100B FOR ALL JOBS OF SERVICE
  246. * CLASS.
  247.  
  248.  
  249. TJAME EQU 6 ENTRY SIZE
  250. TJAM EQU TEPB-MXJC*TJAME
  251. TABLES SPACE 4,10
  252. * THE FOLLOWING TABLES ARE OVERLAYED BY *3SA* AND *3SB*.
  253. TABLES SPACE 4,10
  254. ** TACP - ACTIVE CP-S AND PCP-S.
  255. * ENTRY = 1 WORD.
  256. * ENTRIES ARE ORDERED BY DESCENDING SCHEDULING PRIORITY. A ZERO
  257. * ENTRY TERMINATES THE TABLE AND A ZERO WORD MUST PRECEDE THE
  258. * TABLE.
  259. *
  260. *T 1/ P,1/ R,3/,7/ CP
  261. * P ROLLOUT IN PROGRESS.
  262. * R REQUEST ROLLOUT.
  263. * CP CP/PCP NUMBER.
  264.  
  265.  
  266. TACPE EQU 1 ENTRY SIZE
  267. TACP EQU TJAM-/DSL/NCPS-1-/DSL/NPPS
  268. TABLES SPACE 4,10
  269. ** TJEC - JOB ECS FIELD LENGTH.
  270. * ENTRY = 1 WORD.
  271. * INDEXED BY CP/PCP NUMBER.
  272. *
  273. *T 12/ EC
  274. * EC EM FL ASSIGNED TO CP/PCP.
  275.  
  276.  
  277. TJECE EQU 1 ENTRY SIZE
  278. TJEC EQU TACP-/DSL/NCPS-2-/DSL/NPPS
  279. TABLES SPACE 4,10
  280. ** TJCM - JOB CM FIELD LENGTH (INCLUDING NFL).
  281. * ENTRY = 1 WORD.
  282. * INDEXED BY CP/PCP NUMBER.
  283. *
  284. *T 12/ FL
  285. * FL CM FL (INCLUDING NFL) ASSIGNED TO CP/PCP.
  286.  
  287.  
  288. TJCME EQU 1 ENTRY SIZE
  289. TJCM EQU TJEC-/DSL/NCPS-1-/DSL/NPPS
  290. TABLES SPACE 4,10
  291. ** TJPR - JOB SCHEDULING PRIORITY.
  292. * ENTRY = 1 WORD.
  293. * INDEXED BY CP/PCP NUMBER.
  294. *
  295. *T 12/ PR
  296. * PR SCHEDULING PRIORITY OF JOB.
  297.  
  298.  
  299. TJPRE EQU 1 ENTRY SIZE
  300. TJPR EQU TJCM-/DSL/NCPS-1-/DSL/NPPS
  301. TABLES SPACE 4,10
  302. ** TJSC - JOB SERVICE CLASS.
  303. * ENTRY = 1 WORD.
  304. * INDEXED BY CP/PCP NUMBER.
  305. *
  306. *T 12/ SC
  307. * SC SERVICE CLASS OF JOB.
  308.  
  309.  
  310. TJSCE EQU 1 ENTRY SIZE
  311. TJSC EQU TJPR-/DSL/NCPS-1-/DSL/NPPS
  312. SCJ TITLE MAIN PROGRAM.
  313. ** SCJ - MAIN PROGRAM.
  314.  
  315.  
  316. ORG PPFW
  317.  
  318. SCJ BSS 0
  319. RJM PRS PRESET
  320. LDN **
  321. * LDN 1 (INPUT FILE SCHEDULING REQUIRED)
  322. SCJA EQU *-1 (PP INPUT REGISTER FLAGS BYTE)
  323. ZJN SCJ1 IF INPUT FILE SCHEDULING NOT REQUIRED
  324. LDN **
  325. SCJB EQU *-1 (SCHEDULER CONTROL FLAGS FROM *INWL*)
  326. LPN 6
  327. NJN SCJ1 IF SCHEDULING DISABLED OR LIMITS CHANGING
  328. EXECUTE 3SB PERFORM INPUT FILE SCHEDULING
  329.  
  330. * INITIALIZE/RESTORE CELLS FOR THE EJT/CM SCHEDULING FUNCTION.
  331.  
  332. SCJ1 RJM INT INITIALIZE CELLS FOR EJT/CM SCHEDULING
  333.  
  334. * BUILD THE FOLLOWING TABLES - *TACP*, *TJCM*, *TJEC*, *TJSC*,
  335. * *TJPR*, *TTCU*, *TTUE*. CALCULATE AVAILABLE AND ROLLING CM.
  336.  
  337. RJM BST BUILD CP AND SERVICE CLASS TABLES
  338.  
  339. * OBTAIN AVAILABLE CM AND EM FROM *ACML*.
  340.  
  341. LDK ACML
  342. CRD AM
  343. ERRNZ AE-AM-3 CODE DEPENDS ON VALUE
  344.  
  345. * CALCULATE AVAILABLE + ROLLING CM AND ECS.
  346.  
  347. LDD RM+1
  348. RAD AM+1
  349. SHN -14
  350. ADD RM
  351. RAD AM
  352. LDD RE
  353. RAD AE
  354.  
  355. * DETERMINE IF ANY JOB AT A CP OR PCP IS REQUESTING A CM
  356. * OR ECS FL INCREASE. IF SO, IT MUST BE ADDRESSED BEFORE
  357. * SCHEDULING ANOTHER JOB TO A CONTROL POINT.
  358.  
  359. LDD JC
  360. ZJN SCJ4 IF NO JOB IS REQUESTING AN FL INCREASE
  361.  
  362. * THE FOLLOWING CODE IS NECESSARY TO PREVENT A DEADLOCK IN THE
  363. * CASE OF SEVERAL OUTSTANDING CM FL INCREASE REQUESTS FOR JOBS
  364. * OF EQUAL PRIORITY, BUT INSUFFICIENT AVAILABLE CM TO SATISFY
  365. * ANY OF THE REQUESTS.
  366.  
  367. LDN PSNI
  368. STM CFLA
  369. LDM SCJD
  370. ZJN SCJ2 IF ROLLOUT NOT INHIBITED
  371. LDK PSNI ALLOW ROLLOUT OF HIGHER PRIORITY JOBS
  372. STM CFLC
  373. SCJ2 RJM CFL COMMIT FIELD LENGTH
  374. ZJN SCJ3 IF SUFFICIENT FL
  375. MJN SCJ3 IF ROLLOUT REQUEST REJECTED
  376. STD CM+1 SET CM/EM OPTION
  377. LDC 0
  378. SCJD EQU *-1 (ROLLOUT INHIBITED FLAG)
  379. NJN SCJ3 IF ROLLOUT INHIBITED
  380. LDD JC SET CP/PCP NUMBER
  381. STD CM+2
  382. MONITOR SFLM REJECT FL INCREASE
  383. LJM SCJ1 RECYCLE
  384.  
  385. SCJ3 LJM SCJ11 EXIT
  386.  
  387. SCJ4 LDM SCJB
  388. LPN 2
  389. NJN SCJ3 IF EJT SCHEDULING DISABLED
  390. RJM DDA BUILD *TDAC* TABLE
  391.  
  392. * SCAN EJT LOOKING FOR THE BEST SCHEDULABLE JOB. IF THE
  393. * SELECTED JOB IS A SUBSYSTEM, OVERLAY *3SA* WILL BE CALLED.
  394.  
  395. RJM SFJ SEARCH FOR SCHEDULING CANDIDATE
  396. LDD EP
  397. ZJN SCJ7 IF NO SCHEDULABLE JOBS FOUND
  398. STD EO SET *EO* FOR FUTURE *EJA* CALLS
  399. LDD SP
  400. LMN DSSC
  401. ZJN SCJ5 IF DEADSTART SEQUENCING JOB WAS SELECTED
  402. LDM SCJB
  403. LPN 10
  404. NJN SCJ8 IF DEADSTART SEQUENCING JOB NOT COMPLETE
  405. LDD SP
  406. LMN SSSC
  407. NJN SCJ6 IF SELECTED JOB IS NOT A SUBSYSTEM
  408. SCJ5 EXECUTE 3SA
  409. NJN SCJ10 IF SUBSYSTEM NOT SCHEDULED
  410. UJN SCJ12 RESTART *1SJ*
  411.  
  412. SCJ6 RJM SCP SELECT CONTROL POINT
  413. SCJ7 ZJN SCJ10 IF NO CP AVAILABLE
  414. MJN SCJ9 IF PCP REJECT
  415. RJM CFL COMMIT FIELD LENGTH
  416. SCJ8 NJN SCJ10 IF INSUFFICIENT FL
  417. RJM ASJ ASSIGN JOB TO CONTROL POINT
  418. RJM USD UPDATE STATISTICAL DATA
  419. LDC 0
  420. SCJC EQU *-1 (RECYCLE FLAG)
  421. ZJN SCJ11 IF RECYCLE NOT REQUESTED
  422. SCJ9 LJM SCJ1 RECYCLE ON THE EJT SCAN
  423.  
  424. SCJ10 LDN 1 SET JOB NOT SCHEDULED
  425. RJM USD UPDATE STATISTICAL DATA
  426. SCJ11 MONITOR DPPM DROP PP
  427. LDN JSCL CLEAR SCHEDULER ACTIVE FLAG
  428. CRD CM
  429. LDC -4000
  430. RAD CM
  431. LDN JSCL
  432. CWD CM
  433. SCJ12 LJM PPR EXIT TO IDLE LOOP
  434. TITLE SUBROUTINES.
  435. ASJ SPACE 4,10
  436. ** ASJ - ASSIGN JOB TO CONTROL POINT.
  437. *
  438. * REQUEST CM/ECS FL; PERFORM MINIMAL CPA INITIALIZATION; STORE
  439. * PRIORITY IN EJT; CALL *1AJ* IF JOB STATUS IS *PRJS*,
  440. * OTHERWISE CALL *1RI*.
  441. *
  442. * ENTRY (JM) = CM FL TO BE ASSIGNED TO JOB.
  443. * (JE) = ECS FL TO BE ASSIGNED TO JOB.
  444. * (EO) = EJT ORDINAL OF SELECTED JOB.
  445. * (JC) = CONTROL POINT NUMBER FOR JOB ASSIGNMENT.
  446. * (SP) = SERVICE CLASS OF SELECTED JOB.
  447. * (TM - TM+1) = SECONDS PORTION OF REAL TIME CLOCK.
  448. * (NC) = SYSTEM CONTROL POINT NUMBER.
  449. *
  450. * EXIT (A) = 0 IF JOB WAS SCHEDULED TO THE CONTROL POINT.
  451. * .NE. 0 IF SCHEDULING ATTEMPT FAILED.
  452. *
  453. * USES JE, JM, AA - AA+4, BB - BB+4, CM - CM+4, EJ - EJ+4,
  454. * T1 - T5, T6, T7.
  455. *
  456. * CALLS AST, CPR, EJA, RJC, RST.
  457. *
  458. * MACROS MONITOR.
  459.  
  460.  
  461. ASJ SUBR ENTRY/EXIT
  462. LDD JC
  463. LMC /CPS/RCPS+/CPS/ENRS SET *CCAM* OPTIONS
  464. STD CM+1
  465. LDD EO SET EJT ORDINAL FOR *CCAM*
  466. STD CM+2
  467. MONITOR CCAM
  468. LDD CM+1
  469. NJN ASJX IF *CCAM* FAILED
  470.  
  471. * REQUEST CM.
  472.  
  473. RJM EJA CALCULATE EJT ENTRY ADDRESS
  474. ADK JSNE
  475. CRD EJ
  476. ADK SCHE-JSNE
  477. CRD AA
  478. ADK SCLE-SCHE
  479. CRD BB
  480. LDC **
  481. ASJA EQU *-1 (ORIGINAL JOB STATUS)
  482. LMD EJ+4
  483. LPC 7676
  484. NJN ASJ3 IF JOB/CONNECTION/SCP STATUS CHANGED
  485. LDD JM
  486. NJN ASJ2.1 IF CM FL ALREADY SET (NOT PCP JOB)
  487. LDD BB+3 SET EM AMOUNT
  488. STD JE
  489. LDD BB+4 SET CM AMOUNT
  490. STD JM
  491. ASJ2.1 RJM RST REQUEST CM STORAGE
  492. ZJN ASJ5 IF FUNCTION ACCEPTED
  493. ASJ3 LDN /CPS/CCPS RELEASE CP, CLEAR JOB ADVANCE
  494. STD CM+1
  495. MONITOR JACM
  496. LDD NC CHANGE ASSIGNMENT TO SYSTEM CP
  497. STD CM+1
  498. MONITOR CCAM
  499. LDN 1 SET JOB NOT SCHEDULED
  500. UJP ASJX TERMINATE SCHEDULING ATTEMPT
  501.  
  502. * REQUEST ECS.
  503.  
  504. ASJ5 LDD JE
  505. ZJN ASJ6 IF NO ECS REQUESTED
  506. LMC 10000
  507. RJM RST REQUEST EM STORAGE
  508. ZJN ASJ6 IF FUNCTION ACCEPTED
  509. ASJ5.1 LDN 0 RELEASE CM FL
  510. RJM RST
  511. LDC 10000 RELEASE EM FL
  512. RJM RST
  513. UJP ASJ3 TERMINATE SCHEDULING ATTEMPT
  514.  
  515. ASJ6 LDK LOSL SAVE EJT ORDINAL OF LAST JOB SCHEDULED
  516. CRD CM
  517. LDD EO
  518. STD CM+4
  519. LDK LOSL
  520. CWD CM
  521. LDN ZERL CLEAR *TSCW* IMAGE
  522. CRD T1
  523. LDD SP
  524. RJM RJC CALCULATE JCB ADDRESS
  525. ZJN ASJ6.1 IF NO JCB FOR SERVICE CLASS
  526. ADN SVJT GET CP/CM TIME SLICE
  527. CRD BB
  528. ADN CSJT-SVJT GET SERVICE CLASS CPU PRIORITY
  529. CRD CM
  530. LDD BB+1 SET CONTROL POINT TIME SLICE
  531. STD T1+4
  532. LDD BB+2 SET CM TIME SLICE
  533. STD T1+1
  534. LDD CM SAVE SERVICE CLASS CPU PRIORITY
  535. ASJ6.1 STD T6
  536. LDN ZERL
  537. CRD BB CLEAR *CWQW* IMAGE
  538. CRD CM CLEAR *JCIW* IMAGE
  539. LDC 2000+LSCS*10-10 SET DEFAULT CPU PRIORITY
  540. STD BB
  541. LDC 6000 PRESET CPU SCHEDULING FLAGS FOR *1AJ/3AA*
  542. STD BB+1
  543. LDC SSSC*JCBE*10B SET PARAMETERS INDEX FOR NO JCB DEFINED
  544. STD BB+2
  545. LDD T6
  546. ZJN ASJ8 IF NO JCB FOR SERVICE CLASS
  547. LDD T0 SET CPU SCHEDULING PARAMETERS INDEX
  548. SHN 3
  549. STD BB+2
  550. LDD SP
  551. LMN SSSC
  552. NJN ASJ7 IF NOT A SUBSYSTEM
  553. LDM SISS
  554. STD CM+2 SET SUBSYSTEM ID
  555. SBK LSSI+1
  556. MJN ASJ7 IF PSEUDO SUBSYSTEM
  557. LDC MXSI CALCULATE SUBSYSTEM INDEX
  558. SBM SISS
  559. STD T7
  560. LDM /3SA/TSCI,T7 SET SUBSYSTEM INITIAL CPU PRIORITY
  561. ZJN ASJ7 IF CPU PRIORITY NOT SPECIFIED
  562. STD T6
  563. LDD TH SET CPU PRIORITY NOT FROM SERVICE CLASS
  564. RAD BB+1
  565. ASJ7 LDD T6 SET CPU PRIORITY IN *CWQW* IMAGE
  566. SHN 3
  567. ADC 2000
  568. STD BB
  569. LDM TEPB+1*MXJC,SP SAVE PRIORITY IN EJT DATA BLOCK
  570. ASJ8 STM ASJC
  571. LDD CP
  572. CWD AA SAVE EJT SCHEDULING FIELD FOR *1RI*
  573. ADN CWQW
  574. CWD BB SET CPU PRIORITY
  575. ADN JCIW-CWQW
  576. CWD CM SET SUBSYSTEM ID
  577. ADK TSCW-JCIW
  578. CWD T1
  579. LDC **
  580. ASJB EQU *-1 (EJT ORDINAL IF ONLY NFL WILL BE ROLLED)
  581. LMD EO
  582. NJN ASJ10 IF NO CHANGE NEEDED TO CM FL IN EJT ENTRY
  583. STD JM TELL *1RI* ONLY NFL NEEDED
  584.  
  585. * UPDATE EJT ENTRY AS FOLLOWS -
  586. * SET EXECUTION SCHEDULING PRIORITY.
  587. * SET CONTROL POINT NUMBER.
  588. * SET ROLLIN CM FL.
  589.  
  590. ASJ10 RJM EJA GET EJT ENTRY ADDRESS
  591. ADK SCHE
  592. CRD AA
  593. ADK SCLE-SCHE
  594. CRD BB
  595. LDD JM SET CM FL
  596. STD BB+4
  597. LDD EJ+4 SAVE JOB STATUS
  598. LPN 76
  599. SHN -1
  600. STD T3
  601. LMK PCJS
  602. NJN ASJ10.1 IF NOT PCP JOB
  603. LDD AA+3 SET ENTRY TIME FOR *CPR*
  604. STD T1
  605. LDD AA+4
  606. STD T2
  607. LDD SP
  608. SHN 14
  609. LMK EXQT
  610. RJM CPR COMPUTE SCHEDULING PRIORITY
  611. UJN ASJ10.2 STORE PRIORITY IN EJT
  612.  
  613. ASJ10.1 LDC ** SET SCHEDULING PRIORITY
  614. ASJC EQU *-1
  615. ASJ10.2 STD AA+4
  616. LDD JC SET CP NUMBER
  617. STD AA+3
  618. RJM EJA UPDATE EJT ENTRY
  619. ADK SCHE
  620. CWD AA
  621. ADK SCLE-SCHE
  622. CWD BB
  623. LDN ZERL CLEAR PP INPUT REGISTER IMAGE
  624. CRD AA
  625. LDD EJ+4
  626. LDM TJST,T3
  627. SHN 21-7
  628. MJN ASJ11 IF PRE-INITIAL JOB STATE
  629. LDC 3RI1R
  630. UJP ASJ13 CALL *1RI*
  631.  
  632. ASJ11 LDD SP
  633. LMN SSSC
  634. NJN ASJ12 IF NOT SUBSYSTEM
  635. LDM SISS
  636. ADC -LSSI
  637. MJN ASJ12 IF SUBSYSTEM NOT IN *SSAT*
  638. LDC PLSI CHECK FOR CYBIS
  639. LMM SISS
  640. NJN ASJ11.1 IF NOT CYBIS
  641. LDM SISS FETCH *SSAT* ENTRY (EJT ORDINAL)
  642. ADC /3SA/FEAF*10000
  643. RJM /3SA/AST
  644. NJN ASJ12 IF ALREADY ACTIVE
  645. ASJ11.1 LDD EO
  646. STD T1
  647. LDM SISS
  648. ADC /3SA/SEAF*10000
  649. RJM /3SA/AST STORE EJT ORDINAL IN SSAT TABLE
  650. ASJ12 AOD AA+2 SET *1AJ* FUNCTION 1
  651. LDC 3RJ1A CALL *1AJ*
  652. ASJ13 STD AA
  653. SHN -6
  654. SCN 77
  655. LMD JC
  656. STD AA+1
  657. LDD MA WRITE *1RI*/*1AJ* CALL TO MESSAGE BUFFER
  658. CWD AA
  659. LDN 0 CLEAR PRIORITY REQUEST FLAG
  660. STD CM+1
  661. MONITOR RPPM CALL *1RI*/*1AJ*
  662. LDD NC CHANGE ASSIGNMENT BACK TO SYSTEM CP
  663. STD CM+1
  664. MONITOR CCAM
  665. * LDN 0 SET JOB SCHEDULED
  666. LJM ASJX RETURN
  667. BST SPACE 4,20
  668. ** BST - BUILD SCHEDULING TABLES.
  669. *
  670. * BUILD SCHEDULING TABLES AND CHECK FOR JOBS HAVING FL INCREASE
  671. * REQUESTS OUTSTANDING. IF ANY ARE FOUND, SELECT THE HIGHEST
  672. * PRIORITY ONE FOR SCHEDULING.
  673. *
  674. * ENTRY (JC) = 0.
  675. * (JP) = 0.
  676. * (RM - RM+1) = 0.
  677. * (RE) = 0.
  678. *
  679. * EXIT (JC) = CP NUMBER OF HIGHEST PRIORITY JOB REQUESTING AN
  680. * FL INCREASE.
  681. * = 0 IF NO OUTSTANDING FL INCREASE REQUESTS.
  682. *
  683. * USES CS, EO, EP, ES, JC, JE, JM, JP, RE, SC, SP, TE, TP,
  684. * AA - AA+4, BB - BB+4, CM - CM+4, EJ - EJ+4, RM - RM+1,
  685. * T0 - T6.
  686. *
  687. * CALLS CCA, CCP, CPR, EJA.
  688.  
  689.  
  690. BST SUBR ENTRY/EXIT
  691.  
  692. * INITIALIZE *TTCU* AND *TTUE* TABLES.
  693.  
  694. LDN MXJC-1
  695. STD T1
  696. BST1 LDN 0
  697. STM TTCU,T1
  698. STM TTCU+1*MXJC,T1
  699. STM TTUE,T1
  700. SOD T1 DECREMENT INDEX
  701. PJN BST1 IF NOT FINISHED
  702. LDC TACP SET END OF *TACP* TABLE
  703. STD TE
  704. LDN 0
  705. STM TACP-1 MARK START OF *TACP* TABLE
  706. STI TE MARK END OF *TACP* TABLE
  707. STD TP INITIALIZE CP/PCP NUMBER
  708.  
  709. * SCAN CONTROL POINT AREAS CALCULATING AVAILABLE CM AND ECS.
  710. * CHECK FOR OUTSTANDING FL INCREASE REQUESTS.
  711.  
  712. BST2 AOD TP ADVANCE CP/PCP NUMBER
  713. LMD NC
  714. ZJN BST2 IF SYSTEM CONTROL POINT
  715. LMD NC
  716. LMC **
  717. BSTB EQU *-1
  718. ZJP BSTX IF END OF SCAN
  719. LDD TP SET CP/PCP ADDRESS
  720. RJM CCA
  721. ADK FLSW READ CM CONTROL WORD OF CURRENT CP/PCP
  722. CRD CM
  723. ADN ECSW-FLSW READ EM CONTROL WORD OF CURRENT CP/PCP
  724. CRD T0
  725.  
  726. * STORE CP/PCP *TP* CM FL IN *TJCM* TABLE.
  727.  
  728. LDD CM+4
  729. ADD CM NFL
  730. STM TJCM-1,TP
  731. STD T5
  732.  
  733.  
  734. * STORE CONTROL POINT *TP* ECS FL IN *TJEC* TABLE.
  735.  
  736. LDD T0+4
  737. STM TJEC-1,TP
  738. STD T6
  739.  
  740. * CHECK FOR AVAILABLE CONTROL POINT.
  741.  
  742. LDD TP SET CP/PCP ADDRESS
  743. RJM CCA
  744. ADK JCIW
  745. CRD CM
  746. ADN TFSW-JCIW
  747. CRD EJ
  748. LDD EJ
  749. NJN BST6 IF CP/PCP IS OCCUPIED
  750. LDD TP
  751. SBD NC
  752. PJN BST5 IF PCP
  753. LDM SCPA
  754. ZJN BST4 IF NO FREE CP YET SET
  755. RJM CCP
  756. NJN BST5 IF CURRENT CP IS NEITHER FIRST NOR LAST
  757. BST4 LDD TP SAVE NUMBER OF FREE CONTROL POINT
  758. STM SCPA
  759. BST5 LJM BST2 CONTINUE CONTROL POINT SCAN
  760.  
  761. BST6 STD EO SAVE EJT ORDINAL
  762. RJM EJA CALCULATE EJT ENTRY ADDRESS
  763. ADK JSNE
  764. CRD EJ
  765. ADN SCHE-JSNE
  766. CRD AA
  767. ADN SCLE-SCHE
  768. CRD BB
  769. LDD BB GET SERVICE CLASS AND FORCED ROLL FLAGS
  770. SHN 14
  771. STM TJSC-1,TP
  772. STD SC
  773. SHN 1
  774. PJN BST7 IF NOT FORCED ROLLIN
  775. LDN 1 SET NO ROLLOUT FLAG
  776. STD CM+2
  777. BST7 LDD AA+4 SET CP JOB SCHEDULING PRIORITY
  778. STM TJPR-1,TP
  779. LDD CM+1 CHECK *CPUPFM* ACTIVE
  780. LPN 10
  781. NJN BST8 IF *CPUPFM* ACTIVE
  782. LDD CM+3 SET/CLEAR NO ROLLOUT FLAG
  783. LPC 1000 MASK *DIS* FLAG
  784. ADD CM+2
  785. BST8 STM BSTA
  786. LDD EJ+4
  787. LPN 76
  788. LMN EXJS*2
  789. ZJN BST8.1 IF JOB IS AT A CP
  790. LMK PCJS*2&EXJS*2
  791. NJN BST8.2 IF NOT A PCP JOB
  792. LDD AA+3 SET ENTRY TIME FOR *CPR*
  793. STD T1
  794. LDD AA+4
  795. STD T2
  796. LDD SC
  797. SHN 14
  798. LMK EXQT
  799. RJM CPR COMPUTE SCHEDULING PRIORITY
  800. STM TJPR-1,TP
  801. LDN 0
  802.  
  803. * CHECK FOR ROLLOUT ACTIVITY AT CP/PCP. ACCUMULATE CM
  804. * AND ECS FL ASSIGNED TO THE JOB IF IT IS ROLLING OUT.
  805.  
  806. BST8.1 STD EJ+4
  807. LDD TP SET CP/PCP ADDRESS
  808. RJM CCA
  809. ADK STSW
  810. CRD CM
  811. ADN FLIW-STSW
  812. CRD AA
  813. LDD CM+2
  814. SHN 21-0
  815. BST8.2 PJN BST9 IF JOB NOT ROLLING OUT
  816. LDD TP
  817. SBD NC
  818. PJN BST8.4 IF JOB AT PCP
  819. LDM SCPB
  820. ZJN BST8.3 IF NO ROLLING CP YET SET
  821. RJM CCP
  822. NJN BST8.4 IF CURRENT CP NEITHER FIRST NOR LAST
  823. BST8.3 LDD TP SAVE NUMBER OF ROLLING CP
  824. STM SCPB
  825. BST8.4 LDD CM+2
  826. SHN 21-7
  827. MJN BST8.5 IF PSEUDO-ROLLOUT IN PROGRESS
  828. LDD T5 ACCUMULATE ROLLING CM
  829. RAD RM+1
  830. SHN -14
  831. RAD RM
  832. LDD T6 ACCUMULATE ROLLING ECS
  833. RAD RE
  834. BST8.5 LJM BST2 CONTINUE CP/PCP SCAN
  835.  
  836. * JOB IS NOT ROLLING OUT. CHECK FOR AN OUTSTANDING FL INCREASE
  837. * REQUEST. IF ONE IS FOUND AT THIS CONTROL POINT, SEE IF THE
  838. * JOB-S SCHEDULING PRIORITY IS SUFFICIENTLY HIGH TO MAKE THE
  839. * JOB THE BEST SCHEDULING CANDIDATE FOUND SO FAR.
  840.  
  841. BST9 LDD SC
  842. SBN MXJC
  843. PJN BST10 IF NO JCB FOR THIS SERVICE CLASS
  844. LDD T5 ACCUMULATE CM ASSIGNED TO SERVICE CLASS
  845. RAM TTCU+1*MXJC,SC
  846. SHN -14
  847. RAM TTCU,SC
  848. LDD T6 ACCUMULATE ECS ASSIGNED TO SERVICE CLASS
  849. RAM TTUE,SC
  850. BST10 LDD EJ+4
  851. NJN BST8.5 IF JOB IS ROLLING IN
  852. LDM TJPR-1,TP
  853. SBD JP
  854. MJN BST12 IF CP HAS LOWER PRIORITY THAN CURRENT HIGH
  855. LDD AA+4
  856. ZJN BST11 IF NO CM FL INCREASE REQUESTED
  857. LDD AA+1
  858. SHN 21-0
  859. MJN BST12 IF REQUEST WAS ALREADY REJECTED
  860. LDD AA+4
  861. SBD T5
  862. ZJN BST11 IF CM ALREADY ASSIGNED
  863. MJN BST11 IF CM ALREADY ASSIGNED
  864.  
  865. * THIS CONTROL POINT IS THE BEST SCHEDULING CANDIDATE FOUND SO
  866. * FAR. SAVE SCHEDULING INFORMATION.
  867.  
  868. STD JM
  869. LDN 0 CLEAR ECS REQUIREMENT
  870. STD JE
  871. UJN BST13 GO FINISH SAVING SCHEDULING INFORMATION
  872.  
  873. BST11 LDD AA+3
  874. ZJN BST14.1 IF NO ECS FL INCREASE REQUESTED
  875. LDD AA+1
  876. SHN 21-1
  877. BST12 MJN BST14.1 IF REQUEST WAS ALREADY REJECTED
  878. LDD AA+3
  879. SBD T6
  880. ZJN BST14.1 IF ECS ALREADY ASSIGNED
  881. MJN BST14.1 IF ECS ALREADY ASSIGNED
  882.  
  883.  
  884. * THIS CONTROL POINT IS THE BEST SCHEDULING CANDIDATE SO
  885. * FAR. SAVE SCHEDULING INFORMATION.
  886.  
  887. STD JE
  888. LDN 0 CLEAR CM REQUIREMENT
  889. STD JM
  890. BST13 LCN 0 PREVENT SERVICE CLASS ECS LIMIT
  891. STD ES
  892. STD CS+1 PREVENT SERVICE CLASS CM LIMIT
  893. LDN 37
  894. STD CS
  895. LDM TJPR-1,TP SAVE SCHEDULING PRIORITY
  896. STD JP
  897. LDD TP SAVE CP/PCP NUMBER
  898. STD JC
  899. LDD EO SAVE EJT ORDINAL
  900. STD EP
  901. LDD SC SAVE SERVICE CLASS
  902. STD SP
  903. BST14 LDC **
  904. BSTA EQU *-1 (NO ROLLOUT FLAG)
  905. STM SCJD (SET/CLEAR NO REJECT FLAG)
  906. BST14.1 LDM BSTA
  907. NJN BST18 IF ROLLOUT MUST NOT OCCUR
  908.  
  909. * BUILD *TACP* ENTRY FOR THIS CONTROL POINT.
  910.  
  911. LDC TACP-1 SET START OF *TACP* TABLE
  912. STD T1
  913. BST15 AOD T1 INCREMENT *TACP* INDEX
  914. LDI T1
  915. ZJN BST17 IF END OF *TACP* TABLE
  916. STD T2
  917. LDM TJPR-1,T2
  918. SBM TJPR-1,TP
  919. PJN BST15 IF PRIORITY OF *TP* .LE. *TACP* ENTRY
  920.  
  921. * MOVE ALL *TACP* ENTRIES THAT ARE BEYOND CURRENT POSITION
  922. * ONE SLOT TOWARD THE END OF THE *TACP* TABLE.
  923.  
  924. LDD TE
  925. STD T2
  926. BST16 LDM -1,T2
  927. STI T2
  928. SOD T2
  929. LMD T1
  930. NJN BST16 IF MOVE NOT COMPLETE
  931.  
  932. * ALL ENTRIES OF LOWER PRIORITY HAVE BEEN MOVED ONE SLOT
  933. * TOWARD END OF *TACP* TABLE. STORE CP/PCP NUMBER IN
  934. * VACATED *TACP* ENTRY.
  935.  
  936. BST17 LDD TP
  937. STI T1
  938. AOD TE ADVANCE END OF *TACP* TABLE POINTER
  939. LDN 0 MARK END OF *TACP* TABLE
  940. STI TE
  941. BST18 LJM BST2 CONTINUE CP/PCP SCAN
  942. CCA SPACE 4,10
  943. ** CCA - COMPUTE CPA/PCPA ADDRESS.
  944. *
  945. * ENTRY (A) = CP/PCP NUMBER.
  946. * (NC) = NUMBER OF CONTROL POINTS.
  947. *
  948. * EXIT (A) = CPA/PCPA ADDRESS.
  949.  
  950.  
  951. CCA1 ADD NC
  952. SHN 7
  953.  
  954. CCA SUBR ENTRY/EXIT
  955. SBD NC
  956. MJN CCA1 IF CONTROL POINT
  957. ZJN CCA1 IF SYSTEM CONTROL POINT
  958. SHN 7
  959. CCAA ADC ** (PCP AREAS BASE ADDRESS)
  960. UJN CCAX RETURN
  961. CCP SPACE 4,10
  962. ** CCP - CHECK FOR FIRST OR LAST CONTROL POINT.
  963. *
  964. * ENTRY (A) = CONTROL POINT NUMBER.
  965. * (NC) = SYSTEM CONTROL POINT NUMBER.
  966. *
  967. * EXIT (A) = 0 IF CONTROL POINT 1 OR LAST CONTROL POINT.
  968.  
  969.  
  970. CCP SUBR ENTRY/EXIT
  971. SBN 1
  972. ZJN CCPX IF CP 1
  973. ADN 2
  974. LMD NC
  975. UJN CCPX RETURN
  976. CFL SPACE 4,30
  977. ** CFL - COMMIT FIELD LENGTH.
  978. *
  979. * SCAN THE *TACP* TABLE IN AN ATTEMPT TO FIND ENOUGH CM/ECS
  980. * ASSIGNED TO LOWER PRIORITY JOBS TO ACCOMODATE THE JOB
  981. * SELECTED FOR SCHEDULING. REQUEST ROLLOUT FOR ONLY AS MANY
  982. * SUCH JOBS AS NECESSARY.
  983. *
  984. * ENTRY (TE) = LWA OF *TACP* TABLE.
  985. * (AM - AM+1) = AVAILABLE + ROLLING CM.
  986. * (AE) = AVAILABLE + ROLLING ECS.
  987. * (JC) = CP NUMBER OF JOB REQUESTING FL INCREASE
  988. * (IF ANY).
  989. * (JP) = SCHEDULING PRIORITY OF SELECTED JOB.
  990. * (JM) = CM FL REQUIRED BY SELECTED JOB.
  991. * (JE) = ECS FL REQUIRED BY SELECTED JOB.
  992. * (SP) = SERVICE CLASS OF SELECTED JOB.
  993. * (CS - CS+1) = EXCESS CM OF SERVICE CLASS.
  994. * (ES) = EXCESS ECS OF SERVICE CLASS.
  995. *
  996. * EXIT (A) = 0 IF SUFFICIENT CM/ECS AFTER ROLLOUTS.
  997. * = 1 IF INSUFFICIENT CM.
  998. * = 2 IF INSUFFICIENT ECS.
  999. * .LT. 0 IF ROLLOUT REQUEST WAS REJECTED.
  1000. *
  1001. * USES T1, T3 - T7, CM - CM+4 TP.
  1002. *
  1003. * CALLS IRR.
  1004.  
  1005.  
  1006. * REQUEST ROLLOUT FOR ANY JOB WHOSE ROLLOUT REQUEST BIT (BIT
  1007. * 10D) IS SET IN ITS *TACP* ENTRY.
  1008.  
  1009. CFL11 AOD TP INCREMENT *TACP* POINTER
  1010. LDI TP
  1011. ZJN CFLX IF *TACP* SCAN COMPLETE
  1012. SHN 21-12
  1013. PJN CFL11 IF ROLLOUT REQUEST BIT CLEAR
  1014. SHN 12-21 GET CP/PCP NUMBER
  1015. LPC 177
  1016. ERRNZ /CPS/ROSR CODE DEPENDS ON VALUE
  1017. RJM IRR ISSUE *ROCM*
  1018. ZJN CFL11 IF ROLLOUT REQUEST WAS ACCEPTED
  1019. LCN 0 SET RETURN STATUS
  1020.  
  1021. CFL SUBR ENTRY/EXIT
  1022. LDD AM
  1023. SHN 14
  1024. LMD AM+1
  1025. SBD JM
  1026. SHN -21
  1027. NJN CFL0 IF INSUFFICIENT CM
  1028. LDD AE
  1029. SBD JE
  1030. SHN -21
  1031. ZJN CFLX IF SUFFICIENT EM
  1032. CFL0 LDD TE INITIALIZE *TACP* POINTER
  1033. STD TP
  1034. LDD AM INITIALIZE CM ACCUMULATOR
  1035. STD T5
  1036. LDD AM+1
  1037. STD T6
  1038. LDD AE INITIALIZE ECS ACCUMULATOR
  1039. STD T7
  1040.  
  1041. * ACCUMULATE CM AND ECS ASSIGNED TO LOWER PRIORITY JOBS. SET
  1042. * THE REQUEST ROLLOUT BIT IN THE *TACP* ENTRY OF EACH LOWER
  1043. * PRIORITY JOB.
  1044.  
  1045. CFL1 SOD TP DECREMENT *TACP* POINTER
  1046. LDI TP
  1047. ZJN CFL2 IF END OF *TACP* TABLE REACHED
  1048. STD T1
  1049. LMD JC
  1050. ZJN CFL1 IF CP SELECTED FOR FL INCREASE
  1051. LDD JP COMPARE SCHEDULING PRIORITIES
  1052. SBM TJPR-1,T1
  1053. MJN CFL1 IF SELECTED JOB HAS LOWER PRIORITY
  1054. * PSN (LOCKED IN JOB REQUIRES FL INCREASE)
  1055. CFLC EQU *-1
  1056. ZJN CFL1 IF PRIORITIES ARE EQUAL
  1057. * PSN (IF SELECTED JOB WANTS FL INCREASE)
  1058. CFLA EQU *-1
  1059. LDC 2000
  1060. RAI TP SET ROLLOUT FLAG IN *TACP* ENTRY
  1061. SHN 21-13
  1062. MJN CFL1 IF ROLLOUT IN PROGRESS
  1063. LDM TJCM-1,T1 ACCUMULATE CM OF ROLLABLE JOB
  1064. RAD T6
  1065. SHN -14
  1066. RAD T5
  1067. LDM TJEC-1,T1 ACCUMULATE ECS OF ROLLABLE JOB
  1068. RAD T7
  1069. UJN CFL1 CONTINUE *TACP* TABLE SCAN
  1070.  
  1071. CFL2 LDD T5
  1072. SHN 14
  1073. LMD T6
  1074. SBD JM
  1075. PJN CFL4 IF ENOUGH CM CAN BE OBTAINED VIA ROLLOUT
  1076. LDN 1 INDICATE INSUFFICIENT CM TO *SCJ*
  1077. CFL3 LJM CFLX RETURN
  1078.  
  1079. CFL4 STD T6 SAVE EXCESS CM AMOUNT
  1080. SHN -14
  1081. STD T5
  1082. LDD T7
  1083. SBD JE
  1084. PJN CFL5 IF ENOUGH ECS CAN BE OBTAINED VIA ROLLOUT
  1085. LDN 2 INDICATE INSUFFICIENT ECS TO *SCJ*
  1086. UJN CFL3 RETURN
  1087.  
  1088. CFL5 STD T7 SAVE EXCESS ECS AMOUNT
  1089. ADD T5
  1090. ADD T6
  1091. ZJN CFL7 IF NO EXCESS CM/ECS
  1092.  
  1093. * DISQUALIFY AS MANY JOBS AS POSSIBLE FROM ROLLOUT.
  1094.  
  1095. LDD TP INITIALIZE *TACP* TABLE POINTER
  1096. STD T4
  1097. CFL6 AOD T4 INCREMENT *TACP* POINTER
  1098. LDI T4
  1099. NJN CFL8 IF NOT END OF *TACP* TABLE
  1100. CFL7 LJM CFL11 ROLLOUT JOBS
  1101.  
  1102. CFL8 SHN 21-12
  1103. PJN CFL6 IF JOB IS NOT A ROLLOUT CANDIDATE
  1104. SHN 12-21 GET CP/PCP NUMBER
  1105. LPC 177
  1106. STD T3
  1107. LDD T5
  1108. SHN 14
  1109. LMD T6
  1110. SBM TJCM-1,T3
  1111. CFL9 MJN CFL6 IF JOB-S CM FL TOO BIG TO REMAIN AT CP/PCP
  1112. STD CM+1 SAVE CM AMOUNT
  1113. SHN -14
  1114. STD CM
  1115. LDD T7
  1116. SBM TJEC-1,T3
  1117. MJN CFL6 IF JOB-S EM FL TOO BIG TO REMAIN AT CP/PCP
  1118. STD CM+2 SAVE EM AMOUNT
  1119. LDM TJSC-1,T3
  1120. LMD SP
  1121. NJN CFL10 IF DIFFERENT SERVICE CLASSES
  1122. LDD CS
  1123. SHN 14
  1124. LMD CS+1
  1125. SBM TJCM-1,T3
  1126. MJN CFL9 IF MAXIMUM CM FOR SERVICE CLASS EXCEEDED
  1127. STD CM+4 SAVE NEW EXCESS CM
  1128. SHN -14
  1129. STD CM+3
  1130. LDD ES
  1131. SBM TJEC-1,T3
  1132. MJN CFL9 IF MAXIMUM ECS FOR SERVICE CLASS EXCEEDED
  1133. STD ES SAVE NEW EXCESS ECS
  1134. LDD CM+3 SAVE NEW EXCESS CM
  1135. STD CS
  1136. LDD CM+4
  1137. STD CS+1
  1138. CFL10 LDD CM UPDATE REMAINING CM AMOUNT
  1139. STD T5
  1140. LDD CM+1
  1141. STD T6
  1142. LDD CM+2 UPDATE REMAINING ECS AMOUNT
  1143. STD T7
  1144. LDC -2000 CLEAR ROLLOUT BIT IN *TACP* ENTRY
  1145. RAI T4
  1146. LJM CFL6 CONTINUE *TACP* SCAN
  1147.  
  1148. CFLB BSS 0
  1149. LOC CFLA
  1150. ZJN CFL1 IF PRIORITIES ARE EQUAL
  1151. LOC *O
  1152. DDA SPACE 4,10
  1153. ** DDA - DETERMINE DEVICE ACTIVITY.
  1154. *
  1155. * BUILD *TDAC* TABLE.
  1156. *
  1157. * USES T1 - T5, CM - CM+4.
  1158. *
  1159. * MACROS SFA.
  1160.  
  1161.  
  1162. DDA2 STM TDAC+1 CLEAR PCP ACTIVITY
  1163.  
  1164. DDA SUBR ENTRY/EXIT
  1165. LDN ESTP
  1166. CRD T1
  1167. LDN NOPE-1 INITIALIZE EST ORDINAL FOR SEARCH
  1168. STD T1
  1169. DDA1 AOD T1 INCREMENT EST ORDINAL
  1170. LMD T1+3
  1171. ZJN DDA2 IF END OF EST SCAN
  1172. SFA EST,T1
  1173. ADK EQDE
  1174. CRD CM
  1175. LDD CM
  1176. SHN 21-13
  1177. PJN DDA1 IF NOT MASS STORAGE
  1178. LDD CM+4 READ MST ENTRY
  1179. SHN 3
  1180. ADN DALL
  1181. CRD CM
  1182. LDD CM SAVE DEVICE ACTIVITY IN *TDAC* TABLE
  1183. STM TDAC,T1
  1184. UJN DDA1 CONTINUE EST SCAN
  1185. EJA SPACE 4,10
  1186. ** EJA - CALCULATE EJT ENTRY ADDRESS.
  1187. *
  1188. * ENTRY (EO) = EJT ORDINAL.
  1189. *
  1190. * EXIT (A) = EJT ENTRY ADDRESS.
  1191. *
  1192. * MACROS CFI.
  1193.  
  1194.  
  1195. EJA SUBR ENTRY/EXIT
  1196. CFI EJT,EO CALCULATE ENTRY OFFSET
  1197. ADC **
  1198. EJAA EQU *-1 (EJT FWA)
  1199. UJN EJAX RETURN
  1200. INT SPACE 4,10
  1201. ** INT - INITIALIZE CELLS FOR EJT/CM SCHEDULING.
  1202. *
  1203. * ENTRY (SCJC) .NE. 0 IF RECYCLE CALL.
  1204. *
  1205. * USES JP, JC, EP, RM - RM+1, RE, TM - TM+4, CM - CM+4.
  1206. *
  1207. * CALLS SSA.
  1208.  
  1209.  
  1210. INT1 RJM SSA SET STATISTICAL AREA ADDRESS
  1211. CRM SPST+JS0S*5,T1 READ SCHEDULER STATISTICS
  1212.  
  1213. INT SUBR ENTRY/EXIT
  1214. LDN 0
  1215. STD JP PRIORITY OF SELECTED JOB
  1216. STD JC CP NUMBER OF JOB REQUESTING FL INCREASE
  1217. STD EP EJT ORDINAL OF SELECTED JOB
  1218. STD RM ROLLING CM ACCUMULATOR
  1219. STD RM+1
  1220. STD RE ROLLING ECS ACCUMULATOR
  1221. LDC RTCL READ REAL-TIME CLOCK
  1222. CRD TM
  1223. LDM SCJC
  1224. ZJN INT1 IF NOT RECYCLE
  1225.  
  1226. * RESET CELLS AND INSTRUCTIONS FOR RECYCLE.
  1227.  
  1228. LDN 0
  1229. STM SCJC
  1230. STM USDA
  1231. STM USDB
  1232. STM USDC
  1233. STM SCPA
  1234. STM SCPB
  1235. STM SFJK
  1236. STM SFJL
  1237. LCN 0
  1238. STM SFJG
  1239. STM SFJM
  1240. LDC LDDI+EP
  1241. STM SFJB
  1242. LDC SFJ29
  1243. STM SFJH
  1244. LDC LDDI+SC
  1245. STM SFJI
  1246. LDM CFLB
  1247. STM CFLA
  1248. LDM SFJQ
  1249. STM SFJC
  1250. LDC SOMI
  1251. STM SFJR
  1252. LJM INTX RETURN
  1253. IRR SPACE 4,15
  1254. ** IRR - ISSUE ROLLOUT REQUEST.
  1255. *
  1256. * ENTRY (A) = 6/ OP,12/ CP.
  1257. * OP *ROCM* OPTIONS.
  1258. * CP CP/PCP TO ROLL.
  1259. *
  1260. * EXIT (A) = 0 IF ROLLOUT REQUEST WAS ACCEPTED.
  1261. * JOBS PREEMPTED STATISTIC UPDATED.
  1262. *
  1263. * USES CM - CM+4.
  1264. *
  1265. * MACROS MONITOR.
  1266.  
  1267.  
  1268. IRR SUBR ENTRY/EXIT
  1269. STD CM+2 STORE CP/PCP NUMBER
  1270. SHN -14
  1271. LMC 4000 SET ALTERNATE CP/PCP OPTION
  1272. STD CM+1
  1273. AOM SPST+JS1S*5+2 INCREMENT JOBS PREEMPTED
  1274. SHN -14
  1275. RAM SPST+JS1S*5+1
  1276. MONITOR ROCM REQUEST ROLLOUT
  1277. LDD CM+1
  1278. UJN IRRX RETURN
  1279. IUT SPACE 4,20
  1280. ** IUT - ISSUE *UTEM* MONITOR FUNCTION.
  1281. *
  1282. * ENTRY (A) = 1/ F,1/ I,1/ 0,3/ C,12/ P
  1283. * F = 0 IF EJT ENTRY UPDATE.
  1284. * = 1 IF QFT ENTRY UPDATE.
  1285. * I = 0 IF INTERLOCK SHOULD BE SET.
  1286. * = 1 IF INTERLOCK SHOULD BE CLEARED.
  1287. * C = NUMBER OF *UTEM* PARAMETER WORDS.
  1288. * = 0 IF INTERLOCK REQUEST.
  1289. * P = PARAMETER LIST ADDRESS.
  1290. *
  1291. * EXIT (A) = 0 IF *UTEM* FUNCTION WAS SUCCESSFUL.
  1292. * .NE. 0 IF *UTEM* VERIFICATION FAILED.
  1293. *
  1294. * USES CM - CM+4.
  1295. *
  1296. * CALLS EJA, IOA.
  1297. *
  1298. * MACROS MONITOR.
  1299.  
  1300.  
  1301. IUT SUBR ENTRY/EXIT
  1302. STM IUTB PARAMETER LIST ADDRESS
  1303. LPC -7777
  1304. SHN 1
  1305. STD CM TABLE INDICATOR
  1306. SCN 1 SAVE INTERLOCK FLAG
  1307. SHN 1
  1308. STD CM+2
  1309. SHN -14-2
  1310. STD CM+1 NUMBER OF PARAMETER WORDS
  1311. LDM IUTC,CM USE TABLE FLAG TO SET SUBROUTINE ADDRESS
  1312. STM IUTA
  1313. RJM ** CALCULATE TABLE ADDRESS
  1314. IUTA EQU *-1
  1315. STD CM+4
  1316. SHN -14
  1317. STD CM+3
  1318. LDD CM+1
  1319. ZJN IUT1 IF NO PARAMETER WORDS
  1320. LDD MA WRITE PARAMETERS TO MESSAGE BUFFER
  1321. CWM **,CM+1
  1322. IUTB EQU *-1
  1323. IUT1 LDD CM+2 SET/CLEAR INTERLOCK FLAG
  1324. SHN 5
  1325. RAD CM+1
  1326. LDN 0
  1327. STD CM+2
  1328. MONITOR UTEM
  1329. LDD CM+1
  1330. LJM IUTX RETURN
  1331.  
  1332. IUTC CON EJA CALCULATE EJT ENTRY ADDRESS
  1333. CON /3SB/IOA CALCULATE QFT ENTRY ADDRESS
  1334. RST SPACE 4,15
  1335. ** RST - REQUEST STORAGE.
  1336. *
  1337. * ENTRY (A) = 6/ T,12/ FL.
  1338. * T = MEMORY TYPE. 0 IF CM, 1 IF EM.
  1339. * FL = STORAGE AMOUNT.
  1340. * (AA - AA+4) = *SCHE* WORD OF EJT ENTRY.
  1341. * (EJ - EJ+4) = *JSNE* WORD OF EJT ENTRY.
  1342. *
  1343. * EXIT (A) = 0 IF REQUEST ACCEPTED, ELSE NON-ZERO.
  1344. *
  1345. * USES CM - CM+4.
  1346. *
  1347. * MACROS MONITOR.
  1348.  
  1349.  
  1350. RST SUBR ENTRY/EXIT
  1351. STD CM+1 SET FL
  1352. SHN -14 SET REQUEST TYPE
  1353. STD CM+2
  1354. LDD EJ+4
  1355. SHN -1
  1356. LPN 37
  1357. LMK PCJS
  1358. NJN RST1 IF JOB NOT AT PCP
  1359. LDC 4000 SET PSEUDO-ROLLIN FLAG
  1360. RAD CM+2
  1361. LDD AA+1 STORE PCP NUMBER IN *RSTM* REQUEST
  1362. STD CM+3
  1363. RST1 MONITOR RSTM REQUEST STORAGE
  1364. LDD CM+1 RETURN STATUS IN (A)
  1365. UJN RSTX RETURN
  1366. SCP SPACE 4,25
  1367. ** SCP - SELECT CONTROL POINT.
  1368. *
  1369. * ENTRY (JC) = 0.
  1370. * (JP) = SCHEDULING PRIORITY OF SELECTED JOB.
  1371. * (TE) = LWA OF *TACP* TABLE.
  1372. *
  1373. * EXIT (A) = (JC) = CP NUMBER IF ONE IS AVAILABLE.
  1374. * = 0 IF NO CP IS AVAILABLE.
  1375. * .LT. 0 IF PCP JOB WAS SELECTED BUT ONLY FIRST OR
  1376. * LAST CP IS AVAILABLE.
  1377. *
  1378. * USES AE, AM - AM+1, T0 - T2.
  1379. *
  1380. * CALLS CCP, IRR.
  1381.  
  1382.  
  1383. SCP8 LDN 0 SET EXIT CONDITION = NO CP AVAILABLE
  1384. SCP9 STD JC SET CP NUMBER
  1385.  
  1386. SCP SUBR ENTRY/EXIT
  1387. LDM ASJA
  1388. LPN 76
  1389. LMK PCJS*2
  1390. STD T0
  1391. NJN SCP2 IF SELECTED JOB NOT AT PCP
  1392. LDM SCPA
  1393. RJM CCP CHECK FOR FIRST/LAST CP
  1394. NJN SCP1 IF FREE CP NEITHER FIRST NOR LAST
  1395. STM SCPA CLEAR FREE CP NUMBER
  1396. AOM SCPC
  1397. SCP1 LDM SCPB
  1398. RJM CCP CHECK FOR FIRST/LAST CP
  1399. NJN SCP2 IF ROLLING CP NEITHER FIRST NOR LAST
  1400. STM SCPB CLEAR ROLLING CP NUMBER
  1401. AOM SCPC
  1402. SCP2 LDC ** (NUMBER OF AVAILABLE CP)
  1403. SCPA EQU *-1
  1404. NJN SCP9 IF THERE IS AN AVAILABLE CONTROL POINT
  1405. LDC ** (NUMBER OF ROLLING CP)
  1406. SCPB EQU *-1
  1407. NJP SCP8 IF CP JOB IS ALREADY BEING ROLLED
  1408. LDD TE SET *TACP* POINTER
  1409. STD T1
  1410. SCP3 SOD T1 DECREMENT *TACP* INDEX
  1411. LDI T1
  1412. NJN SCP3.3 IF NOT END OF SEARCH
  1413. SCP3.1 LDN 0
  1414. * LDN 1 OR 2 PCP JOB AND UNUSABLE CP FREE/ROLLING
  1415. SCPC EQU *-1
  1416. ZJN SCP3.2 IF NO NEED TO BLOCK PCP JOB SCHEDULING
  1417. AOM SFJY INHIBIT PCP JOB SCHEDULING
  1418. LCN 0
  1419. SCP3.2 UJP SCPX RETURN
  1420.  
  1421. SCP3.3 STD T2
  1422. SBD NC
  1423. PJN SCP3 IF PCP JOB
  1424. LDM TJPR-1,T2
  1425. SBD JP
  1426. PJN SCP3.1 IF LOWEST PRIORITY .GE. SELECTED JOB
  1427. LDD T2
  1428. RJM CCP CHECK FOR FIRST/LAST CP
  1429. NJN SCP4 IF NEITHER FIRST NOR LAST CP
  1430. LDD T0
  1431. ZJN SCP3 IF SELECTED JOB AT PCP
  1432. SCP4 LDC 2000 CAUSE *CFL* TO IGNORE THIS CP
  1433. RAI T1
  1434. LDM TJCM-1,T2 ACCUMULATE ROLLING CM FL
  1435. RAD AM+1
  1436. SHN -14
  1437. RAD AM
  1438. LDM TJEC-1,T2 ACCUMULATE ROLLING EM FL
  1439. RAD AE
  1440. LDD T2
  1441. RJM CCP CHECK FOR FIRST/LAST CP
  1442. NJN SCP5 IF NEITHER FIRST NOR LAST CP
  1443. * LDN 0 DISALLOW PSEUDO-ROLLOUT OF CP 1 JOB
  1444. ERRNZ /CPS/ROSR CODE DEPENDS ON VALUE
  1445. UJN SCP6 ISSUE ROLLOUT REQUEST
  1446.  
  1447. SCP5 LDC /CPS/ROPR*10000 ALLOW PSEUDO-ROLLOUT
  1448. SCP6 LMD T2
  1449. RJM IRR ISSUE ROLLOUT REQUEST
  1450. SCP7 UJP SCP8 RETURN
  1451. SFJ SPACE 4,25
  1452. ** SFJ - SEARCH FOR JOB.
  1453. *
  1454. * SCAN THE EJT LOOKING FOR THE HIGHEST PRIORITY JOB IN A
  1455. * SCHEDULABLE JOB STATE THAT MAY BE SCHEDULED WITHIN THE BOUNDS
  1456. * OF AVAILABLE CM/ECS AND SERVICE CLASS RESOURCE CONSTRAINTS.
  1457. *
  1458. * ENTRY (EP) = 0.
  1459. * (TM - TM+1) = SECONDS PORTION OF *RTCL*.
  1460. * (TE) = LWA OF *TACP* TABLE.
  1461. *
  1462. * EXIT (EP) = EJT ORDINAL OF SELECTED JOB.
  1463. * = 0 IF NO SCHEDULABLE JOB FOUND.
  1464. * (CS - CS+1) = EXCESS CM IN SERVICE CLASS.
  1465. * (ES) = EXCESS ECS IN SERVICE CLASS.
  1466. * (JP) = SCHEDULING PRIORITY OF SELECTED JOB.
  1467. * (JM) = CM REQUIRED BY SELECTED JOB.
  1468. * (JE) = ECS REQUIRED BY SELECTED JOB.
  1469. * (SP) = SERVICE CLASS OF SELECTED JOB.
  1470. *
  1471. * USES T0 - T7, CM - CM+4, AA - AA+4, BB - BB+4, EO,
  1472. * CS - CS+1, ES, EJ - EJ+4, SC, EP, SP, JP, JM, JE, TP.
  1473. *
  1474. * CALLS IUT.
  1475. *
  1476. * MACROS CFI.
  1477.  
  1478.  
  1479. SFJ33 LDC 7777
  1480. SFJM EQU *-1 (2ND BEST JOB-S DEVICE ACTIVITY)
  1481. SHN 21-13
  1482. MJN SFJX IF NO SECOND JOB
  1483. SHN 13-21
  1484. SBN 3
  1485. MJN SFJ34 IF NOT TOO MUCH ACTIVITY
  1486. LDN PPAL
  1487. CRD CM
  1488. LDD CM+4
  1489. ZJN SFJX IF NO PP-S AVAILABLE
  1490. SBN 1
  1491. ZJN SFJX IF ONLY 1 PP AVAILABLE
  1492. SFJ34 AOM SCJC SET RECYCLE FLAG
  1493.  
  1494. SFJ SUBR ENTRY/EXIT
  1495. AOM SPST+JS0S*5+1 INCREMENT EJT SCANS
  1496. SHN -14
  1497. RAM SPST+JS0S*5
  1498. LDM SFJA START SCAN WITH CURRENT ORDINAL
  1499. STD EO
  1500. LJM SFJ3 ENTER LOOP
  1501.  
  1502. * SCAN EJT LOOKING FOR HIGHEST PRIORITY SCHEDULABLE JOB.
  1503.  
  1504. SFJ2 SOM SFJA DECREMENT EJT ORDINAL
  1505. * UJN SFJX (SCHEDULABLE JOB WITH ERROR FLAG SET)
  1506. SFJR EQU *-2
  1507. STD EO
  1508. PJN SFJ2.1 IF NOT WRAP OF THE EJT
  1509. LDC **
  1510. SFJS EQU *-1 (HIGHEST EJT ORDINAL)
  1511. STM SFJA
  1512. STD EO
  1513. SFJ2.1 LMC **
  1514. SFJT EQU *-1 (STARTING EJT ORDINAL)
  1515. NJN SFJ3 IF EJT SCAN NOT COMPLETE
  1516. LDD EP
  1517. * UJN SFJ2.2 (POST-REJECT SCAN COMPLETE)
  1518. SFJB EQU *-1
  1519. UJN SFJ2.2 EXIT
  1520. * NJN SFJ2.2 (JOB WAS REJECTED)
  1521. SFJC EQU *-1
  1522.  
  1523. * NO JOB WAS SELECTED FOR SCHEDULING BUT AT LEAST ONE JOB WAS
  1524. * REJECTED DUE TO VIOLATION OF SERVICE CLASS RESOURCE
  1525. * CONSTRAINTS. REMOVE SERVICE CLASS RESOURCE CONSTRAINTS AND
  1526. * RE-SCAN THE EJT TO SELECT THE HIGHEST PRIORITY JOB OF THOSE
  1527. * PREVIOUSLY REJECTED. THE SELECTED JOB WILL BE SCHEDULED ONLY
  1528. * IF SUFFICIENT CM AND ECS IS AVAILABLE WITHOUT ROLLING OUT
  1529. * OTHER JOBS. IF FLEXIBLE MEMORY PARTITIONING IS DISABLED, NO
  1530. * RE-SCAN WILL BE PERFORMED.
  1531.  
  1532. LDM SCPA
  1533. * UJN SFJX (FLEXIBLE MEMORY PARTITIONING DISABLED)
  1534. SFJW EQU *-2
  1535. ZJN SFJX IF NO AVAILABLE CONTROL POINTS
  1536. LDN 0 REINITIALIZE EJT SCAN
  1537. STM USDA
  1538. STM USDB
  1539. STM USDC
  1540. LDM SFJN
  1541. STM SFJB
  1542. LDC SFJ2
  1543. STM SFJH
  1544. LDM SFJO
  1545. STM SFJI
  1546. LJM SFJ2 PERFORM POST-REJECT SCHEDULING
  1547.  
  1548. SFJ2.2 LJM SFJ33 CONTINUE
  1549.  
  1550. SFJ3 CFI EJT,EO GET EJT ENTRY OFFSET
  1551. ADC ** ADD EJT FWA (SET BY *PRS*)
  1552. SFJD EQU *-1 (EJT FWA)
  1553. ADK JSNE READ EJT ENTRY
  1554. CRD EJ
  1555. STD AA+1 SAVE EJT ADDRESS
  1556. SHN -14
  1557. STD AA
  1558. LDD EJ
  1559. ZJN SFJ4 IF EMPTY ENTRY
  1560. LDD EJ+4
  1561. SHN 21-6
  1562. PJN SFJ5 IF JOB ADVANCE IS CLEAR
  1563. SFJ4 LJM SFJ2 CONTINUE EJT SCAN
  1564.  
  1565. SFJ5 SHN 6-0
  1566. MJN SFJ4 IF JOB ADVANCE INHIBITED
  1567. LPN 37 GET JOB STATUS
  1568. STD T2
  1569. STM SFJU+4
  1570. LDD AA READ REMAINDER OF EJT ENTRY
  1571. SHN 14
  1572. LMD AA+1
  1573. ADN SCHE-JSNE
  1574. CRD AA
  1575. ADN PRFE-SCHE
  1576. CRD CM
  1577. ADN SCLE-PRFE
  1578. CRD BB
  1579. LDD BB GET SERVICE CLASS
  1580. SHN -6
  1581. STD SC
  1582. ERRPL 7677-MXPR ENSURE *LCN* MAY BE USED
  1583. LCN 7777-MXPR PRESET SCHEDULING PRIORITY
  1584. STD BB+1
  1585. LDD AA GET EST ORDINAL
  1586. STD BB+2
  1587. LDD CM+1
  1588. ZJP SFJ7 IF NO ERROR FLAG SET IN EJT ENTRY
  1589. LDM TJST,T2
  1590. SHN 21-12
  1591. PJN SFJ6 IF JOB MAY NOT BE SCHEDULED
  1592. LDD T2
  1593. LMN SUJS
  1594. NJN SFJ5.1 IF NOT SUSPENDED JOB
  1595. LDD EJ+4
  1596. SHN 0-7
  1597. LPN 17
  1598. LMN OLCS
  1599. ZJN SFJ6 IF ON-LINE INTERACTIVE JOB
  1600. LMN DTCS&OLCS
  1601. NJN SFJ5.1 IF NOT DETACHED
  1602. LDD CM+1
  1603. SBK ODET
  1604. PJN SFJ5.1 IF ERROR FLAG .GE. *ODET*
  1605. LDD BB
  1606. SHN 21-4
  1607. PJN SFJ6 IF NOT FORCED ROLLIN
  1608. SFJ5.1 LDD CM+1
  1609. SBK MXET
  1610. PJN SFJ6 IF ERROR FLAG NOT VALID
  1611. LDM TEFP,CM+1 GET TRANSFER ADDRESS FROM *TEFP* TABLE
  1612. SFJV ZJN SFJ6 IF NO PROCESSOR DEFINED FOR ERROR FLAG
  1613. * UJN SFJ6 (IF DEADSTART SEQUENCING JOB HAS NOT RUN)
  1614. STD T1
  1615. LJM 0,T1
  1616.  
  1617. SFJ6 LJM SFJ2 CONTINUE EJT SCAN
  1618.  
  1619. * CHECK FOR FORCED ROLLIN/ROLLOUT.
  1620.  
  1621. SFJ7 LDD BB
  1622. SHN 21-5
  1623. MJN SFJ6 IF FORCED ROLLOUT
  1624. SHN 5-4
  1625. PJN SFJ10 IF NOT FORCED ROLLIN
  1626. LDM TJST,T2
  1627. SHN 21-11
  1628. PJN SFJ10 IF JOB MAY NOT BE FORCED ROLLED IN
  1629. SFJ8 LJM SFJ12 SCHEDULE JOB WITH FL
  1630.  
  1631. * IF ENTERING AT THIS LOCATION DUE TO AN ERROR FLAG REQUIRING
  1632. * ROLLIN WITH ONLY NFL, SET THE MAXIMUM NFL AS THE REQUIRED CM
  1633. * FL. ROUTINE *ASJ* WILL REQUEST THIS MUCH CM STORAGE TO
  1634. * ENSURE *1RI* WILL HAVE SUFFICIENT SPACE FOR NFL ROLLIN.
  1635.  
  1636. SFJ9 LDK MNFL
  1637. STD BB+4
  1638. LDN 0 CLEAR ECS REQUIREMENT
  1639. STD BB+3
  1640.  
  1641. * SAVE THE JOB-S EJT ORDINAL AS A FLAG FOR ROUTINE *ASJ*
  1642. * INDICATING THE CM FL FIELD IN THE EJT ENTRY MUST BE CLEARED
  1643. * TO TELL *1RI* ONLY NFL SHOULD BE ROLLED IN. IF THE JOB
  1644. * STATE IS *PRJS*, CLEARING THE CM FL FIELD WILL HAVE NO
  1645. * EFFECT.
  1646.  
  1647. LDD EO
  1648. STM ASJB
  1649. LDC UJNI+77-SFJR+SFJX TERMINATE JOB SEARCH
  1650. ERRPL SFJR-SFJX-40 RANGE ERROR
  1651. STM SFJR
  1652. LJM SFJ12.5 CHECK PRIORITY
  1653.  
  1654. * DETERMINE WHETHER OR NOT THE JOB IS IN A SCHEDULABLE STATE.
  1655.  
  1656. SFJ10 LDD CM+1
  1657. SFJ10.1 NJN SFJ11 IF ERROR FLAG SET
  1658. LDM TJST,T2
  1659. SHN 21-13
  1660. MJN SFJ10.3 IF SCHEDULABLE JOB
  1661. SFJ10.2 LJM SFJ2 CONTINUE SEARCH
  1662.  
  1663. SFJ10.3 LDD SC
  1664. SFJ10.5 SBK MXJC
  1665. SFJ11 PJN SFJ12 IF NO JCB FOR SERVICE CLASS
  1666. LDD T2
  1667. LMK SIJS
  1668. ZJN SFJ12 IF SCP ROLLIN JOB STATUS
  1669.  
  1670. * CALCULATE SCHEDULING PRIORITY. THE CALCULATION IS PERFORMED
  1671. * IN-LINE TO AVOID THE OVERHEAD OF SUBROUTINE USAGE.
  1672.  
  1673. LDC SHNI+77 CALCULATE THE WEIGHTING FACTOR SHIFT
  1674. SBM TEPB+2*MXJC,SC
  1675. STM SFJE
  1676. LDD TM
  1677. SBD AA+3
  1678. SHN 14
  1679. ADD TM+1
  1680. SBD AA+4
  1681. SFJE SHN **
  1682. ADM TEPB,SC
  1683. SBM TEPB+1*MXJC,SC
  1684. MJN SFJ11.1 IF SCHEDULING PRIORITY .LT. UPPER BOUND
  1685. LDN 0 SET PRIORITY TO UPPER BOUND
  1686. SFJ11.1 ADM TEPB+1*MXJC,SC
  1687. STD BB+1 SAVE SCHEDULING PRIORITY
  1688. SFJ12 LDD CM+1
  1689. * UJN SFJ12.2 (USER EM ENABLED)
  1690. SFJF EQU *-1
  1691. LMN ORET
  1692. NJN SFJ12.1 IF NOT OPERATOR OVERRIDE
  1693. STD BB+3
  1694. SFJ12.1 LDD BB+3
  1695. ZJN SFJ12.2 IF EM NOT REQUIRED
  1696. LJM SFJ2 CHECK NEXT JOB
  1697.  
  1698. SFJ12.2 AOM USDC INCREMENT SCHEDULABLE JOB COUNT
  1699. LDD T2
  1700. LMK PCJS
  1701. NJN SFJ12.3 IF NOT PCP JOB
  1702. LDN 0
  1703. * LDN 1 (PCP JOB SCHEDULING INHIBITED)
  1704. SFJY EQU *-1
  1705. NJP SFJ2 IF PCP JOB SCHEDULING INHIBITED
  1706. STD BB+3 CLEAR EM REQUIREMENT
  1707. STD BB+4 CLEAR CM REQUIREMENT
  1708. LDN 1 SET EST ORDINAL FOR ZERO ACTIVITY
  1709. STD BB+2
  1710. SFJ12.3 LDD AM
  1711. SHN 14
  1712. LMD AM+1
  1713. SBD BB+4
  1714. SHN -21
  1715. STD T1
  1716. ZJN SFJ12.4 IF SUFFICIENT CM
  1717. STM USDA SET INSUFFICIENT CM
  1718. SFJ12.4 LDD AE
  1719. SBD BB+3
  1720. PJN SFJ12.5 IF SUFFICIENT EM
  1721. LDN 1 SET INSUFFICIENT EM
  1722. STM USDB
  1723. STD T1 SET CP SEARCH REQUIRED
  1724. SFJ12.5 LDD BB+1
  1725. SBD JP
  1726. MJN SFJ13.2 IF PRIORITY .LT. CURRENT BEST
  1727. NJN SFJ13.1 IF PRIORITY .GT. CURRENT BEST
  1728. LDD T2
  1729. LMK PCJS
  1730. NJN SFJ12.6 IF NOT PCP JOB
  1731. LDM SCPA CHECK IF CP AVAILABLE FOR PSEUDO-ROLLIN
  1732. RJM CCP
  1733. NJN SFJ13.1 IF FREE CP NEITHER FIRST NOR LAST
  1734. LJM SFJ2 CONTINUE EJT SCAN
  1735.  
  1736. SFJ12.6 LDD SC
  1737. LMN DSSC
  1738. NJN SFJ13.0 IF NOT DEADSTART SEQUENCING JOB
  1739. SFJ13 LJM SFJ15.1 SELECT THIS JOB AS CURRENT BEST CANDIDATE
  1740.  
  1741. SFJ13.0 LDC 7777
  1742. SFJG EQU *-1 (ACTIVITY COUNT OF CURRENT BEST JOB)
  1743. SBM TDAC,BB+2
  1744. MJN SFJ13.2 IF CURRENT BEST HAS LESS DEVICE ACTIVITY
  1745. SFJ13.1 NJN SFJ15 IF CURRENT BEST HAS MORE DEVICE ACTIVITY
  1746. SFJ13.2 LDC **
  1747. SFJK EQU *-1 (PRIORITY OF SECOND BEST JOB)
  1748. SBD BB+1
  1749. MJN SFJ13.4 IF PRIORITY .GT. 2ND BEST
  1750. SFJ13.3 NJN SFJ14 IF PRIORITY .LT. 2ND BEST
  1751. LDM TDAC,BB+2
  1752. SBM SFJM
  1753. MJN SFJ13.4 IF ACTIVITY .LT. 2ND BEST
  1754. NJN SFJ14 IF ACTIVITY .GT. 2ND BEST
  1755. LDC **
  1756. SFJL EQU *-1 (CM FL OF 2ND BEST JOB)
  1757. SBD BB+4
  1758. PJN SFJ14 IF REQUIRED CM .LE. 2ND BEST
  1759. SFJ13.4 LDD BB+1 SET 2ND BEST = CURRENT JOB
  1760. STM SFJK
  1761. LDM TDAC,BB+2
  1762. STM SFJM
  1763. LDD BB+4
  1764. STM SFJL
  1765. SFJ14 LJM SFJ2 CONTINUE EJT SCAN
  1766.  
  1767. * DETERMINE IF ENOUGH CM AND ECS ARE AVAILABLE WITHOUT ROLLING
  1768. * JOBS OUT. ALSO, CHECK FOR VIOLATION OF SERVICE CLASS
  1769. * RESOURCE CONSTRAINTS.
  1770.  
  1771. SFJ15 LDN 0 INITIALIZE CM/ECS ACCUMULATORS
  1772. SFJ15.1 STD T5
  1773. STD T6
  1774. STD T7
  1775. LDD T1
  1776. ZJN SFJ18 IF LOWER PRIORITY JOB SEARCH NOT REQUIRED
  1777. SFJ16 LJM SFJ29 GO PERFORM SCAN FOR LOWER PRIORITY JOBS
  1778. * LJM SFJ2 (IF POST-REJECT SCHEDULING)
  1779. SFJH EQU *-1
  1780.  
  1781. * CHECK FOR VIOLATION OF SERVICE CLASS CONSTRAINTS.
  1782.  
  1783. SFJ18 LCN 0 INITIALIZE EXCESS CM/ECS ACCUMULATORS
  1784. STD AA+1
  1785. STD AA+2
  1786. LDN 37
  1787. STD AA
  1788. LDD SC
  1789. * UJN SFJ19 (IF POST-REJECT SCHEDULING)
  1790. SFJI EQU *-1
  1791. SBN MXJC
  1792. MJN SFJ20 IF JCB EXISTS FOR JOB-S SERVICE CLASS
  1793. SFJ19 LJM SFJ26 GO MAKE THIS JOB CURRENT BEST CANDIDATE
  1794.  
  1795. SFJ20 LDD CM+1
  1796. NJN SFJ19 IF ERROR FLAG SET
  1797. LDM TJAM+1*MXJC,SC
  1798. ADN MNFL
  1799. SBD BB+4
  1800. MJN SFJ21 IF REQUIRED CM .GT. MAXIMUM FOR ONE JOB
  1801. LDM TJAM+4*MXJC,SC
  1802. SBD BB+3
  1803. PJN SFJ21.2 IF REQUIRED EM .LE. MAXIMUM FOR ONE JOB
  1804. SFJ21 LDM TJST,T2
  1805. SHN 21-7
  1806. MJP SFJ14 IF INITIAL JOB STATE
  1807. LDC SFJU+2*10000 SET SERVICE WAIT JOB STATUS
  1808. RJM IUT ISSUE *UTEM* REQUEST
  1809. LJM SFJ24 REJECT JOB
  1810.  
  1811. * DETERMINE IF THE TOTAL CM/ECS ASSIGNED TO JOBS OF THIS
  1812. * CANDIDATE-S SERVICE CLASS WILL EXCEED THE MAXIMUM ALLOWABLE
  1813. * IF THE CANDIDATE JOB IS SELECTED FOR SCHEDULING. THE INITIAL
  1814. * CHECK DOES NOT CONSIDER THE AMOUNT OF CM/ECS ASSIGNED TO
  1815. * LOWER PRIORITY JOBS OF THE CANDIDATE-S SERVICE CLASS.
  1816. * HOWEVER, IF THE FIRST CHECK SHOWS THE CM/ECS MAXIMUM WOULD BE
  1817. * EXCEEDED, A SECOND CHECK IS PERFORMED THAT INCLUDES THE
  1818. * CM/ECS ASSIGNED TO LOWER PRIORITY JOBS OF THE CANDIDATE-S
  1819. * SERVICE CLASS.
  1820.  
  1821. SFJ21.2 LDM TJAM+2*MXJC,SC
  1822. SBM TTCU,SC
  1823. SHN 14
  1824. ADM TJAM+3*MXJC,SC
  1825. SBM TTCU+1*MXJC,SC
  1826. SBD BB+4
  1827. PJN SFJ22 IF TOTAL CM .LE. ALLOWABLE MAXIMUM
  1828. SHN 6
  1829. ADD T5
  1830. SHN 14
  1831. ADD T6
  1832. MJN SFJ23 IF TOTAL CM .GT. ALLOWABLE MAXIMUM
  1833.  
  1834. * CALCULATE THE AMOUNT OF CM ASSIGNED TO JOBS OF THE
  1835. * CANDIDATE-S SERVICE CLASS THAT MAY REMAIN ASSIGNED IF THE
  1836. * CANDIDATE IS SELECTED FOR SCHEDULING.
  1837.  
  1838. STD AA+1
  1839. SHN -14
  1840. STD AA
  1841.  
  1842. * PERFORM ECS RESOURCE CONSTRAINT CHECK AS WAS JUST DONE FOR
  1843. * CM.
  1844.  
  1845. SFJ22 LDM TJAM+5*MXJC,SC
  1846. SBM TTUE,SC
  1847. SBD BB+3
  1848. PJN SFJ26 IF TOTAL ECS .LE. ALLOWABLE MAXIMUM
  1849. ADD T7
  1850. PJN SFJ25 IF TOTAL ECS .LE. ALLOWABLE MAXIMUM
  1851. SFJ23 LJM SFJ29 GO CALCULATE ECS OF LOWER PRIORITY JOBS
  1852. * LJM SFJ24 (IF LOWER PRIORITY SCAN ALREADY PERFORMED)
  1853. SFJJ EQU *-1
  1854.  
  1855. * THIS JOB WILL BE SELECTED FOR SCHEDULING ONLY IF NO OTHER
  1856. * CANDIDATES ARE FOUND THAT WOULD NOT VIOLATE SERVICE CLASS
  1857. * RESOURCE CONSTRAINTS AND FLEXIBLE MEMORY PARTITIONING IS
  1858. * ENABLED. ADDITIONALLY, IT WILL BE SCHEDULED ONLY IF NO
  1859. * ROLLOUTS ARE REQUIRED AND WILL BE ASSIGNED THE LOWER BOUND
  1860. * SCHEDULING PRIORITY OF ITS SERVICE CLASS.
  1861.  
  1862. SFJ24 LDM SFJP SET REJECT FLAG
  1863. STM SFJC
  1864. LJM SFJ27 CONTINUE EJT SCAN
  1865.  
  1866. * MAKE THIS JOB THE CURRENT BEST SCHEDULING CANDIDATE.
  1867.  
  1868. SFJ25 STD AA+2
  1869. SFJ26 LDD AA SAVE EXCESS CM AMOUNT
  1870. STD CS
  1871. LDD AA+1
  1872. STD CS+1
  1873. LDD AA+2 SAVE EXCESS ECS AMOUNT
  1874. STD ES
  1875. LDD JP SAVE PRIORITY
  1876. STD T2
  1877. LDD BB+1 SAVE SCHEDULING PRIORITY
  1878. STD JP
  1879. LDD T2 SAVE PREVIOUS BEST PRIORITY
  1880. STD BB+1
  1881. LDD JM SAVE CM AMOUNT
  1882. STD T2
  1883. LDD BB+4 SAVE REQUIRED CM
  1884. STD JM
  1885. LDD T2
  1886. STD BB+4
  1887. LDD BB+3 SAVE REQUIRED ECS
  1888. STD JE
  1889. LDM SFJG SAVE ACTIVITY IN FIRST *TDAC* ENTRY
  1890. STM TDAC
  1891. LDM TDAC,BB+2 SAVE MASS STORAGE ACTIVITY COUNT
  1892. STM SFJG
  1893. LDN 0 CAUSE FIRST *TDAC* ENTRY TO BE USED
  1894. STD BB+2
  1895. LDD EO SAVE EJT ORDINAL
  1896. STD EP
  1897. LDD SC SAVE SERVICE CLASS
  1898. STD SP
  1899. LDD EJ+4 SAVE JOB STATUS
  1900. STM ASJA
  1901. SFJ27 LDC SFJ29 RESTORE INSTRUCTION
  1902. STM SFJJ
  1903. LDD SP
  1904. LMN DSSC
  1905. ZJP SFJX IF DEADSTART SEQUENCING JOB SELECTED
  1906. LJM SFJ13.2 CHECK FOR NEW 2ND BEST JOB
  1907.  
  1908. * CALCULATE AMOUNTS OF CM AND ECS OCCUPIED BY LOWER PRIORITY
  1909. * JOBS.
  1910.  
  1911. SFJ29 LDC SFJ24
  1912. STM SFJJ
  1913. LDD AM+1 INITIALIZE CM ACCUMULATOR
  1914. STD T3
  1915. LDD AM
  1916. STD T2
  1917. LDD AE INITIALIZE ECS ACCUMULATOR
  1918. STD T4
  1919. LDD TE SET *TACP* TABLE POINTER
  1920. STD TP
  1921. SFJ30 SOD TP DECREMENT *TACP* POINTER
  1922. LDI TP
  1923. NJN SFJ31 IF *TACP* SCAN NOT COMPLETE
  1924. LDD T2
  1925. SHN 14
  1926. LMD T3
  1927. SBD BB+4
  1928. MJN SFJ30.1 IF INSUFFICIENT CM TO SCHEDULE THIS JOB
  1929. LDD T4
  1930. SBD BB+3
  1931. MJN SFJ30.1 IF INSUFFICIENT ECS TO SCHEDULE THIS JOB
  1932. LJM SFJ18 GO CHECK RESOURCE CONSTRAINTS
  1933.  
  1934. SFJ30.1 LJM SFJ2 CONTINUE EJT SCAN
  1935.  
  1936. SFJ31 STD T1 SAVE CP/PCP NUMBER
  1937. LDM TJPR-1,T1
  1938. SBD BB+1
  1939. PJN SFJ30 IF *TACP* PRIORITY .GE. CANDIDATE-S
  1940. LDM TJSC-1,T1
  1941. LMD SC
  1942. NJN SFJ32 IF *TACP* SERVICE CLASS .NE. CANDIDATE-S
  1943.  
  1944. * ACCUMULATE CM AND ECS OF LOWER PRIORITY JOB HAVING THE SAME
  1945. * SERVICE CLASS AS THAT OF THE CANDIDATE JOB.
  1946.  
  1947. LDM TJCM-1,T1
  1948. RAD T6
  1949. SHN -14
  1950. RAD T5
  1951. LDM TJEC-1,T1
  1952. RAD T7
  1953.  
  1954. * ACCUMULATE CM AND ECS OF LOWER PRIORITY JOB REGARDLESS OF
  1955. * SERVICE CLASS.
  1956.  
  1957. SFJ32 LDM TJCM-1,T1
  1958. RAD T3
  1959. SHN -14
  1960. RAD T2
  1961. LDM TJEC-1,T1
  1962. RAD T4
  1963. LJM SFJ30 CONTINUE *TACP* SCAN
  1964.  
  1965. SFJA BSS 1 LAST EJT ORDINAL SCHEDULED
  1966.  
  1967. SFJN BSS 0
  1968. LOC SFJB
  1969. UJN SFJ2.2 POST-REJECT SCAN COMPLETE
  1970. LOC *O
  1971.  
  1972. SFJO BSS 0
  1973. LOC SFJI
  1974. UJN SFJ19 POST-REJECT SCHEDULING, SELECT JOB
  1975. LOC *O
  1976.  
  1977. SFJP BSS 0
  1978. LOC SFJC
  1979. NJN SFJ2.2 IF SELECTION MADE AND REJECT FOUND
  1980. LOC *O
  1981.  
  1982. SFJQ BSS 0
  1983. LOC SFJC
  1984. UJN SFJ2.2 EXIT
  1985. LOC *O
  1986.  
  1987. * *UTEM* PARAMETERS FOR SETTING JOB STATUS.
  1988.  
  1989. SFJU VFD 1/1,5/JSNE,6/5 VERIFY THAT JOB STATUS HAS NOT CHANGED
  1990. VFD 6/1,6/0
  1991. CON 0,0
  1992. CON 0 JOB STATUS WHEN JOB WAS SELECTED
  1993.  
  1994. VFD 1/0,5/JSNE,6/5 SET JOB STATUS
  1995. VFD 6/1,6/0
  1996. CON 0
  1997. CON 0
  1998. CON SWJS
  1999. TEFP SPACE 4,10
  2000. ** TEFP - TABLE OF ERROR FLAG PROCESSORS.
  2001. *
  2002. * EACH ENTRY CONTAINS THE ADDRESS OF THE PROCESSOR ASSOCIATED
  2003. * WITH THE ERROR FLAG.
  2004.  
  2005. TEFP INDEX
  2006. INDEX ARET,SFJ8 ARITHMETIC ERROR, ROLLIN FL
  2007. INDEX ITET,SFJ8 SCP INVALID TRANSFER ADDRESS, ROLLIN FL
  2008. INDEX PSET,SFJ8 PROGRAM STOP, ROLLIN FL
  2009. INDEX PPET,SFJ8 PPU ABORT, ROLLIN FL
  2010. INDEX CPET,SFJ8 CPU ABORT, ROLLIN FL
  2011. INDEX PCET,SFJ8 PP CALL ERROR, ROLLIN FL
  2012. INDEX MLET,SFJ8 MESSAGE LIMIT, ROLLIN FL
  2013. INDEX TLET,SFJ8 TIME LIMIT, ROLLIN FL
  2014. INDEX FLET,SFJ8 FILE LIMIT, ROLLIN FL
  2015. INDEX TKET,SFJ8 TRACK LIMIT, ROLLIN FL
  2016. INDEX SRET,SFJ8 SRU LIMIT, ROLLIN FL
  2017. INDEX FSET,SFJ8 FORCED ERROR, ROLLIN FL
  2018. INDEX ODET,SFJ8 OPERATOR DROP, ROLLIN FL
  2019. INDEX IDET,SFJ8 SUBSYSTEM IDLEDOWN, ROLLIN FL
  2020. INDEX RRET,SFJ8 OPERATOR RERUN, ROLLIN FL
  2021. INDEX DRET,SFJ9 DEADSTART RERUN, ROLLIN NFL
  2022. INDEX STET,SFJ8 SUSPENSION TIMEOUT, ROLLIN FL
  2023. INDEX OKET,SFJ8 OPERATOR KILL, ROLLIN FL
  2024. INDEX TIET,SFJ7 USER BREAK ONE, ROLLIN FL
  2025. INDEX TAET,SFJ7 USER BREAK TWO, ROLLIN FL
  2026. INDEX SVET,SFJ9 SECURITY VIOLATION, ROLLIN NFL
  2027. INDEX SSET,SFJ8 SUBSYSTEM ABORT, ROLLIN FL
  2028. INDEX ECET,SFJ8 ECS PARITY ERROR, ROLLIN FL
  2029. INDEX PEET,SFJ8 CPU PARITY ERROR, ROLLIN FL
  2030. INDEX JSET,SFJ9 JOB STEP ABORT, ROLLIN NFL
  2031. INDEX SYET,SFJ9 SYSTEM ABORT, ROLLIN NFL
  2032. INDEX RAET,SFJ9 RECOVERY ABORT, ROLLIN NFL
  2033. INDEX SWET,SFJ9 SYSTEM SOFTWARE ERROR, ROLLIN NFL
  2034. INDEX ORET,SFJ9 OVERRIDE CONDITION, ROLLIN NFL
  2035. INDEX MXET
  2036. TABLES SPACE 4,10
  2037. ** TJST - TABLE OF JOB STATE ATTRIBUTES.
  2038. * ENTRY = 1 WORD.
  2039. * INDEXED BY JOB STATUS.
  2040. *
  2041. *T 1/ SS, 1/ ES, 1/ FR, 1/ TE, 1/ PI
  2042. * SS SET IF SCHEDULABLE JOB STATE.
  2043. * ES SET IF SCHEDULABLE JOB STATE WHEN ERROR FLAG IS SET.
  2044. * FR SET IF JOB IN THIS STATE MAY BE FORCED ROLLED IN.
  2045. * TE SET IF TIMED/EVENT TYPE JOB STATE.
  2046. * PI SET IF PRE-INITIAL TYPE JOB STATE.
  2047. *
  2048. * NOTE - ANY CHANGE TO THIS TABLE MUST BE COUPLED WITH A
  2049. * CORRESPONDING CHANGE TO THE *TJST* TABLE IN *1PP*.
  2050.  
  2051. TJST JOBSTAT
  2052. JOBSTAT PRJS,SS,ES,FR,,PI
  2053. JOBSTAT EXJS
  2054. JOBSTAT ROJS,SS,ES,FR
  2055. JOBSTAT SIJS,SS,ES,FR
  2056. JOBSTAT SOJS,,ES,FR
  2057. JOBSTAT TOJS,,ES,,TE
  2058. JOBSTAT IOJS
  2059. JOBSTAT DOJS
  2060. JOBSTAT SUJS,,ES
  2061. JOBSTAT PCJS,SS,ES,FR
  2062. JOBSTAT ERJS,,,FR,TE
  2063. JOBSTAT NVJS
  2064. JOBSTAT PWJS,,,,TE,PI
  2065. JOBSTAT SWJS,,ES
  2066.  
  2067. INDEX MXJS TERMINATE TABLE
  2068. SSA SPACE 4,10
  2069. ** SSA - SET SCHEDULER STATISTICAL AREA ADDRESS.
  2070. *
  2071. * EXIT (A) = FWA SCHEDULER STATISTICS WORD 0.
  2072. * (T1) = WORD COUNT FOR EJT SCHEDULING DATA.
  2073. *
  2074. * USES CM - CM+4, T1.
  2075.  
  2076.  
  2077. SSA SUBR ENTRY/EXIT
  2078. LDN JS3S-JS0S+1 SET WORD COUNT
  2079. STD T1
  2080. ADK SDAP-JS3S+JS0S-1 SET SCHEDULER STATISTICS ADDRESS
  2081. CRD CM
  2082. LDD CM
  2083. SHN 14
  2084. LMD CM+1
  2085. ADK JS0S
  2086. UJN SSAX EXIT
  2087. USD SPACE 4,10
  2088. ** USD - UPDATE STATISTICAL DATA.
  2089. *
  2090. * ENTRY (A) = 0 IF JOB SCHEDULED.
  2091. *
  2092. * EXIT SCHEDULING STATISTICAL DATA UPDATED.
  2093. *
  2094. * CALLS SSA.
  2095.  
  2096.  
  2097. USD SUBR ENTRY/EXIT
  2098. NJN USD1 IF JOB NOT ASSIGNED
  2099. AOM SPST+JS1S*5+4 INCREMENT JOBS SCHEDULED
  2100. SHN -14
  2101. RAM SPST+JS1S*5+3
  2102. LDM SFJB
  2103. LMM SFJN
  2104. NJN USD2 IF NOT SCHEDULED ON RESCAN
  2105. AOM SPST+JS2S*5+2 INCREMENT JOBS SCHEDULED ON RESCAN
  2106. SHN -14
  2107. RAM SPST+JS2S*5+1
  2108. UJN USD2 UPDATE STATISTICS
  2109.  
  2110. USD1 LDC 0 UPDATE INSUFFICIENT CM COUNT
  2111. * LDC 1 (INSUFFICIENT CM FOR JOB)
  2112. USDA EQU *-1
  2113. RAM SPST+JS2S*5+4
  2114. SHN -14
  2115. RAM SPST+JS2S*5+3
  2116. LDC 0 UPDATE INSUFFICIENT EM COUNT
  2117. * LDC 1 (INSUFFICIENT EM FOR JOB)
  2118. USDB EQU *-1
  2119. RAM SPST+JS3S*5+2
  2120. SHN -14
  2121. RAM SPST+JS3S*5+1
  2122. LDM SCPA
  2123. NJN USD2 IF CONTROL POINT AVAILABLE
  2124. AOM SPST+JS3S*5+4 SET NO CONTROL POINT AVAILABLE
  2125. SHN -14
  2126. RAM SPST+JS3S*5+3
  2127. USD2 LDC 0 UPDATE SCHEDULABLE JOB COUNT
  2128. USDC EQU *-1 (SCHEDULABLE JOB COUNT)
  2129. RAM SPST+JS0S*5+4
  2130. SHN -14
  2131. RAM SPST+JS0S*5+3
  2132. SHN -14
  2133. RAM SPST+JS0S*5+2
  2134. RJM SSA SET STATISTICAL AREA ADDRESS
  2135. CWM SPST+JS0S*5,T1 WRITE STATISTICAL DATA
  2136. LJM USDX EXIT
  2137. SPST SPACE 4,10
  2138. SPST EQU *-JS0S*5 SCHEDULER PERFORMANCE STATISTICS
  2139. BSS JS3S*5+5-JS0S*5
  2140. TTL 1SJ - JOB SCHEDULER.
  2141. SPACE 4,10
  2142. * COMMON DECKS.
  2143.  
  2144.  
  2145. LIST X
  2146. CPR$ SET 1 ASSEMBLE ROUTINE *CPR* OF *COMPCPE*
  2147. *CALL COMPCPE
  2148. LIST *
  2149. *CALL COMPRJC
  2150. SPACE 4,10
  2151. USE OVERLAY
  2152. SPACE 4,10
  2153. ** OVERLAY ORIGINS.
  2154.  
  2155.  
  2156. O3SA EQU *+5 *3SA* ORIGIN
  2157. O3SB EQU *+5 *3SB* ORIGIN
  2158. SPACE 4,10
  2159. ** OVERFLOW CHECKS.
  2160.  
  2161.  
  2162. ERRNG TJSC-TTUE-MXJC-1 CHECK *1SJ* TABLES OVERFLOW
  2163. TITLE INITIALIZATION.
  2164. PRS SPACE 4,10
  2165. ** PRS - PRESET.
  2166. *
  2167. * USES T1, CM - CM+4, AA - AA+4, BB - BB+4, EJ - EJ+4,
  2168. * TM - TM+4, NC.
  2169. *
  2170. * CALLS RJC.
  2171. *
  2172. * MACROS ISTORE.
  2173.  
  2174.  
  2175. PRS SUBR ENTRY/EXIT
  2176. LDK PCPP SET FWA OF PCPA-S
  2177. CRD CM
  2178. LDD CM+3
  2179. SHN 14
  2180. LMD CM+4
  2181. SBK 200B
  2182. STM CCAA+1
  2183. SHN -14
  2184. LMC ADCI
  2185. STM CCAA
  2186. LDD CM+2 SET NUMBER OF MCT ENTRIES
  2187. ERRNZ MCTP-PCPP CODE DEPENDS ON VALUE
  2188. STM BSTB
  2189. LDN EJTP PRESET EJT FWA
  2190. CRD CM
  2191. LDD CM+1
  2192. STM EJAA
  2193. STM SFJD
  2194. LDD CM
  2195. RAM EJAA-1
  2196. LPN 77
  2197. RAM SFJD-1
  2198. SOD CM+2 SET THE LAST EJT ORDINAL
  2199. STM SFJS
  2200. LDK LOSL SET START OF THE EJT SCAN
  2201. CRD CM
  2202. LDD CM+4
  2203. STM SFJA
  2204. STM SFJT
  2205. LDC RTCL READ REAL TIME CLOCK
  2206. CRD TM
  2207. LDD IR+2 SAVE FLAGS BYTE FROM CALL
  2208. RAM SCJA
  2209. LDD CP SET NUMBER OF CONTROL POINTS
  2210. SHN -7
  2211. STD NC
  2212. LDC INWL
  2213. CRD CM
  2214. LDD CM+3 SAVE SCHEDULER CONTROL FLAGS
  2215. LPN 77
  2216. RAM SCJB
  2217. LPN 10
  2218. ZJN PRS0 IF DEADSTART SEQUENCING JOB HAS RUN
  2219. LDM PRSB
  2220. STM SFJV
  2221. PRS0 LDN SSTL
  2222. CRD CM
  2223. LDD CM
  2224. SHN 21-5
  2225. MJN PRS0.1 IF USER ECS DISABLED
  2226. LDM PRSA
  2227. STM SFJF
  2228. PRS0.1 LDD CM+3
  2229. SHN 21-12
  2230. PJN PRS1 IF FLEXIBLE PARTITIONING ENABLED
  2231. ISTORE SFJW,(UJN SFJX) DISABLE POST-REJECT SCHEDULING
  2232.  
  2233. * BUILD *TEPB*, *TJAM* TABLES.
  2234.  
  2235. PRS1 LDN MXJC-1 INITIALIZE INDEX
  2236. STD T1
  2237. PRS2 RJM RJC CALCULATE JCB ADDRESS
  2238. ADN EXQT READ *EXQT* WORD OF JCB
  2239. CRD AA
  2240. ADN SVJT-EXQT READ *SVJT* WORD OF JCB
  2241. CRD CM
  2242. ADN MCMT-SVJT READ *MCMT* WORD OF JCB
  2243. CRD BB
  2244. ADN MECT-MCMT READ *MECT* WORD OF JCB
  2245. CRD EJ
  2246. LDD AA+1
  2247. STM TEPB,T1
  2248. LDD AA+2
  2249. STM TEPB+1*MXJC,T1
  2250. LDD AA+3
  2251. STM TEPB+2*MXJC,T1
  2252. LDD AA+4
  2253. STM TEPB+3*MXJC,T1
  2254. LDD CM+3
  2255. STM TJAM,T1
  2256. LDD BB+2
  2257. STM TJAM+1*MXJC,T1
  2258. LDD BB+3
  2259. STM TJAM+2*MXJC,T1
  2260. LDD BB+4
  2261. STM TJAM+3*MXJC,T1
  2262. LDD EJ+2
  2263. STM TJAM+4*MXJC,T1
  2264. LDD EJ+4
  2265. STM TJAM+5*MXJC,T1
  2266. SOD T1 DECREMENT JCB INDEX
  2267. MJN PRS3 IF ALL JCB-S HAVE BEEN PROCESSED
  2268. LJM PRS2 GO PROCESS NEXT JCB
  2269.  
  2270. PRS3 LJM PRSX RETURN
  2271.  
  2272. PRSA BSS 0
  2273. LOC SFJF
  2274. UJN SFJ12.2 (USER ECS ENABLED)
  2275. LOC *O
  2276.  
  2277. PRSB BSS 0
  2278. LOC SFJV
  2279. UJN SFJ6 (DEADSTART SEQUENCING JOB NOT RUN)
  2280. LOC *O
  2281. SPACE 4,10
  2282. * OVERFLOW CHECKS.
  2283.  
  2284. ERRNG TJAM-* CHECK FOR *TJAM*/*TEPB* OVERFLOWING *PRS*
  2285. SPACE 4,10
  2286. USE OVERFLOW
  2287. OVERFLOW
  2288. TTL 1SJ/3SA - SCHEDULE SUBSYSTEM.
  2289. TITLE
  2290. IDENT 3SA,O3SA SCHEDULE SUBSYSTEM.
  2291. BASE M
  2292. SST
  2293. *COMMENT 1SJ - SCHEDULE SUBSYSTEM.
  2294. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  2295. ORG O3SA
  2296. QUAL 3SA
  2297. QUAL$ SET 1
  2298. 3SA SPACE 4,10
  2299. ** SSS - SCHEDULE SUBSYSTEM.
  2300. *
  2301. * READ THE SYSTEM SECTOR OF THE INPUT FILE OR THE ROLLOUT
  2302. * FILE, DEPENDING ON WHETHER JOB STATUS IS *PRJS* OR *ROJS*,
  2303. * RESPECTIVELY. OBTAIN THE SUBSYSTEM IDENTIFICATION NUMBER
  2304. * FROM THE SYSTEM SECTOR AND USE IT TO CHECK THE *SSCT* TABLE
  2305. * FOR A SPECIFIED CONTROL POINT TO WHICH THE SUBSYSTEM SHOULD
  2306. * BE SCHEDULED. IF NO CONTROL POINT IS SPECIFIED, USE THE
  2307. * ONE INDICATED BY CELL *JC*. IF INSUFFICIENT
  2308. * MEMORY FOR THE SUBSYSTEM, CALL ROUTINE *CFL* TO INITIATE
  2309. * ROLLOUT OF LOWER PRIORITY JOBS. IF THE CONTROL POINT AND
  2310. * MEMORY ARE AVAILABLE, CALL ROUTINE *ASJ* TO ASSIGN THE
  2311. * SUBSYSTEM TO THE CONTROL POINT AND CALL *1RI* OR *1AJ*.
  2312. *
  2313. * ENTRY (EO) = (EP) = EJT ORDINAL OF SUBSYSTEM.
  2314. * (SP) = SERVICE CLASS (*SSSC*).
  2315. * (AM - AM+1) = AVAILABLE + ROLLING CM.
  2316. * (AE) = AVAILABLE + ROLLING ECS.
  2317. * (RM - RM+1) = ROLLING CM.
  2318. * (JC) = NUMBER OF AVAILABLE CONTROL POINT. ZERO IF
  2319. * NONE AVAILABLE.
  2320. * (JM) = REQUIRED CM FL.
  2321. * (JE) = REQUIRED ECS.
  2322. * (JP) = SCHEDULING PRIORITY.
  2323. * (TE) = LWA OF *TACP* TABLE.
  2324. * (TM - TM+1) = SECONDS PORTION OF REAL TIME CLOCK.
  2325. * (NC) = SYSTEM CONTROL POINT NUMBER.
  2326. *
  2327. * EXIT (A) = 0 IF THE SUBSYSTEM WAS SCHEDULED.
  2328. * .NE. 0 IF SUBSYSTEM WAS NOT SCHEDULED.
  2329. *
  2330. * USES EO, JC, JE, JF, SI, SP, TP, AA - AA+4, BB - BB+4,
  2331. * CM - CM+4, EJ - EJ+4, T1 - T7.
  2332. *
  2333. * CALLS ASJ, AST, CFL, EJA, IRR, IUT, RSS, SCI, SCP.
  2334. *
  2335. * MACROS ENDMS, MONITOR, SETMS.
  2336.  
  2337.  
  2338. SSS SUBR ENTRY/EXIT
  2339. LDK /CPS/SFIN SET EJT INTERLOCK
  2340. RJM SCI
  2341. NJN SSSX IF TIMEOUT OR ENTRY NOT IN USE
  2342. RJM EJA CALCULATE EJT ENTRY ADDRESS
  2343. ADK JSNE
  2344. CRD EJ
  2345. ADN SCHE-JSNE READ *SCHE* SO THAT (T6) = LOGICAL TRACK
  2346. CRD T5
  2347. ADN PRFE-SCHE
  2348. CRD BB
  2349. LDD EJ+4 SAVE JOB STATUS
  2350. LPN 76
  2351. LMK PRJS*2
  2352. STM SSSA
  2353.  
  2354. * READ SYSTEM SECTOR OF INPUT FILE OR ROLLOUT FILE.
  2355.  
  2356. SETMS IO
  2357. LDN 0
  2358. STD TP
  2359. RJM RSS READ SYSTEM SECTOR
  2360. NJN SSS2 IF I/O ERROR
  2361. ENDMS
  2362. LDM SISS
  2363. LMC RDSI
  2364. NJN SSS1 IF NOT *RDF*
  2365. LCN 7777-IFSI TREAT AS *IAF*
  2366. STM SISS
  2367. SSS1 LJM SSS4 CONTINUE
  2368.  
  2369. * AN I/O ERROR OCCURRED WHILE READING THE SYSTEM SECTOR OR THE
  2370. * SUBSYSTEM IS ALREADY ACTIVE OR THE REQUIRED CONTROL POINT IS
  2371. * OCCUPIED BY ANOTHER SUBSYSTEM. SET AN ERROR FLAG IN THE EJT
  2372. * ENTRY AND CONTINUE. THE JOB WILL BE ABORTED BY *1AJ*.
  2373.  
  2374. SSS2 LDD EJ SET *SSET* ERROR FLAG IN EJT
  2375. STD CM+3
  2376. LDD EJ+1
  2377. STD CM+4
  2378. LDD EO
  2379. STD CM+2
  2380. LDC SSET+4000
  2381. STD CM+1
  2382. MONITOR CEFM
  2383. LDN 1 SELECT NO QFT OPTION ON *RJSM*
  2384. STD CM+1
  2385. MONITOR RJSM GET JSN
  2386. LDD CM+3
  2387. STM SSSB+3
  2388. LDD CM+4
  2389. STM SSSB+4
  2390. LDC SSSB+1*10000
  2391. RJM IUT ISSUE *UTEM*
  2392. LDN 0
  2393. SSS3 LJM SSS8 CONTINUE SCHEDULING
  2394.  
  2395. * GET CP NUMBER (IF ANY) FROM SSCT AND CHECK SSAT TO SEE IF THE
  2396. * SUBSYSTEM IS ALREADY ACTIVE.
  2397. * FOR *DSP* INITIATED SUBSYSTEMS, CP NUMBER AND SSID ARE TAKEN
  2398. * FROM THE SYSTEM SECTOR.
  2399.  
  2400. SSS4 LDM SISS
  2401. SBK DSSI
  2402. ZJN SSS3 IF DEADSTART SEQUENCING JOB
  2403. SBK LSSI+1-DSSI
  2404. MJN SSS6 IF SUBSYSTEM NOT IN SSCT
  2405. LDC ** (JOB STATUS)
  2406. SSSA EQU *-1
  2407. NJN SSS5 IF NOT PRE-INITIAL JOB STATE
  2408. LDC FEAF*10000
  2409. LMM SISS
  2410. RJM AST GET SSAT ENTRY
  2411. ZJN SSS5 IF SUBSYSTEM IS INACTIVE
  2412. LDC PLSI CHECK FOR CYBIS
  2413. LMM SISS
  2414. ZJN SSS5 IF INITIATING CYBIS
  2415. LJM SSS2 SET ERROR FLAG
  2416.  
  2417. SSS5 LDM SISS
  2418. * LMK FECF*10000
  2419. ERRNZ FECF CODE DEPENDS ON VALUE
  2420. RJM AST GET SSCT ENTRY
  2421. LPN 37
  2422. STD TP
  2423. SSS6 LDM CPSS CHECK SYSTEM SECTOR FOR CONTROL POINT
  2424. ZJN SSS7 IF CONTROL POINT NOT SPECIFIED
  2425. LMN 77
  2426. ZJN SSS8 IF ANY AVAILABLE CONTROL POINT SELECTED
  2427. LMN 77
  2428. SBD NC
  2429. MJN SSS10 IF CORRECT CONTROL POINT SPECIFIED
  2430. LDN 0 CLEAR INCORRECT CP NUMBER
  2431. STM CPSS
  2432. SSS7 LDD TP
  2433. NJN SSS10.1 IF CONTROL POINT SPECIFIED IN SSCT
  2434. SSS8 RJM SCP SELECT CONTROL POINT
  2435. NJN SSS11 IF CONTROL POINT AVAILABLE
  2436. SSS9 LDK /CPS/CFIN CLEAR EJT INTERLOCK
  2437. RJM SCI
  2438. LDN 1 INDICATE SUBSYSTEM NOT SCHEDULED
  2439. LJM SSSX RETURN
  2440.  
  2441. * SCHEDULE THE SUBSYSTEM TO THE SPECIFIED CONTROL POINT.
  2442. * IF IT IS OCCUPIED BY A ROLLABLE JOB WITH A LOWER PRIORITY,
  2443. * THAT JOB WILL BE ROLLED OUT. IF IT IS OCCUPIED BY A ROLLABLE
  2444. * JOB WITH A HIGHER PRIORITY OR BY A NON-ROLLABLE JOB, THE
  2445. * SUBSYSTEM JOB STATE WILL BE SET TO *PWJS*, WAITING ON EVENT
  2446. * *SSWE*.
  2447.  
  2448. SSS10 ADD NC
  2449. SSS10.1 STD JC
  2450. SHN 7
  2451. ADN JCIW
  2452. CRD AA
  2453. ADN TFSW-JCIW
  2454. CRD CM
  2455. LDD CM
  2456. NJN SSS12 IF CONTROL POINT IS OCCUPIED
  2457. SSS11 LJM SSS18 SCHEDULE JOB
  2458.  
  2459. SSS12 STD EO STORE EJT ORDINAL FOR *EJA*
  2460. RJM EJA CALCULATE EJT ENTRY ADDRESS
  2461. ADN SCHE
  2462. CRD CM
  2463. LDD EP RESTORE EJT ORDINAL
  2464. STD EO
  2465. LDD AA+2
  2466. ZJN SSS16 IF ROLLOUT ALLOWED
  2467. LMN ORSI
  2468. ZJN SSS16 IF ROLLOUT NOT INHIBITED
  2469. LDM SISS
  2470. LMC IFSI
  2471. ZJP SSS2 IF IAF
  2472. LDC SSSD+SSSDL*10000
  2473. RJM IUT SET SUBSYSTEM TO *PWJS*
  2474. UJP SSS9 TERMINATE
  2475.  
  2476. SSS16 LDD JP
  2477. SBD CM+4
  2478. MJN SSS17 IF JOB AT CP HAS HIGHER PRIORITY
  2479. LDD JC
  2480. RJM IRR REQUEST ROLLOUT OF JOB
  2481. SSS17 LJM SSS9 TERMINATE
  2482.  
  2483. SSS18 RJM CFL COMMIT FIELD LENGTH
  2484.  
  2485. * ASSIGN JOB IF SUFFICIENT CM.
  2486.  
  2487. LDD AM
  2488. SBD RM
  2489. SHN 14
  2490. LMD AM+1
  2491. SBD RM+1
  2492. SBD JM
  2493. MJN SSS17 IF INSUFFICIENT AVAILABLE CM
  2494. LDK /CPS/CFIN CLEAR EJT INTERLOCK
  2495. RJM SCI
  2496. RJM EJA CHECK FOR AN ERROR FLAG IN THE EJT ENTRY
  2497. ADK PRFE
  2498. CRD CM
  2499. LDD CM+1
  2500. LMN SSET
  2501. NJN SSS19 IF NOT A SUBSYSTEM ABORT ERROR FLAG
  2502. LDN BCSC PREVENT AN UPDATE OF THE *SSAT* TABLE
  2503. STD SP
  2504. SSS19 RJM ASJ ASSIGN JOB TO CONTROL POINT
  2505. LJM SSSX RETURN
  2506.  
  2507. * *UTEM* PARAMETERS FOR JSN CHANGE.
  2508.  
  2509. SSSB VFD 1/0,5/JSNE,6/24D
  2510. VFD 6/36D,6/0
  2511. CON 0
  2512. CON 0
  2513. CON 0
  2514.  
  2515. * *UTEM* PARAMETERS TO SET *PWJS*.
  2516.  
  2517. SSSD VFD 1/0,5/SCHE,6/30D
  2518. VFD 6/0,6/0
  2519. VFD 6/0,6/0
  2520. VFD 3/5,9/0
  2521. CON SSWE SUBSYSTEM WAITING EVENT
  2522.  
  2523. VFD 1/0,5/JSNE,6/5
  2524. VFD 6/1,6/0
  2525. CON 0
  2526. CON 0
  2527. CON PWJS
  2528.  
  2529. SSSDL EQU */5-SSSD/5
  2530. SCI SPACE 4,11
  2531. ** SCI - SET/CLEAR EJT INTERLOCK.
  2532. *
  2533. * ENTRY (A) = INTERLOCK FUNCTION.
  2534. *
  2535. * EXIT (A) = 0 IF SUCCESSFUL.
  2536. *
  2537. * USES T0, T1, T4.
  2538. *
  2539. * CALLS EJA, SFI.
  2540. *
  2541. * MACROS DELAY, PAUSE.
  2542.  
  2543.  
  2544. SCI3 SOD T4
  2545. NJN SCI1 IF NOT TIMEOUT
  2546. SCI4 LDN 1 INDICATE FAILURE
  2547.  
  2548. SCI SUBR ENTRY/EXIT
  2549. STD T1 SAVE INTERLOCK FUNCTION
  2550. LDK 10D SET RETRY COUNTER
  2551. STD T4
  2552. SCI1 RJM EJA GET EJT ADDRESS
  2553. RJM SFI SET/CLEAR INTERLOCK
  2554. ZJN SCIX IF REQUEST SUCCESSFUL
  2555. SBN 2
  2556. PJN SCI4 IF ENTRY NOT IN USE
  2557. LDD HN DELAY FOR 128*64 MICROSECONDS
  2558. STD T0
  2559. SCI2 DELAY
  2560. PAUSE NE
  2561. SOD T0
  2562. PJN SCI2 IF MORE DELAY
  2563. UJN SCI3 CHECK FOR TIMEOUT
  2564. SPACE 4,10
  2565. * COMMON DECKS.
  2566.  
  2567.  
  2568. SUB$ EQU 1 ASSEMBLE *SUBSYST* MACRO CALLS
  2569. *CALL COMSSSD
  2570. AST$ SET 1 ASSEMBLE ALL FUNCTIONS OF *COMPAST*
  2571. LIST X
  2572. *CALL COMPAST
  2573. LIST *
  2574. *CALL COMPRSS
  2575. SFI$ EQU 1 SELECT IMMEDIATE RETURN FROM *SFI*
  2576. *CALL COMPSFI
  2577. SPACE 4,10
  2578. ** TSCI - SUBSYSTEM CPU PRIORITIES.
  2579. * ENTRY = 1 WORD.
  2580. * INDEXED BY SUBSYSTEM IDENTIFICATION NUMBER.
  2581. *
  2582. *T 12/ PR
  2583. * PR CPU PRIORITY TO BE ASSIGNED TO SUBSYSTEM.
  2584.  
  2585.  
  2586. TSCI INDEX
  2587. LIST D
  2588. .SUB HERE
  2589. LIST *
  2590. INDEX MXSI-LSSI
  2591. SPACE 4,10
  2592. * OVERFLOW CHECKS.
  2593.  
  2594.  
  2595. USE OVERFLOW
  2596. OVERFLOW O3SA,TJSC
  2597. SPACE 4,10
  2598. QUAL
  2599. TTL 1SJ/3SB - SCHEDULE INPUT FILES TO EJT.
  2600. TITLE
  2601. IDENT 3SB,O3SB SCHEDULE INPUT FILES TO EJT.
  2602. BASE M
  2603. SST
  2604. *COMMENT 1SJ - SCHEDULE INPUT FILES TO EJT.
  2605. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  2606. ORG O3SB
  2607. QUAL 3SB
  2608. QUAL$ SET 1
  2609. 3SB SPACE 4,15
  2610. ** SIE - SCHEDULE INPUT FILES TO EJT.
  2611. *
  2612. * SCHEDULE AS MANY INPUT FILES TO THE EJT AS POSSIBLE, UP TO A
  2613. * LIMIT OF *TIOOL*. AN INPUT FILE QFT ENTRY IS CONSIDERED
  2614. * ELIGIBLE FOR SCHEDULING ONLY IF THE FOLLOWING CONDITIONS ARE
  2615. * MET -
  2616. * 1. THE FILE TYPE IS INPUT.
  2617. * 2. THE QFT ENTRY IS NOT ASSIGNED TO AN EJT ENTRY.
  2618. * 3. SCHEDULING THE INPUT FILE TO THE EJT WOULD NOT
  2619. * INCREASE THE SERVICE CLASS JOB COUNT ABOVE THE
  2620. * ALLOWABLE MAXIMUM.
  2621. * 4. THE QFT ENTRY TIME FIELD IS NON-ZERO.
  2622.  
  2623.  
  2624. SIE SUBR ENTRY/EXIT
  2625. RJM PRS PRESET *3SB*
  2626. ZJN SIE2 IF QFT SCHEDULING SHOULD NOT BE PERFORMED
  2627. RJM SIQ SCAN QFT
  2628. LDD T7
  2629. LMN TIOOL
  2630. ZJN SIE2 IF *TIOO* TABLE IS EMPTY
  2631. RJM CEE CREATE EJT ENTRIES
  2632.  
  2633. * UPDATE THE JOB COUNTS IN THE JOB CONTROL AREA.
  2634.  
  2635. SIE2 LDN MXJC INITIALIZE JCB INDEX
  2636. STD T1
  2637. SEI3 SOD T1 DECREMENT JCB INDEX
  2638. ZJP SIE5 IF ALL JCB-S WERE UPDATED
  2639. RJM RJC CALCULATE JCB ADDRESS
  2640. ADN SVJT
  2641. CRD BB
  2642. ADN JCTT-SVJT
  2643. CRD AA
  2644. LDD AA
  2645. SBD BB+3
  2646. MJN SIE4 IF JOB COUNT WAS LESS THAN JOB LIMIT
  2647. LDM TJCT,T1
  2648. SBD BB+3
  2649. PJN SIE4 IF NEW JOB COUNT NOT BELOW JOB LIMIT
  2650. AOM SIEA INDICATE TO ISSUE EVENT
  2651. SIE4 LDM TJCT,T1
  2652. STD AA
  2653. LDD AA+1
  2654. ZJN SIE4.1 IF NO JOBS WAITING
  2655. SOD AA+1 DECREMENT QFT TIME-OUT
  2656. SIE4.1 LDD T1
  2657. RJM RJC CALCULATE JCB ADDRESS
  2658. ADN JCTT
  2659. CWD AA UPDATE JOB COUNT
  2660. UJN SEI3 CONTINUE UPDATING JOB COUNTS
  2661. SIE5 LDC 0
  2662. SIEA EQU *-1 (NONZERO IF TO ISSUE EVENT)
  2663. ZJN SIE6 IF TO NOT ISSUE EVENT
  2664. LDN ZERL ISSUE JOB COUNT BELOW SERVICE LIMIT EVENT
  2665. CRD CM
  2666. LDN SCFE
  2667. STD CM+4
  2668. MONITOR EATM
  2669. SIE6 LJM SIEX RETURN
  2670.  
  2671. CEE SPACE 4,15
  2672. ** CEE - CREATE EJT ENTRIES.
  2673. *
  2674. * BUILD AN EJT ENTRY FOR EACH ENTRY IN THE *TIOO* TABLE.
  2675. *
  2676. * ENTRY (T7) = INDEX OF FIRST *TIOO* ENTRY.
  2677. *
  2678. * USES T1, T7, CM - CM+4, AA - AA+4, BB - BB+4, EJ - EJ+4,
  2679. * EO, IO, SC.
  2680. *
  2681. * CALLS CET, EJA, IOA, IUT.
  2682. *
  2683. * MACROS MONITOR.
  2684.  
  2685.  
  2686. CEE SUBR ENTRY/EXIT
  2687.  
  2688. * GET THE ORDINAL OF THE NEXT AVAILABLE EJT SLOT.
  2689.  
  2690. CEE1 LDN 0 GET EJT ENTRY
  2691. STD CM+1
  2692. STD EO
  2693. LDD MA SET INITIAL EJT DATA
  2694. CWM CEEA,ON
  2695. LDN /CPS/PEJT
  2696. STD CM+2
  2697. LDM TIOO+2*TIOOL,T7 CHECK SERVICE CLASS
  2698. LMN SYSC
  2699. ZJN CEE1.1 IF SYSTEM JOB
  2700. LMN SYSC&DSSC
  2701. ZJN CEE1.1 IF DEADSTART SEQUENCING JOB
  2702. LMN DSSC&SSSC
  2703. NJN CEE1.2 IF NOT SUBSYSTEM
  2704. CEE1.1 LDC 4000 SET SYSTEM ORIGIN FLAG
  2705. RAD CM+2
  2706. CEE1.2 MONITOR MTRM
  2707. LDD CM+1
  2708. ZJN CEE4 IF NO EJT ENTRY AVAILABLE
  2709.  
  2710. * USE THE *UTEM* MONITOR FUNCTION TO SET THE QFT ENTRY
  2711. * INTERLOCK AND VERIFY THE ENTRY IS STILL ACCEPTABLE FOR
  2712. * SCHEDULING.
  2713.  
  2714. CEE2 STD EO SAVE EJT ORDINAL
  2715. CEE2.1 LDM TIOO,T7 GET QFT ORDINAL FROM *TIOO* TABLE
  2716. STD IO
  2717. LDM TIOO+2*TIOOL,T7 SAVE SERVICE CLASS
  2718. STD SC
  2719. LDC 0*10000+1S17D
  2720. RJM IUT ISSUE *UTEM* MONITOR FUNCTION
  2721. ZJN CEE5 IF INTERLOCK GOTTEN
  2722. CEE3 SOM TJCT,SC DECREMENT JOB COUNT
  2723. CEE4 AOD T7
  2724. LMN TIOOL
  2725. ZJN CEE4.1 IF *TIOO* SCAN COMPLETE
  2726. LDD EO
  2727. NJN CEE2.1 IF UNUSED EJT ENTRY PRESENT
  2728. LJM CEE1 GET ANOTHER EJT ENTRY
  2729.  
  2730. CEE4.1 LDD EO
  2731. ZJN CEE4.2 IF NO EJT ENTRY TO RETURN
  2732. STD CM+1 RETURN EJT ENTRY
  2733. LDN /CPS/PEJT
  2734. STD CM+2
  2735. MONITOR MTRM
  2736. CEE4.2 LJM CEEX RETURN
  2737.  
  2738. CEE5 RJM IOA CALCULATE QFT ENTRY ADDRESS
  2739. ADK JSNQ
  2740. CRD EJ
  2741. ADN ENTQ-JSNQ
  2742. CRD AA
  2743. ADN INSQ-ENTQ
  2744. CRD CM
  2745. ADN SCLQ-INSQ
  2746. CRD BB
  2747. LDD CM+3 SAVE ACCESS LEVEL LIMITS
  2748. LPC 777
  2749. STM CEEB
  2750.  
  2751. * VERIFY ENTRY.
  2752.  
  2753. LDD BB
  2754. SHN -6
  2755. LMD SC
  2756. NJN CEE6 IF SERVICE CLASS CHANGED
  2757. LDD EJ+4
  2758. ERRNZ INQF CODE ASSUMES *INQF* = 0
  2759. LPC 7002
  2760. ZJN CEE7 IF *TYPE* AND *STAT* FIELDS ARE OK
  2761. CEE6 LDC 0*10000+1S17D+1S16D CLEAR INTERLOCK
  2762. RJM IUT ISSUE *UTEM* MONITOR FUNCTION
  2763. LJM CEE3 CONTINUE PROCESSING *TIOO* TABLE
  2764.  
  2765. * CREATE EJT ENTRY.
  2766.  
  2767. CEE7 LDD BB
  2768. LPN 17
  2769. LMK IAOT
  2770. STD T1
  2771. ZJN CEE8 IF INTERACTIVE JOB
  2772. LDN NICS&OLCS
  2773. CEE8 LMN OLCS SET CONNECTION STATUS
  2774. SHN 7
  2775. LMK PRJS*2 SET JOB STATUS
  2776. STD EJ+4
  2777. LDN 0
  2778. STD AA+2
  2779. STD BB+3
  2780. LDD T1
  2781. ZJN CEE8.1 IF INTERACTIVE SERVICE CLASS
  2782. LDD SC
  2783. LMN SSSC
  2784. NJN CEE9 IF NOT A SUBSYSTEM
  2785. CEE8.1 LDC 4000 SET NO-RERUN FLAG
  2786. RAD AA+2
  2787.  
  2788. * CALCULATE INITIAL SCHEDULING PRIORITY.
  2789.  
  2790. CEE9 LDM TEPB+3*MXJC,SC SAVE INITIAL PRIORITY FOR *CET*
  2791. STD T1
  2792. LDD SC
  2793. SHN 14
  2794. LMN EXQT
  2795. RJM CET CALCULATE ENTRY TIME
  2796. LDD T1 SAVE CALCULATED ENTRY TIME IN *SCHE* IMAGE
  2797. STD AA+3
  2798. LDD T2
  2799. STD AA+4
  2800. LDN AFFL+DNFL SET INITIAL CM FL
  2801. STD BB+4
  2802. CEEC LDN ** (SYSTEM SECURITY MODE)
  2803. STD T1
  2804. ZJN CEE10 IF UNSECURED SYSTEM
  2805. LDM CEEB CHECK ACCESS LEVEL LIMITS
  2806. SHN -6+22
  2807. STD CM+4 LOWER ACCESS LEVEL LIMIT
  2808. SHN -22+6
  2809. LPN 7
  2810. STD CM+3 UPPER ACCESS LEVEL LIMIT
  2811. LDD BB SET ORIGIN TYPE
  2812. LPN 17
  2813. STD CM+2
  2814. LDN /CPS/VJLS VALIDATE JOB LIMITS
  2815. STD CM+1
  2816. MONITOR VSAM
  2817. LDD CM+1
  2818. STD T1 SAVE RETURN STATUS
  2819. CEE10 LDK ZERL
  2820. CRD CM
  2821. LDM CEEB SET ACCESS LEVEL LIMITS
  2822. LPN 7
  2823. STD CM+2
  2824. LDM CEEB
  2825. SCN 77
  2826. SHN -3
  2827. RAD CM+2
  2828. LDD T1
  2829. ZJN CEE11 IF LIMITS ARE VALID
  2830. LDK SYET SET ERROR FLAG
  2831. STD CM+1
  2832.  
  2833. * WRITE EJT ENTRY TO CM.
  2834.  
  2835. CEE11 RJM EJA CALCULATE EJT ENTRY ADDRESS
  2836. ADN SCHE
  2837. CWD AA
  2838. ADN PRFE-SCHE
  2839. CWD CM
  2840. ADN SCLE-PRFE
  2841. CWD BB
  2842. SBN SCLE-JSNE
  2843. CWD EJ
  2844.  
  2845. * RETURN QFT ENTRY.
  2846.  
  2847. LDD IO
  2848. STD CM+1
  2849. LDN /CPS/PQFT
  2850. STD CM+2
  2851. MONITOR MTRM
  2852. STD EO CLEAR EJT ORDINAL
  2853. LJM CEE4 CONTINUE PROCESSING *TIOO* TABLE
  2854.  
  2855.  
  2856. CEEA VFD 24/4L****,36/1 INITIAL EJT DATA
  2857. CEEB CON 0 ACCESS LEVEL LIMITS
  2858. FLP SPACE 4,25
  2859. ** FLP - FIND LOWEST PRIORITY JOB.
  2860. *
  2861. * SCAN THE *TIOO* TABLE TO FIND THE LOWEST PRIORITY JOB.
  2862. *
  2863. * ENTRY (A) = 0 IF THE LOWEST PRIORITY JOB OF THE ENTIRE
  2864. * *TIOO* TABLE IS TO BE FOUND.
  2865. * (A) .NE. 0 IF THE LOWEST PRIORITY JOB OF SERVICE CLASS
  2866. * *SC* IS TO BE FOUND.
  2867. * (SC) = SERVICE CLASS IF (A) .NE. 0.
  2868. * (T7) = CURRENT *TIOO* INDEX.
  2869. *
  2870. * EXIT (A) = *TIOO* INDEX OF LOWEST PRIORITY JOB.
  2871. * (A) = 7777 IF CALLER REQUESTED LOWEST PRIORITY JOB OF
  2872. * A SERVICE CLASS BUT *TIOO* TABLE CONTAINS NO
  2873. * ENTRIES FOR JOBS OF THE SPECIFIED SERVICE
  2874. * CLASS; OR THE *TIOO* TABLE IS EMPTY.
  2875. * (T4) = PRIORITY.
  2876. * (T5) = *TIOO* INDEX.
  2877. *
  2878. * USES T3 - T5.
  2879.  
  2880.  
  2881. FLP4 LDD T5
  2882.  
  2883. FLP SUBR ENTRY/EXIT
  2884. STM FLPA SET/CLEAR SERVICE CLASS FLAG
  2885. LCN 0 INITIALIZE LOWEST PRIORITY
  2886. STD T4
  2887. STD T5 PRESET EXIT CONDITION
  2888. LDD T7 INITIALIZE *TIOO* INDEX
  2889. STD T3
  2890. FLP1 LMN TIOOL
  2891. ZJN FLP4 IF *TIOO* SCAN IS COMPLETE
  2892. LDC **
  2893. FLPA EQU *-1 (SERVICE CLASS FLAG)
  2894. ZJN FLP2 IF ALL SERVICE CLASSES WILL BE CONSIDERED
  2895. LDM TIOO+2*TIOOL,T3
  2896. LMD SC
  2897. NJN FLP3 IF WRONG SERVICE CLASS
  2898. FLP2 LDM TIOO+1*TIOOL,T3
  2899. SBD T4
  2900. PJN FLP3 IF PRIORITY .GE. CURRENT LOWEST
  2901. RAD T4 SET NEW LOWEST PRIORITY
  2902. LDD T3 SAVE *TIOO* INDEX
  2903. STD T5
  2904. FLP3 AOD T3 INCREMENT *TIOO* INDEX
  2905. UJN FLP1 CONTINUE SCAN
  2906. IOA SPACE 4,10
  2907. ** IOA - CALCULATE QFT ENTRY ADDRESS.
  2908. *
  2909. * ENTRY (IO) = QFT ORDINAL.
  2910. *
  2911. * EXIT (A) = QFT ADDRESS.
  2912. *
  2913. * MACROS CFI.
  2914.  
  2915.  
  2916. IOA SUBR ENTRY/EXIT
  2917. CFI QFT,IO CALCULATE ENTRY OFFSET
  2918. ADC **
  2919. IOAA EQU *-1 (IOQT FWA)
  2920. UJN IOAX RETURN
  2921. SIQ SPACE 4,20
  2922. ** SIQ - SCAN QFT.
  2923. *
  2924. * SCAN THE QFT LOOKING FOR SCHEDULABLE INPUT FILES. BUILD
  2925. * *TIOO* TABLE ENTRIES FOR THE *N* HIGHEST PRIORITY INPUT
  2926. * FILES, WHERE *N* = MIN(*TP*,*TIOOL*). *TP* IS THE NUMBER OF
  2927. * AVAILABLE EJT ENTRIES AND *TIOOL* IS AN ASSEMBLY CONSTANT.
  2928. * IF AN INPUT QFT ENTRY CONTAINS A DESTINATION LID (*DLID*),
  2929. * *1SJ* WILL ONLY SCHEDULE THE JOB IF THE *DLID* HAS THE
  2930. * ATTRIBUTES *HOST* AND *ENABLED*.
  2931. *
  2932. * ENTRY (A) .LT. 0, ONLY SCHEDULE SYSTEM JOBS.
  2933. * (TP) = NUMBER OF AVAILABLE EJT ENTRIES.
  2934. * (IO) = LARGEST QFT ORDINAL.
  2935. *
  2936. * EXIT (T7) = CURRENT *TIOO* INDEX.
  2937. *
  2938. * USES EO, IO, SC, TP, AA - AA+4, BB - BB+4, CM - CM+4,
  2939. * T1 - T7.
  2940. *
  2941. * CALLS CPR, FLP, IOA.
  2942. *
  2943. * MACROS CFI.
  2944.  
  2945.  
  2946. SIQ SUBR ENTRY/EXIT
  2947. PJN SIQ0 IF NOT EJT THRESHOLD
  2948. LDC LMNI+SYSC
  2949. UJN SIQ0.1 CONTINUE
  2950.  
  2951. SIQ0 LDC UJNI+SIQ3.0-SIQE SET NORMAL SCHEDULING
  2952. ERRNG 37-SIQ3.0+SIQE IF JUMP OUT OF RANGE
  2953. SIQ0.1 STM SIQE
  2954. LDN TIOOL INITIALIZE *TIOO* INDEX
  2955. STD T7
  2956. SBN 1 INITIALIZE INDEX OF LOWEST PRIORITY JOB
  2957. STD T5
  2958. LCN 0 INITIALIZE LOWEST *TIOO* ENTRY PRIORITY
  2959. STD T4
  2960. LDD IO
  2961. SIQ1 CFI QFT,,IO GET QFT ENTRY OFFSET
  2962. ADC **
  2963. SIQA EQU *-1 (QFT FWA)
  2964. ADK JSNQ
  2965. CRD CM
  2966. LDD CM
  2967. NJN SIQ3 IF NOT AN EMPTY ENTRY
  2968. SIQ2 SOD IO
  2969. NJN SIQ1 IF QFT SCAN NOT COMPLETE
  2970. UJN SIQX RETURN
  2971.  
  2972. SIQ3 LDD CM+4
  2973. ERRNZ INQF CODE ASSUMES *INQF* = 0
  2974. LPC 7003
  2975. NJN SIQ2 IF FILE NOT ELIGIBLE FOR SCHEDULING
  2976. LDN 1 SET NOT ABORTED INPUT FILE
  2977. STD EO
  2978. RJM IOA CALCULATE QFT ENTRY ADDRESS
  2979. ADN ENTQ
  2980. CRD CM
  2981. ADN INSQ-ENTQ READ DESTINATION LID
  2982. CRD BB
  2983. ADN SCLQ-INSQ
  2984. CRD AA
  2985. LDD AA GET SERVICE CLASS
  2986. SHN -6
  2987. STD SC
  2988. SIQE UJN SIQ3.0 CONTINUE
  2989. * LMN SYSC (EJT FULL, ONLY SCHEDULE SYSTEM JOBS)
  2990. ZJN SIQ3.0 IF SYSTEM JOB
  2991. LMN DSSC&SYSC
  2992. ZJN SIQ3.0 IF DEADSTART SEQUENCING JOB
  2993. LMN SSSC&DSSC
  2994. NJN SIQ2 IF NOT A SUBSYSTEM
  2995. SIQ3.0 LDD SC
  2996. SBN DSSC
  2997. NJN SIQ3.1 IF NOT DEADSTART SEQUENCING JOB
  2998. LDN TIOOL-1 RESET *TIOO* INDEX
  2999. STD T7
  3000. ERRNZ LJMI-100
  3001. LDD HN STORE *LJM* INSTRUCTION
  3002. STM SIQC
  3003. LDC SIQX
  3004. STM SIQC+1
  3005. LCN 0 SET PRIORITY TO MAXIMUM
  3006. LJM SIQ8 BUILD *TIOO* ENTRY
  3007.  
  3008. * THIS INPUT FILE IS SCHEDULABLE.
  3009. * DETERMINE IF DESTINATION LID IS HOST LID.
  3010.  
  3011. SIQ3.1 LDD BB+2 CHECK IF DLID PRESENT IN QFT
  3012. SCN 77
  3013. ADD BB+1
  3014. ZJN SIQ4 IF NO DLID
  3015. LDC ** INITIALIZE *THLD* TABLE INDEX
  3016. SIQD EQU *-1 (2*NUMBER OF HOST LIDS)
  3017. ZJP SIQ2 IF NO HOST LIDS PRESENT
  3018. SBN 2
  3019. STD T6
  3020. SIQ3.2 LDD BB+1 CHECK NEXT LID
  3021. LMM THLD,T6
  3022. NJN SIQ3.3 IF NOT A MATCH
  3023. LDD BB+2
  3024. LMM THLD+1,T6
  3025. SCN 77
  3026. ZJN SIQ4 IF A MATCH
  3027. SIQ3.3 LCN 2
  3028. RAD T6
  3029. PJN SIQ3.2 IF NOT END OF TABLE
  3030. UJN SIQ5 CHECK NEXT QFT ENTRY
  3031.  
  3032. SIQ4 LDD CM+3 SAVE ENTRY TIME
  3033. STD T1
  3034. LDD CM+4
  3035. STD T2
  3036. LDD SC
  3037. RJM RJC
  3038. ADK JCTT
  3039. CRD BB
  3040. LDD BB+1
  3041. NJN SIQ5 IF JOBS WAITING FOR THIS SERVICE CLASS
  3042.  
  3043. * CALCULATE QUEUE PRIORITY OF SELECTED INPUT FILE.
  3044.  
  3045. LDD T2
  3046. ZJN SIQ4.1 IF NOT POSSIBLE ABORTED INPUT FILE
  3047. LMN 1 CHECK FOR ENTRY TIME OF 1
  3048. NJN SIQ4.1 IF NOT ABORTED INPUT FILE
  3049. LDD T1
  3050. NJN SIQ4.1 IF NOT ABORTED INPUT FILE
  3051. SOD EO SET ABORTED INPUT FILE
  3052. SIQ4.1 LDD SC
  3053. SHN 14
  3054. LMK INQT
  3055. RJM CPR CALCULATE QUEUE PRIORITY
  3056. MJN SIQ5 IF NO JCB FOR SERVICE CLASS
  3057. NJN SIQ6 IF NON-ZERO ENTRY TIME
  3058. SIQ5 LJM SIQ2 CONTINUE QFT SCAN
  3059.  
  3060. * CHECK JOB COUNT LIMIT.
  3061.  
  3062. SIQ6 STD T2 SAVE CALCULATED PRIORITY
  3063. LDD EO
  3064. NJN SIQ6.1 IF NOT ABORTED INPUT FILE
  3065. LCN 0 SET PRIORITY MAXIMUM
  3066. STD T2
  3067. UJN SIQ7 SKIP JOB COUNT CHECK
  3068.  
  3069. SIQ6.1 LDM TJCT,SC
  3070. SBM TJAM,SC
  3071. MJN SIQ7 IF JOB COUNT LIMIT NOT REACHED
  3072. LDD SC
  3073. LMN DISC
  3074. ZJN SIQ7 IF DETACHED JOB
  3075. LDD AA
  3076. LPN 17
  3077. LMK IAOT
  3078. ZJN SIQ7 IF INTERACTIVE JOB
  3079. RJM FLP FIND LOWEST PRIORITY JOB OF SERVICE CLASS
  3080. SHN 6
  3081. MJN SIQ5 IF NO JOBS OF SERVICE CLASS IN *TIOO*
  3082. LDD T4
  3083. SBD T2
  3084. PJN SIQ5 IF PRIORITY OF NEW JOB .LE. LOWEST
  3085. LJM SIQ13 CREATE *TIOO* ENTRY FOR CURRENT QFT ENTRY
  3086.  
  3087. * BUILD *TIOO* ENTRY.
  3088.  
  3089. SIQ7 SOD T7 DECREMENT *TIOO* INDEX
  3090. SOD TP DECREMENT AVAILABLE EJT ENTRY COUNT
  3091. * LJM SIQ12 (IF NO NEW *TIOO* SLOTS SHOULD BE USED)
  3092. SIQB EQU *-2
  3093. LDD T2
  3094. SIQ8 STM TIOO+1*TIOOL,T7
  3095. LDD IO PLACE QFT ORDINAL IN *TIOO* ENTRY
  3096. STM TIOO,T7
  3097. LDD SC PLACE SERVICE CLASS IN *TIOO* ENTRY
  3098. STM TIOO+2*TIOOL,T7
  3099. LDD EO 0= ABORTED INPUT FILE, 1=NORMAL INPUT FILE
  3100. RAM TJCT,SC INCREMENT JOB COUNT
  3101. * LJM SIQX (IF DEADSTART SEQUENCING JOB FOUND)
  3102. SIQC EQU *-2
  3103. LDD T2
  3104. SBD T4
  3105. PJN SIQ9 IF JOB-S PRIORITY NOT NEW LOWEST OF *TIOO*
  3106. LDD T7 SAVE INDEX OF NEW LOWEST PRIORITY JOB
  3107. STD T5
  3108. LDD T2 SAVE PRIORITY OF NEW LOWEST JOB
  3109. STD T4
  3110. SIQ9 LDD T7
  3111. ZJN SIQ10 IF *TIOO* TABLE IS FULL
  3112. LDD TP
  3113. NJN SIQ11 IF MORE AVAILABLE EJT ENTRIES EXIST
  3114. SIQ10 LDC SIQ12 PREVENT USE OF NEW *TIOO* SLOTS
  3115. STM SIQB+1
  3116. LDD HN STORE *LJM*
  3117. STM SIQB
  3118. SIQ11 LJM SIQ2 CONTINUE QFT SCAN
  3119.  
  3120. * NO NEW *TIOO* SLOTS MAY BE USED. SEE IF THE CURRENT QFT
  3121. * ENTRY HAS A HIGHER QUEUE PRIORITY THAN THE LOWEST PRIORITY
  3122. * *TIOO* ENTRY. IF SO, REPLACE THAT JOB-S *TIOO* ENTRY WITH A
  3123. * NEW ONE FOR THE CURRENT QFT ENTRY.
  3124.  
  3125. SIQ12 LDD T4
  3126. SBD T2
  3127. PJN SIQ11 IF NEW JOB-S PRIORITY .LE. *TIOO* LOWEST
  3128. SIQ13 LDM TIOO+2*TIOOL,T5 GET SERVICE CLASS OF CURRENT LOWEST
  3129. STD T3
  3130. SOM TJCT,T3 DECREMENT JOB COUNT FOR OLD *TIOO* LOWEST
  3131. AOM TJCT,SC INCREMENT JOB COUNT FOR NEW JOB
  3132. LDD IO SAVE QFT ORDINAL IN *TIOO* ENTRY
  3133. STM TIOO,T5
  3134. LDD T2 SAVE QUEUE PRIORITY IN *TIOO* ENTRY
  3135. STM TIOO+1*TIOOL,T5
  3136. LDD SC SAVE SERVICE CLASS IN *TIOO* ENTRY
  3137. STM TIOO+2*TIOOL,T5
  3138.  
  3139. * SCAN THE *TIOO* TABLE TO FIND THE NEW LOWEST PRIORITY JOB.
  3140.  
  3141. LDN 0
  3142. RJM FLP FIND LOWEST PRIORITY JOB
  3143. UJN SIQ11 CONTINUE QFT SCAN
  3144. SPACE 4,10
  3145. * COMMON DECKS.
  3146.  
  3147.  
  3148. CPR$ SET 1 ASSEMBLE ROUTINE *CPR* OF *COMPCPE*
  3149. CET$ SET 1 ASSEMBLE ROUTINE *CET* OF *COMPCPE*
  3150. IOQ$ SET 1 ENABLE ZERO ENTRY TIME CHECK
  3151. LIST X
  3152. *CALL COMPCPE
  3153. LIST *
  3154.  
  3155.  
  3156. ERRNG TJCT-* OVERFLOW INTO *TJCT*
  3157. TITLE PRESET.
  3158. USE TABLES
  3159. PRS SPACE 4,10
  3160. ** PRS - PRESET *3SB*.
  3161. *
  3162. * BUILDS THE *THLD* TABLE OF HOST-ENABLED LIDS. IF
  3163. * DEADSTART SEQUENCING JOB IS ACTIVE, OR IF THE LDT
  3164. * HAS NOT BEEN CREATED YET DUE TO A *CLDT* ABORT,
  3165. * THEN NO *THLD* TABLE WILL BE CREATED, AND NO INPUT
  3166. * FILES CONTAINING A DESTINATION LID IN THE QFT ENTRY
  3167. * WILL BE SCHEDULED.
  3168. *
  3169. * EXIT (A) = RESPONSE FROM *SEJ*.
  3170. *
  3171. * USES IO, T6, T9, AA - AA+4, BB - BB+4, CM - CM+4,
  3172. * T1 - T1+4.
  3173. *
  3174. * CALLS AST, SEJ.
  3175. *
  3176. * MACROS ISTORE, MONITOR.
  3177.  
  3178.  
  3179. PRS8 LDC ** RETURN RESPONSE FROM *SEJ*
  3180. PRSA EQU *-1
  3181. PRS SUBR ENTRY/EXIT
  3182. LDC IFSI+FECF*10000 CHECK *IAF* ACCESSIBILITY
  3183. RJM AST GET *IAF* SSCT ENTRY
  3184. SHN 21-13
  3185. MJN PRS0 IF *IAF* ACCESSIBLE
  3186. LDC UJNI+SEJ8-SEJB DISABLE SUSPENSION TIME-OUT
  3187. STM SEJB
  3188. ERRNG 37-SEJ8+SEJB JUMP OVERFLOW
  3189. PRS0 LDN MXJC-1 INITIALIZE *TJCT* TABLE
  3190. STD T1
  3191. PRS0.1 LDN 0
  3192. STM TJCT,T1
  3193. SOD T1 DECREMENT TABLE INDEX
  3194. PJN PRS0.1 IF NOT DONE
  3195. RJM SEJ SCAN EJT
  3196. STM PRSA SAVE RESPONSE
  3197. SHN -14
  3198. RAM PRSA-1
  3199. LDK LIDP GET FWA OF LDT
  3200. CRD T1
  3201. LDD T1 GET PID COUNT
  3202. SHN 14
  3203. LMD T2
  3204. CRD AA
  3205. LDN 1 INITIALIZE LDT INDEX
  3206. STD T6
  3207. LDD AA+4 SAVE PID COUNT
  3208. STD T3
  3209. LDN 0 INITIALIZE *THLD* POINTER
  3210. STD T9
  3211. PRS1 SOD T3 DECREMENT PID COUNT
  3212. PJN PRS2 IF MORE PIDS
  3213. LJM PRS7 SET *QFT* FWA
  3214.  
  3215. PRS2 LDD T1 READ FIRST WORD OF PID ENTRY
  3216. SHN 14
  3217. LMD T2
  3218. ADD T6
  3219. CRD AA
  3220. ADN 1 SECOND WORD OF PID ENTRY
  3221. CRD BB
  3222. ADN 1 THIRD WORD OF PID ENTRY
  3223. CRD CM
  3224. LDD AA+1
  3225. SHN 21-5
  3226. MJN PRS3 IF HOST PID
  3227. LDD BB+4 POINT TO NEXT PID ENTRY
  3228. RAD T6
  3229. UJN PRS1 CHECK NEXT PID
  3230.  
  3231. PRS3 LDN 3-1 FWA-1 OF LID ENTRY
  3232. RAD T6
  3233. PRS4 SOD CM+4 DECREMENT LID SLOT COUNT
  3234. MJP PRS5 IF ALL LID SLOTS CHECKED
  3235. AOD T6 POINT TO NEXT LID ENTRY
  3236. LDD T1 READ LID ENTRY
  3237. SHN 14
  3238. LMD T2
  3239. ADD T6
  3240. CRD AA
  3241. LDD AA
  3242. ZJN PRS4 IF HOLE IN LDT
  3243.  
  3244. * ADD ONLY HOST LIDS THAT ARE ENABLED AND ARE NOT
  3245. * LINKED OR STORE-AND-FORWARD TO THE HOST LID TABLE.
  3246.  
  3247. LDD AA+2
  3248. SHN 21-13
  3249. PJN PRS4 IF LID NOT ENABLED
  3250. SHN 21-10-21+13
  3251. MJN PRS4 IF LID LINKED (LOOPBACK SET)
  3252. SHN 21-12-21+10+22
  3253. MJN PRS4 IF STOREF SET
  3254. LDD AA ADD LID TO HOST LID TABLE
  3255. STM THLD,T9
  3256. LDD AA+1
  3257. STM THLD+1,T9
  3258. LDN 2 INCREMENT *THLD* INDEX
  3259. RAD T9
  3260. ADC -THLDL
  3261. MJN PRS4 IF ROOM FOR MORE HOST LIDS
  3262. LDN 0
  3263. STD CM+2 SET NO ERROR FLAG
  3264. LDC *
  3265. STD CM+1 ADDRESS WHERE ERROR DETECTED
  3266. MONITOR CHGM CONDITIONAL HANG FOR NO ROOM
  3267.  
  3268. PRS5 LDD T9
  3269. ZJN PRS7 IF NO HOST LIDS DEFINED
  3270. STM SIQD SAVE LENGTH OF HOST LID TABLE
  3271. PRS7 LDK QFTP PRESET QFT FWA
  3272. CRD CM
  3273. LDD CM
  3274. RAM IOAA-1
  3275. STM SIQA-1
  3276. LDD CM+1
  3277. STM IOAA
  3278. STM SIQA
  3279. SOD CM+2 PRESET QFT ORDINAL FOR BACKWARD SCAN
  3280. STD IO
  3281. LDK SSML SET SYSTEM SECURITY MODE
  3282. CRD CM
  3283. LDD CM
  3284. LPN 7
  3285. RAM CEEC
  3286. LJM PRS8 RETURN
  3287. SPACE 4,10
  3288. * PRESET COMMON DECKS.
  3289.  
  3290.  
  3291. *CALL COMPAST
  3292.  
  3293.  
  3294. ERRNG THLD-* OVERFLOW INTO *THLD*
  3295. EJECT
  3296. * CODE OVERWRITTEN BY *PRS*.
  3297. SEJ SPACE 4,25
  3298. ** SEJ - SCAN EJT.
  3299. *
  3300. * SCAN THE EJT TO PERFORM THE FOLLOWING FUNCTIONS -
  3301. *
  3302. * 1. COUNT THE NUMBER OF EXECUTING JOBS IN EACH SERVICE
  3303. * CLASS. JOBS IN TIMED/EVENT ROLLOUT WAITING TO
  3304. * CHANGE INTO ANOTHER SERVICE CLASS ARE NOT COUNTED.
  3305. * 2. DETERMINE IF THERE ARE ANY AVAILABLE EJT ENTRIES.
  3306. * 3. PERFORM SUSPENSION TIME-OUT PROCESSING AS REQUIRED.
  3307. * 4. CHECK FOR THE EXISTENCE OF THE DEADSTART SEQUENCING
  3308. * JOB.
  3309. *
  3310. * ENTRY (SFJS) = LARGEST EJT ORDINAL.
  3311. * (TM - TM+1) = SECONDS PORTION OF REAL-TIME CLOCK.
  3312. *
  3313. * EXIT (A) .LT. 0, IF TO SCHEDULE ONLY SYSTEM JOBS.
  3314. * (A) = 0, IF DEADSTART SEQUENCING JOB.
  3315. * (A) .GT. 0, SCHEDULE ANY JOB.
  3316. * (TP) = NUMBER OF AVAILABLE EJT ENTRIES.
  3317. *
  3318. * USES CM - CM+4, AA - AA+4, BB - BB+4, EJ - EJ+4, EO, SC,
  3319. * TP.
  3320. *
  3321. * CALLS EJA.
  3322. *
  3323. * MACROS CFI, MONITOR.
  3324.  
  3325.  
  3326. SEJ10 LDN 1 ALLOW SCHEDULING
  3327.  
  3328. SEJ SUBR ENTRY/EXIT
  3329. LDN 0 INITIALIZE EMPTY EJT ENTRY COUNT
  3330. STD TP
  3331. LDM EJAA-1 PRESET EJT FWA
  3332. STM SEJA-1
  3333. STM SEJC-1
  3334. LDM EJAA
  3335. STM SEJA
  3336. STM SEJC
  3337. LDM SFJS PRESET EJT ORDINAL FOR BACKWARD SCAN
  3338. STD EO
  3339. SEJ1 CFI EJT,,EO GET EJT ENTRY OFFSET
  3340. ADC **
  3341. SEJA EQU *-1 (EJT FWA)
  3342. ADK JSNE
  3343. CRD EJ
  3344. ADK SCHE-JSNE
  3345. CRD AA
  3346. ADK PRFE-SCHE
  3347. CRD BB
  3348. ADK SCLE-PRFE
  3349. CRD CM
  3350. LDD EJ
  3351. NJN SEJ4 IF NOT AN EMPTY ENTRY
  3352. AOD TP INCREMENT EMPTY ENTRY COUNT
  3353. SEJ2 SOD EO DECREMENT EJT ORDINAL
  3354. NJN SEJ1 IF EJT SCAN NOT COMPLETE
  3355. LDD TP
  3356. SBN /CPS/EJTR+1
  3357. PJP SEJ10 IF NOT ABOVE THRESHOLD
  3358. LDN 0
  3359. STD CM+1 SELECT *EATM* ENTER EVENT OPTION
  3360. STD CM+3 STORE EVENT DESCRIPTOR
  3361. LDN EJJE
  3362. STD CM+4
  3363. MONITOR EATM
  3364. LCN 1 FLAG EJT THRESHOLD
  3365. SEJ3 LJM SEJX RETURN
  3366.  
  3367. SEJ4 LDD CM
  3368. SHN -6
  3369. STD SC
  3370. SBN MXSC
  3371. PJN SEJ2 IF INVALID SERVICE CLASS
  3372. ADN MXSC-DSSC
  3373. ZJN SEJ3 IF DEADSTART SEQUENCING JOB
  3374. IFNE DSSC,MXJC,1
  3375. ADK DSSC-MXJC
  3376. PJN SEJ6 IF NO JCB FOR SERVICE CLASS
  3377. LDD EJ+4
  3378. LPN 77
  3379. LMN TOJS*2
  3380. NJN SEJ5 IF NOT TIMED/EVENT
  3381. LDD AA+4
  3382. LMN SCFE
  3383. ZJN SEJ6 IF WAITING FOR FULL SERVICE CLASS
  3384. SEJ5 AOM TJCT,SC INCREMENT ACTIVE JOB COUNT
  3385.  
  3386. * PERFORM SUSPENSION TIME-OUT PROCESSING IF *IAF* IS
  3387. * ACCESSIBLE.
  3388.  
  3389. SEJ6 LDD EJ+4
  3390. * UJN SEJ8 (IF SUSPENSION TIME-OUT DISABLED)
  3391. SEJB EQU *-1
  3392. LPC 3776 MASK JOB/CONNECTION STATUS AND ADVANCE
  3393. LMC SUJS*2+DTCS*200
  3394. NJN SEJ8 IF NOT DETACHED SUSPENDED JOB OR ROLLING
  3395. LDD AA+3
  3396. SBD TM
  3397. MJN SEJ7 IF SUSPENSION TIME-OUT
  3398. NJN SEJ8 IF NOT SUSPENSION TIME-OUT
  3399. LDD AA+4
  3400. SBD TM+1
  3401. PJN SEJ8 IF NOT SUSPENSION TIME-OUT
  3402.  
  3403. * SET *STET* ERROR FLAG.
  3404.  
  3405. SEJ7 LDD BB+1
  3406. NJN SEJ9 IF ERROR FLAG ALREADY SET
  3407. LDD EJ SAVE JSN FOR *CEFM*
  3408. STD CM+3
  3409. LDD EJ+1
  3410. STD CM+4
  3411. LDD EO SAVE EJT ORDINAL FOR *CEFM*
  3412. STD CM+2
  3413. LDC STET+4000
  3414. STD CM+1
  3415. MONITOR CEFM
  3416. SEJ8 LJM SEJ2 CONTINUE EJT SCAN
  3417.  
  3418. SEJ9 LDD EJ SET FORCED ROLLIN FLAG
  3419. STM SEJD+3
  3420. LDD EJ+1
  3421. STM SEJD+4
  3422. LDD EO
  3423. CFI EJT,,EO GET EJT ADDRESS
  3424. ADC **
  3425. SEJC EQU *-1
  3426. STD CM+4
  3427. SHN -14
  3428. STD CM+3
  3429. LDN 2
  3430. STD CM+1
  3431. LDD MA
  3432. CWM SEJD,CM+1
  3433. MONITOR UTEM
  3434. UJN SEJ8 CONTINUE EJT SCAN
  3435.  
  3436.  
  3437. SEJD VFD 6/40+JSNE,6/24D,6/36D,42/0
  3438. VFD 6/SCLE,6/1,6/52D,42/1
  3439.  
  3440. ERRNG TJCT-* OVERFLOW INTO *TJCT*
  3441.  
  3442. TABLES SPACE 4,10
  3443. * *3SB* TABLE DEFINITIONS.
  3444.  
  3445.  
  3446. TJCTL EQU MXJC*1 LENGTH OF *TJCT* TABLE
  3447. TIOOL EQU 20 NUMBER OF *TIOO* TABLE ENTRIES
  3448. THLDL EQU MXHLD*2 LENGTH OF *THLD* TABLE
  3449.  
  3450.  
  3451. BEGIN BSSN TJAM-TJCTL-TIOOL*3-THLDL BEGINNING OF TABLES
  3452. TIOO SPACE 4,10
  3453. * TIOO - SCHEDULABLE QFT ENTRIES.
  3454. * ENTRY = 3 WORDS.
  3455. *
  3456. *T 12/ IO,12/ QP,12/ SC
  3457. * IO QFT ORDINAL
  3458. * QP QUEUE PRIORITY.
  3459. * SC SERVICE CLASS.
  3460.  
  3461.  
  3462. TIOO BSSN TIOOL*3
  3463. SPACE 4,10
  3464. ** THLD - SCHEDULABLE HOST LID-S.
  3465. * ENTRY = 2 WORDS.
  3466. *
  3467. *T 18/ LID, 6/ 0
  3468. * LID MAINFRAME LOGICAL ID.
  3469.  
  3470.  
  3471. THLD BSSN THLDL
  3472.  
  3473.  
  3474. TJCT SPACE 4,10
  3475. ** TJCT - JOB COUNTS.
  3476. * ENTRY = 1 WORD.
  3477. * INDEXED BY SERVICE CLASS.
  3478. *
  3479. *T 12/ CT
  3480. *
  3481. * CT NUMBER OF EXECUTING JOBS (JOBS ASSIGNED TO EJT)
  3482. * IN SERVICE CLASS.
  3483.  
  3484.  
  3485. TJCT BSSN TJCTL
  3486. TTEND BSSN 0 END OF LAST TABLE
  3487. END BSSN
  3488. SPACE 4,10
  3489. * OVERFLOW CHECKS.
  3490.  
  3491.  
  3492. ERRNZ TJAM-TTEND TABLE OVERFLOW
  3493. SPACE 4,10
  3494. OVERFLOW O3SB,TJAM
  3495. SPACE 4,10
  3496. TTL 1SJ - JOB SCHEDULER.
  3497. SPACE 4,10
  3498. END