RADC TR-61-254 THE UNIVERSITY OF MICHIGAN OFFICE OF RESEARCH ADMINISTRATION ANN ARBOR Final Report June 27, 1960, to August 31, 1961 A SIMULATION OF THE AN/FSQ-27 DATA-PROCESSING SYSTEM Cooley Electronics Laboratory Department of Electrical Engineering By: R. A. Carlsen -Approved 'by: / M. G..ngold.. B. F. Barton D. W. Fife. - r- ~. ' "~.. ~'. Contract No. AF 30(602) -2337 Rome Air Development Center Griffiss Air Force Base New York,. August 1961

Qualified requesters may obtain copies of this report from the ASTIA Document Service Center, Arlington Hall Station, Arlington 12, Virginia. ASTIA Services for the Department of Defense contractors are available through the "Field of Interest Register" on a "need-to-know" certified by the cognizant military agency of their project or contract.

ABSTRACT This report discusses a simulation program, and its utility, for the AN/ FSQ-27 Data-Processing System. A specific simulation run is discussed. A queuing theory model i- used to obtain the length of the simulation run required to obtain statistically significant results for a number of measures of system performance. These data support the conclusion that a complex simulation, as described in this report, is an expensive general-purpose research tool, although not necessarily an expensive technique for obtaining specific desired results. For research purposes, one should rather, employ analytical tools entirely and/or supplement a simulation technique by drawing upon the results obtained from analytical models for significant portions of the over-all system model. iii

TABLE OF CONTENTS Page LIST OF TABLES viii LIST OF FIGURES xi 1. INTRODUCTION 1 2. DESCRIPTION OF THE AN/FSQ-27 SYSTEM 3 2.1. Description of Equipment Characteristics 3 2.2. The Master Program 4 3. DESCRIPTION OF THE SIMULATION OF THE AN/FSQ-27 7 3.1. Fundamental Concepts 7 3.1.1. The Time Log 7 3.1.2. Representation of Computer Activity 8 3.1.3. Simulation Parameters 10 3.2. Functional Description of the Modeled System 11 3.2.1. Processing a Job Program 11 3.2.2. The Master Computer 14 3.2.3. Job Computers 17 3.3. Mechanics and Techniques 19 3.3.1. Simulation Parameters 19 3.3.2. The Time Log 19 3.3.3. The Input Generating Program 21 3.3.4. Minor Joints 24 3.3.5. Joint Number Bookkeeping 27 3.3.6. Alerts and Interrupts 29 3.3.7. Modeling of the Central Exchange 31 3.3.8. Master Computer Joints 32 3.3.9. Job Computer Functions 34 3.3.10. Major Joints 35 4. QUEUEING THEORY STUDIES 37 4.1. Introduction 37 4.2. Fundamentals of Queueing Theory 38 4.2.1. Equations of Detailed Balance 39 4.2.2. Cascading and Paralleling of Exponential Phases 47 4.2.3. Summary 51 iv

TABLE OF CONTENTS (Continued) Page 4.3. Queueing in Exponential Service Facilities 51 4.3.1. Single Channel (M = 1) 52 4.3.2. Multiple Channel (M > 1) 68 4.3.3. Summary 83 4.4. Application of the Exponential Model to the Polymorphic Computer 83 4.5. First Passage on the nth State 91 4.5.1. Solution for First-Passage Probability Distribution 92 4.5.2. Additional Problems 94 4,5.3. Summary 99 4,6. Job Computer Queueing for Use of Shared Modules 99 4.6.1. Solution for Constant Arrival and Service Times 100 4.6.2. Exponential Arrival- and Service-Time Distributions 101 4.7. The Effect of Arrival- and Service-Time Distributions on System Behavior 104 4.7.1. Average Number in the Single-Channel Queue System Arbitrary Arrival- and Service-Time Distributions 107 4.7.2. Transient Solution for the State Probabilities 113 4.7.3. Summary 113 5. STATISTICAL ACCURACY OF MEASUREMENTS FROM SIMULATION DATA 117 5.1. Introduction 117 5.2. General Discussion of Statistical Errors 118 5.3. Calculation of Sample Sizes 120 5.3.1. Mean Arrival and Service Time 120 5 3.2. Mean Throughput Time 121 553.3. Measurement of Mean Number in the System 123 5.3.4. Measurement of State Probabilities 124 5.3.5. Measurement of the Mean First-Passage Time to the nth State 126 5.4. Length of Simulation Run 126 5.5. Summary 128 6. SUMMARY AND CONCLUSIONS 131 6.1. Capability of the Simulation 131 6.2. Limitations of the Simulation 132 6.3. The Queueing Theory Model 133 v

TABLE OF CONTENTS (Continued) Page 7. REFERENCES 15.35 APPENDIX A. DETAIIS OF THE SIMULATION PROGRAM 137 A. 1. Operating Instructions 2137 A. 1.1. The Program Deck 137 A. 1.2. Distribution Parameters 139 A,. 3. Input 139 A.1.4. Output 164 A. 1.5. Timing 169 A. 1.6. Scheduled Error Stops 172 A. 2. Flow Charts and Coding 174 A.2.2. The Start Subroutine 174 A.2.3. The TIMELG Subroutine 174 A.2.4. The MAIN2 Routine 183 A.2.5. The ALERT Subroutine 183 A. 2.6. The DIST Subroutine 183 A. 2.7. The IGP Subroutine 195 A,2.8. The JPMAJ Subroutine 195 A. 2.9. The MPMIN Subroutine 195 Ao2.10. The NOTE Subroutine 195 A. 2.11. The ONEMD Subroutine 225 A. 2.12, The SETMD Subroutine 225 APPENDIX B. EXAMPLE OF A SIMULATION RUN 231 B.1. Introduction 231 B.2. Description of Simulation Parameters 231 B.2.1. Master Program 231 B.2.2. Job Programs and Arrivals 231 B.2.3. Equipment Parameters 233 B.3. Results of the Run 235 Bo3o 1. General 235 B.3.2. Job Arrivals 236 B.3.3. Job Execution Time 236 B.3.4. Throughput Time 241 B.3.5. Average Number of Jobs in the System, and State Probabilities 241 B.4. Conclusions 242 vi

TABLE OF CONTENTS (Concluded) Page APPENDIX C. AUXILIARY PROGRAMS 245 C.lo Transient Solutions for the Exponential Model 245 C.2. First-Passage Time Distribution 250 C.3. Computation of Roots 250 C.4. Transient Solution for Erlang 2 Service Time 251 C.o5 Transient Solution for Hyper-Exponential Service-Time Distribution 255 DISTRIBUTION LIST 261 vii

LIST OF TABLES Table Page I, Simulation Tables 20 II. State Probabilities for a Single-Channel System 54 IIIo Transient Solutions for a Single-Channel System With p = 0.25, PO(O) = 1.0 70 IV. State Probabilities for a Two-Channel System 72 V. State Probabilities for a Seven-Channel System 73 VI. Transient Solutions for a One- and a Two-Channel System (M = 1, N = 10; M = 2, N = 10) 81 VII. System Performance Chart 85 VIII. The Probability of Immediate Service 90 IX. System Performance Chart. P(tw > t) =.01 90 X. Steady-State State Probabilities for an Infinite-Queue, Seven-Channel System 94 XI. Ratio of Hyper-Exponential Variance and Exponential Variance II. XIIo Expected Number in the Single-Channel System With Exponential Arrival Time 112 XIIIo Sample Sizes for Measurements of Exponentially Distributed Arrival or Service Time 121 XIVo Transient Values for QM, E(tp), and Var(tp) 123 XVo Calculated Values of Sample Size for Different Sampling Intervals in Measurement of Mean Throughput Time 124 XVI. Sample Sizes and Sampling Intervals for Measurements of Mean Number in the System 125 XVIIo Sample Sizes for Measurement of State Probabilities 125 viii

LIST OF TABLES (Continued) Table Page XVIII, Sample Sizes for the Measurement of the Mean First-Passage to the mth State 127 XIX. Average Interval Between Samples 127 XX. Average Duration of Simulation Run for Measurements 129 XXI. The Distribution Parameters 140 XXII. The MISC Table 156 XXIII. The Identification of a Job's Progress on a Program Progress Card 171 XXIV. Simulation Tables 172 XXV. MAIN1 Routine 175 XXVI. START Subroutine 176 XXVII. TIMELG Subroutine 181 XXVIII. MAIN2 Routine 184 XXIX. ALERT Subroutine 185 XXX. DIST Subroutine 189 XXXI. IGP Subroutine 196 XXXII. JPMAJ Subroutine 200 XXXIII. MPMIN Subroutine 203 XXXIV. NOTE Subroutine 223 XXXV. ONEMD Subroutine 226 XXXVI. SETMD Subroutine 228 XXXVII. Master Program Description 232 ix

LIST OF TABLES (Concluded) Table Page XXXVIII. Summary Description of the Run 233 XXXIX. Calculation of Predicted Run Time 235 XL. Comparison of Arrival Time Distribution 236 XLI. Results for Job Execution Time 239 XLII. Results for the Number of Jobs in Progress and in the System 241 XLIII. State Probabilities Obtained from Data 242 XLIV. Makeup of Input Deck for One Solution 247 XLV. Printed Output Format 248 XLVI. P] = [U] P] Program 249 XLVII. Input Format for Root Computation 251 XLVIII. Root Computation Program 252 XLIX. Input Format for Transient Solutions With Erlang 2 Service Time 254 L. P] = [U] P] (Erlang 2) Program 256 LI. Input Format for Transient Solutions for Hyper-Exponential Service Time 258 LII. P] = [U] P] (Hyper-Exponential) Program 259 x

LIST OF FIGURES Figure Page 1. Basic elements of the polymorphic computer system. 1 2. Master computer functions. 5 3. Job computer functions. 6 4. Master computer events. 8 5. The simulation mechanism. 9 6. Job program representation. 10 7. Processing a job program. 12 8a. Master computer functions. 15 8b. Master computer functions. 16 9. Job computer functions. 18 10. Program flow diagram. 22 11. Generating independent job requests. 23 12. Generating job request by use of sequences. 25 13. Minor joint action. 26 14. Queueing theory model for a polymorphic computer. 37 15. Transitions to the nth state. 40 16. Transitions for a single-channel system. 43 17. Transitions for a two-channel system. 45 18. Transient for a single-channel system. Erlang Type Two service distribution. 49 19. Queue length (L1) for a single-channel system (M=i, N=). 57 xi

LIST OF FIGURES (Continued) Figure Page 20. Transient state probabilities for a single-channel system (M=i, N=3). 66 21. Transient solution, Po(t), for a single-channel system (M=l, N=oo). 69 22. Queue length (Lq) for a seven-channel system (M=7, N=oo). 75 23. Root locus for a two-channel system. 78 24. Transient state probabilities for a seven-channel system (M=7, N=20). 79 25. Transient state probabilities for a seven-channel system (M=7, N=20). 80 26. Mean waiting time vs. mean number in service (N=o). 84 27a. Waiting-time distributions for multiple-channel systems. 86 27b. Waiting-time distributions for multiple-channel systems. 87 27c. Waiting-time distributions for multiple-channel systems. 88 27d. Waiting-time distributions for multiple-channel systems 89 28. First-passage to the nth state. 91 29. First-passage probability to state n = 7 for p.5,.7,.9. 95 30. First-passage probability to state n = 10 for p.5,.7,.9. 96 31. First-passage probability to state n = 20 for p = 9,.7. 97 32. First-passage probability to state n = 20 and state n = 40 for p =.9. 98 33. Representation of shared module queueing. 100 34. Mean number in queue vs. p (M = 7). 102 xii

LIST OF FIGURES (Continued) Figure Page 35 Queue length (Lq) and throughput time Ts (normalized to Ta) vso the shared module use factor. 105 36. Job-computer vs. shared-module utilization. 106 37. Po(t) for the single-channel system, p - 0.25. 114 38. Po(t) for the single-channel system, p 0. 5o 114 39. Distribution of a measured mean value. 119 40. The program deck. 138 41. Basic card format, 141 42. An IGPLOG table, 144 43. An IGPLOG card set, 145 44. Numerical coding of module types. 146 45. An IMPLOG table. 148 46. An IMPLOG card set. 149 47. An MCT table, 150 48. A PURVUE table. 151 49. A JCR card set, 153 50. An MAT table. 154 51. A MISC card set. 155 52. A PERBUF table. 157 53, A QUEUE table. 159 540 A SEQQ table. 159 55. A SEQQ card set, 161 xiii

LIST OF FIGURES (Continued) Figure Page 56. Computer module TIMELG entries. 162 57. Job request TIMELG entries, 163 58. A TIMELG table. 165 59. A TIMELG table. 166 60. Job processing stages. 168 61. Program progress cards (primary simulation output). 170 62. Debugging aids. 173 63. START subroutine-entry to START. 179 64. START subroutine-entry to RESTAR. 180 65. ALERT subroutine-entry to ALERTJ. 187 66. ALERT subroutine-entry to ALERTM. 188 67. DIST subroutine. 192 68. IGP subroutine. 199 69. JPMAJ subroutine. 202 70. MPMIN subroutine-common section, 210 71. MPMIN subroutine. 211 72. MPMIN subroutine. 211 73. MPMIN subroutine, 212 74. MPMIN subroutine. 213 75. MPMIN subroutine. 214 76. MPMIN subroutine. 215 77. MPMIN subroutine. 215 xiv

LIST OF FIGURES (Concluded) Figure Page 78. MPMJ' subrou-tine. 216 79 MPMIN subroutine, 21.7 80o.NMIN subroutine, 217 81.o VMPMIIN subroutine o 218 82. MPMIN subroutine. 21.8 830 IVIPI iN subroutineo 219 84. MPMIN subroutineo 219 85. MPiMi subroutineo 220 86. MPMIN subroutine 220 87. IVPMZN subroutine. 221 88. MPMIN subroutine, 221 89. MPMIN subroutineo 222 90. ONEMD subroutine. 227 91 SET'MD subroutine. 229 92, Probability distribution of major joint durations, 234 93. Comparison of distribution on arrival intervals. 237 94. Scatter diagram of 100 uniform numbers generating the exponential arrival intervals, 238 95. Comparison of distribution of job execution time with normal distributiono 240 xv

1. INTRODUCTION The purpose of this report is to describe the work completed under Air Force Contract No. A? 30(602)-2337 at The University of Michigan's Cooley Electronics Laboratory. The objective of this contract is the evaluation of the polymorphic computer concept as realized in the design of the Data Processing Center AN/FSQ-27. The AN/FSQ-27 system is a large-scale, general-purpose, high-speed digital computer system. It is composed of a number of equipment elements or modules, categorized as either controlling elements or subordinate elements. Controlling elements may request connections and communicate with subordinate elements through a central exchange switching unit as shown in Figure 1. II I _ CONTROLLING CENTRAL ELEMENTS EXCHANGE l. -___SWITCH SUBORD I NATE ELEMENTS Figure 1. Basic elements of the polymorphic computer system. During operation of the system, the available units can be grouped into a number of configurations of computing equipment, which may work simultaneously and independently in processing different computing Jobs. At comple1

tion of any job, the modules which have been used in its processing then become available for assignment to another configuration, to begin processing a new computing request. The ability to change the equipment configuration into various "forms" or "shapes" gives rise to the term "polymorphic." The control and supervisory functions necessary to implement and coorindate this activity are incorporated into an executive or master control program, In the AN/FSQ-27 system, one configuration of equipment is assigned to the master control functions, After an initial familiarization period was completed, it was decided that a simulation would provide the best approach to the evaluation of the polymorphic system, if the simulation could be made an order of magnitude simpler than the system being modeled. A Monte Carlo technique has the advantage of making it possible to model system detail which cannot be obtained by analytical methods. However, it became apparent during the contract perod that a simulation approach must be augmented by an understanding of some simplified analytical models. Therefore, queueing theory has been applied, first, to determine the length of the simulation run required to obtain statistically significant results and, second, to gain insight into some of the basic problems encountered in a polymorphic system. The detailed description of the AN/FSQ-27 and the simulation program are discussed in Section 2 and 3,. The analysis of a queueing theory model and its direct application to the AN/FSQ-27 is covered in Section 4. In Section 5 the objections to a simulation approach are illustrated by an application of the queueing theory to the utilization of the present simulation. Finally, Section 6, brings together all the major conclusions from Sections 3-5. Although judgment of the value of simulation is, in the last analysis, subjective, the data support the conclusion that a complex simulation, as described in Section 3, is a very expensive analytical tool. 2

2o DESCREIPTON OF 'E'H AN/FSQ-27 SYS'EM The AW-N/FSQ-27 is 'best desrlibed by its hardware and. software characteristicso. t is assuined that a. reader unfamiliar vith this system will supplement the discussion in %the follo-wing iections w.ith the material in Refo 1l 2o. oDescription of Equipment Characteristics The characteristics of the modular units, or modules, can be summarized as followso (i) Computer Module (J.M)o A computer with magnetic core storage~ This module is the only unit which is capable of arithmetical..nd logical operations0 It- is the principal controlling moduleo (2) Buffer Module (BM) o A module composed of two independent magnetic-core-storage buffer unitso Each buffer un.it is internally programmed and serves principally as a data-transmitting unito A buffer unit (BU) acts as a controlling unit when co.nnected to subordinate units It is the only other type of controlling module in the systemn (3) Drum Mcdule (DM)o A magnetic drum storage unit. (4) Tape Module ()ioM) A magnetic tape storage unitO (5) Peripheral Buffer (PB) o A magr.netic drum storage unit which serves as an input/output buffer between the system and operator consoles0 (6) Central Exchange (CX)o A transfluxor switch matrix providing for a physical connection between any pair of controlling and subordinate modules, subject to program control, A large number of connections of module pairs may exist simultaneouslyo ('7) Miscellaneous input/output devices such as User Modules (UM), Printers (PR), Plotters (PL), and Display and AnYalysis consoles. (8) Display Buffer (DB)o A magnetic drum storage unit which services cathode-ray tube for display consoleso 3

Since the CX module is in many respects the heart of the system, it deserives further discussion. The path of communication between a controlling module and a subordinate module is through the matrix of the CX switcho When a controlling module wishes to transmit or receive data from a subordinate module, it must request a connection to that module via the CX. In the memory unit of the CX, a table of module assignments is maintained by which it is possible to restrict connections for each controlling module to a specified group of subordinate modules, Before a connection is established, the CX consults this table to verify that a requested connection is allowable. The listings in the module assignment table are under control of the master program (to be discussed in the next section). The process of establishing a connection also includes a test to insure that a requested subordinate module is not being used by some other controlling module. The means of communication between controlling modules is via an "alert" signal generated at the CX and directed to a controlling module upon command of another controlling module. The allowable alert signals are also listed in the module assignment table, so it is possible to restrict communication between controlling units according to master program control. Upon receipt of an alert signal, the controlling module has the option, according to its program, of responding immediately or at a later time. If the number of alternative responses desired exceeds the number of different alert signals which can be sent to a controlling module, the polymorphic organization allows for additional communication between controlling units by giving two or more controlling modules access to the same subordinate modules, via the CX module assignment table. 2.2. The Master Program Responsibility for control and coordination of the modules in the system is given to a master program, an executive routine that supervises the progress of all jobs through the system and monitors the status of the modules0 Descriptions of two proposed master programs for the AN/FSQ-27 system were made available to this research group by Ramo-Wooldridge. The following paragraphs are an abstract of the basic features found in both proposals. The master program is responsible for accepting the problems to be run on the system and for assigning to them the modules needed for their operation. One entire computer module, designated the master computer, is reserved for the operation of the master program. However, for proper communication, a part of the master program is also stored in every other computer module (that is, in every job computer), in the entire system. The master computer communicates with these job computers via the alert system and by the use of shared subordinate modules. Certain of these shared modules are used primarily by the master program for storage of information that cannot be kept 4

in the master computer memory. A drum module stores lists and descriptions of the condition of the problems being processed and the modules in the system. A tape unit may be needed for storage of programs. After cycling through a basic loop of monitoring operations (Figure 2), the master program in the master computer checks the peripheral buffer to see whether there are any new requests. All such requests are placed in a queue, or list, of waiting jobs, in order of priority. The priority of a particular job may be assigned by the system itself or by an external agent. Get Job requests Put the Jobs into Delete the cornfrom the peri- the queue in order pleted jobs from pheral buffer. of priority. the queue. I / Have all the waiting Jobs been YES \ considered? JNO Scan the queue for waiting Jobs. Set the CX memory for the h ob comeanpute. ae YES Can equipment be assigned to Alert the Job computer to this ob? start work. NO Alert the job computer to Can equipment be pre-empted \ interrupt its present YE ( from a lower-priority job activity. ^s job? NO Figure 2. Master computer functions. The queue is examined periodically to see if there are waiting jobs which can be assigned equipment and started. The alert system is used to interrupt the execution of jobs of low priority to allow early completion of more urgent requests. Just before a job computer starts working on a 5

new job, the master computer must note the equipment assignment in the CX memory and then alert the assigned computer module to start execution of that job. Although the master computer is responsible for most of the master program functions, job computers perform some of these functions (Figure 3) as well. Input and output for job programs are controlled by the job computers through the peripheral buffer. When a job computer has executed a job, it notes this fact on the record of the job in the queue, and can then initiate action on any other job it finds in the queue which is ready to be started. It is the responsibility of the master computer to remove completed jobs from the queue. Monitor input and output Execute a Job. through the peripheral buffer. Mark the Job "completed" on the queue. Yes Is there a Job ready for execution? No Wait for an alert from the master computer. Figure 3. Job computer functions. 6

3. DESCRIPTION OF THE SIMULATION OF THE AN/FSQ-27 A program has been written to simulate, on the IBM-704, the AN/FSQ-27 data-processing system. The purpose of this section is to outline the features and flexibility of this program. The equipment features of the system which were modeled are described in Section 2.1, Because the master program for the AN/FSQ-27 was not fully detailed at the time this simulation was written, the master program modeled is defined as consisting of precisely those features included in the simulation program and described in Section 3.2. This organization was chosen primarily for two reasons: (1) it includes the most basic characteristics of the master programs that Ramo-Wooldridge was developing, and (2) it is the least complicated organization that would allow a simulation of the system in the detail best suited for the study. 3.1o Fundamental Concepts 3oo,11 THE TIME LOG The AN/FSQ-27 system can be viewed as a number of independently and simultaneously operating activities: the master program execution by the master computer, job requests arriving as system input, and processing of the job requests by the job computers. The history of each such element in the system which is operating in parallel with other elements can be depicted by a series of time intervals, each one marking the occurrence of a particular event. For example, we consider the activities of the master computer as a series of events representing the functions which the master computer performs while connected to a particular subordinate module (Figure 4)0 This time scale is not a part of the simulation program as such, Rather, the program operates through the use of a time log which is the superposition of the time scales for all the independent activities in the system. At the start of a simulation run, the time log consists of the initial events for each part of the system. The program then picks up the first entry in the log and operates on it; that is, it simulates the activities of the system element which are to start at that time, and it generates (usually) another entry in the time log (Figure 5). The intervals between successive events are generated by the use of input parameters. These intervals need not be of equal duration, either in the individual time scales or in the superimposed time log. 7

time scale..... At time 0, the master computer connects to the peripheral buffer to check for new Job requests.......At time 50, the master computer connects to a tape unit to find the basic information on a job program.......At time 125, the master computer connects to a drum to put the Job on the program queue. Figure 4. Master computer events. 3.1.2. REPRESENTATION OF COMPUTER ACTIVITY The activities of computer modules that are modeled by the simulation are designated as "joints," periods of time in which the computer module is connected to a particular subordinate module ("minor" joints) or to a series of subordinate modules ("major" joints). The master computer's activities are represented by minor joints only. Associated with each joint is a particular master program function. The function is simulated when the joint appears in the time log. Each job program can also be considered as a series of connections between a computer module and subordinate modules, each connection lasting a certain time. The modules concerned are those assigned exclusively to that job and the shared modules (e.g., the PB). The simulation program models these connections in different depths. Any consecutive series of connections to a number of exclusive subordinate modules is modeled as one interval of time, i.e., as one major joint. Any connection in which the subordinate module is a shared module as a minor joint. Moreover, each job program is presumed to be an alternating sequence of minor and major joints (Figure 6). 8

time log initial entries subsequent (computed) entries start of master computer event........ request for input problem type 4.......................... start of event for job computer ^C.............................., V request for input problem type 6....................... s.. start of next master computer event start of event for job computer #2.........................next request for input problem type 4 Figure 5. The simulation mechanism. 9

CM - PB minor Joint CM - BM BM -DM major Joint CM - TM1 CM - TM2 CM - PB minor Joint BM - TM1 CM - BM major Joint BM - TM2 CM - PB minor Joint * ~ ~ 0 Figure 6. Job program representation. 3.1.3. SIMULATION PARAMETERS Certain characteristics of the hardware are variables in the simulation. The system components-the number of modules of each type-can be specified. In addition, one can enter parameters which specify the access time to each module type used by the master program. (Access time to modules and exclusively by job programs is not used in the simulation.) Two aspects of the central exchange are variable: the switching time-the time to connect or disconnect two modules or to send an alert; and the time it takes the master computer to load the central exchange memory, during which period the CX is unavailable for any other purpose. Several different problem types may comprise the input to the AN/FSQ-27 system, with each problem type being defined by the following characteristics: (1) the rate of arrival of the problems; (2) the number of major joints (which is also the number of minor joints); (3) the length of the major joints; (4) the length of the minor Joints; (5) the priority of the problem type; 10

(6) the modules required for the job; and (7) the interrupt disposition of the job; that is, the time delay between the arrival of an alert from the master computer and this job's recognition of that alert (which is the time at which this job will be interrupted) One may also specify a certain interdependance between jobs with respect to arrivals, so that the simulated request for job type a will always occur at a given time after the completion of job type b. The master program is portrayed as a series of functions each of which is preceded by a connection to a subordinate module. Although the functions themselves are an integral part of the simulation program, it is possible to specify arbitrarily which controlled modules are involved and how long each function takes to perform. There is also a certain flexibility in the master program's ability to accept alerts from other computer moduleso Almost all the parameters listed above are given as random variables to be computed by the program. A code is given which tells the simulation what distribution function is required. Four such codes are incorporated in the program: a constant, an exponential distribution, a uniform distribution over two intervals, and a normal distribution. It is relatively easy to add other functions, and these additional distributions automatically become available for use for any simulation parameter. Although it is simplest to start the simulation run from a condition of rest (with no jobs in progress), this is not necessary, The initial conditions are completely arbitrary within the limitation that the run must start at the beginning of an event on the time log. 3o2. Functional Description of the Modeled System The following sections describe the events in an operating AN/FSQ-27 system from three different points of view: the passage of a job program through the system from its request to its completion, the activity of the master computer in processing jobs and monitoring the system, and the responsibilities and activities of the job computers. 3.2.lo PROCESSING A JOB PROGRAM 3,2.,1o The Backlog The input and output devices which communicate with the rest of the systen via the peripheral buffer (PB) or the display buffer (DB) are not sim11

ulated as such; the simulation program models only the appearance of input in the PB and the placing of information by the system into the PB. The master program (MP) first becomes aware of the entry of a job into the system by the appearance of a job request in the peripheral buffer (Figure 7). Job request arrives Peripheral buffer L ZBacklog Stand-by Execution Completion Job is reported out Figure 7. Processing a job program. Dotted lines are used to indicate the steps a job may be forced to take backwards due to the obtrusion of a higher-ranking job. The master computer (MC), during its periodic inspection of the PB, removes the job from the PB and inserts it into a queue, the "program queue," which holds all the job programs in the system. At this point, the job is said to be in the backlog. The program queue is in order, first by priority number [determined by the input parameters and applicable to every problem of a given type (Section 3.3.3.)], and second by the time at which the job was requested. Rank will be used to refer to this double ordering. The highest rank belongs to the earliest job with the smallest priority number. 12

3.2.1.2. Stand-by status The MC then tries to assign to this job those modules, exclusive of shared equipment and a computer module, which the job requires for execution, When these modules have been assigned, the job is said to be in the stand-by list. The master computer looks first &t the list of available equipment, that is, those modules which are neither shared nor assigned to another job. When all the modules that a job needs are available, those modules are then marked as assigned to that job. If all the necessary equipment is not available, the MC looks first for a lower-ranking job in the stand-by list whose assigned equipment, when added to that presently available, will satisfy the requirements of the higherranking job. In such a case, the job in stand-by loses all its modules and is returned to the backlog, whereupon the job in the backlog is assigned the modules it needs and placed in the stand-by list. As a second resort, the MC looks for a lower-ranking job already in execution, whose equipment could be pre-empted. If such a job is found, its job computer is alerted and the master computer waits for a response. Upon receiving that response (in the form of an alert, which indicates that the lower-ranking job has been demoted by its job computer from execution phase to stand-by), the master computer demotes that job still further to the backlog, and then proceeds to assign to the stand-by list the job it was originally working on. If an input problem cannot be assigned to stand-by, it remains in the backlog until the MC again attempts this assignment (Section 3.2.2). 3.2.1.3. Execution Phase After a job has reached the stand-by list, the master computer tries to find a computer module (CM) that can start executing the job. If there is a CM free, it is immediately appointed to the job and execution begins shortly. Otherwise, the MC looks for a job computer that is executing a job of lower rank. If it finds one, it alerts that job computer to stop and again waits for a response. At the response, the job computer is assigned the new job. If a job is interrupted to yield its computer module to a higher-ranking job it is returned to the stand-by list. If it must also surrender its other equipment, it retrogresses to the backlog. In either event, it is then treated by the master computer exactly the same as any other job in the program queue. If the interrupted job is left in stand-by, the master computer does not attempt to find another job computer for it. When a job computer picks up an interrupted job from the program queue, that job may be restarted from exactly the point at which it was interrupted, or a restart penalty may be assessed. This restart penalty does not include the additional time which must be spent by the master program in again assigning equipment to the job, etc, 13

3.2.1.4. Completion When the job is completed, at the end of its last major joint, it is so marked in the program queue. The master program, in its periodic inspection of the queue, reports the completion of the job to the system operator (via a message through the peripheral buffer) and at this time the problem is removed from the queue. 3.2.2. THE MASTER COMPUTER The master program in the master computer cyles through a basic computation loop, occasionally answering an alert from a job computer, and then returning to the point at which it was interrupted (Figure 8). The peripheral buffer is examined periodically to see if any job requests have arrived. Each job is removed from the PB, its priority number and equipment requirements are obtained from the purivew table, which contains the specifications of all the job types, and it is then inserted into the program queue. All the job requests in the PB are processed, with each job put into the queue before the next is removed from the buffer. The master program then examines the program queue to see if any jobs have been marked by the job computers as completed. These are removed from the queue, their completion reported to the system operator, and their assigned modules put back into the pool of available equipment. Again, all completed jobs are removed from the queue at this time, and processing is carried out on one job at a time. If there were no new job requests and no released modules were made available, the basic cycle is completed at this point and the master computer loops back to re-examine the peripheral buffer. Otherwise, the MP scans the program queue attempting to assign equipment to jobs so that they may be executed. This scanning starts with the highest-ranking job in the queue and covers all the jobs in the queue in backlog status. The MP first tries to find the equipment required for the job from among those modules currently available. If sufficient equipment cannot be found, the MP scans the queue in reverse order of rank to find a single job whose modules, if released, would enable the higher-ranking job to be moved to stand-by. The queue is inspected first for jobs in stand-by and then for jobs already in progress: that is, a stand-by job is selected for demotion rather than a job being executed, regardless of their relative rank. In either case, when the master program demotes a job from stand-by to backlog, it replaces all its modules into the pool. If a job in the backlog cannot be assigned to stand-by, the master computer selects the next (in rank) backlog item in the program queue and proceeds to work on it. If a job in progress is interrupted, its priority number is decreased (made higher) by 1 and it is re-ranked in the queue accordingly. 14

Legend: Da^^\~~~ n;| ~~n: the joint number in" XX ~ XX: the controlled module:the point at which the connection to 1~^< I-PB ^> )(XX is made. Is there a Job oes the progra request in the -MD ueue contain a PB? completed job? Yes Yes Return the job's modules Set switch ll to available status. a= a. Set switch a =al <^2-MT \> < 5-PB Get the Job Report the information from completion of the purvithe purview tablee ob. 33-MD < ^6-MD Put the new job Remove the completed into the program Job from the program queue. queue. Figure 8a. Master computer functions. 15

Set switch a - a. 2' Is there such Select the first a-\. ^ } ~...job ob in the backlog. |] ' ~Yes Ithr Move the Job from backlog Is ther Are there modules available? ^~ ^to stand-by. ~ fa f~ computer free? Would the modules be available if Ye s t | another Job were removed from stand-by? Set switchA _____ _______________________ Reassign the interrupted I~~ 1Job's modules. 1 = " Select the next No Job in the / Set switch a = al. -M backl /~ Move te new ob from back- | Would the modules be available if log to stand-by.,- -- ~ 7-X > an/ ~e Ja job inre proressa were interrupted? I Set switch n =- 1. Adjust the priority of the Job Has that Job Ws the to be interrupted. computer Mark the Job computer busy. Alert the Job computer, responded? an alert? ^o u d( Have all the alerts been answered?) f < -> Wait for the Job /~Point at which the Me \ computer to respond r interrupted its basic loop to Alert the ob computer answer an alert. ~ < l -— ( ~ Mark that Job computer free. ^ ____________ ~~~~~~~~~~~~~~Yes Set switch | __ |Determine which job computer Is this alert in Set the X Adjust Jh prioriy from the MC? o Figure rb. Master computer functions.

If it is necessary for the MC to alert a job computer which is executing a job, the MC issues the alert and then waits for a response. In effect, the master computer module is engaged in a loop which will be broken only by the arrival of an alert from a job computer. Upon receipt of an alert from any computer in the system, the master computer leaves its loop and acts upon the alert. If that alert was not the one for which the MC was waiting, the MC will re-enter the waiting loop. Only the master computer can set the CX memory for the job computers. There are two points in the master program at which this is done. First, if a job can be assigned to stand-by and if there is a job computer which is not working on another problem, the MC arranges for the job to be started immediately by loading the job program's equipment assignment list into the CX memory and alerting the idle job computer to start work, The MC then drops further consideration of that job and immediately proceeds to the next item in the backlog. Second, when a job computer completes its present work and finds another problem in the queue to start on, it alerts the MC. The master program can accept and act on these alerts at several points-before the beginning of certain specified joints in the program, and at any time when the MC is in a loop waiting for a response to an alert which it has sent out itself. The CX memory is set for the job computer when the MC accepts the alert. After all the backlog items have been considered in this way, the master program restarts its basic computational cycle by re-examining the contents of the peripheral buffer. 3.2.3. JOB COMPUTERS Each job computer (JC) is responsible for some master program functions: that is, a part of the master program is stored in each job-computer module (Figure 9). At the end of a job program, the JC finds the job's record in the program queue and marks it complete. At this point, the JC no longer has any responsibility for that job. The JC then searches the program queue, in order of rank, to find a job which is ready to be executed. If there is no such job, the JC waits for further action from the master computer. If, on the other hand, there is a job in stand-by, the job computer alerts the MC so that the MC can set the CX memory for it. After the alert is issued, the job computer waits for a response. Upon receipt of that response, the job computer starts work on the new job, after noting on the program queue that the job is now in progress. When a job is interrupted, the JC notes this fact on the job's record in the program queue by marking that job as being back in the stand-by list. 17

which the Job p2 s completed 2 Mark the Job "complete." Set switch p P 1 Set switch p = pi. Put the job in stand-by. Is there another Job 2 ready to be started? V Yes 26-OX Mark the Job computer free. Alert the Alert the E.C. < 23>~ ~ ~ <27-MTr Wait for an alert from the ME. Dump memory. Point at which <24-C> ~ --- the job is 6-PB interrupted. / Clear the alert. \~I Report the interruption of the Job. Get the job program from Mark the job Point at which M7 iJI> fthe program -MD "in progress." < the job is started < | ~tape. /u Set switch p=P2 or restarted, Figure 9. Job computer functions. 18

Also noted is the exact point at which the job was interrupted. This information, plus a memory dump, permits proper restart procedures. The job computer then issues an alert to the MC to tell it that this action has been taken. The job computer also issues a message to the system operator stating that the job is no longer in progress. Then the JC waits for further action from the MC. 3.3. Mechanics and Techniques These sections describe in detail the technique by which the simulation program implements the required functions. 3.3.1. SIMULATION PARAMETERS The simulation program proceeds by means of data which are grouped by function and stored in tables in memory, The data in these tables are completely set by the input cards for the simulation, which are read into the 704 at the start of the program. As the program runs, these data are changed to indicate the status of those aspects of the AN/FSQ-27 that are being modeled. The first part of the program reads in the input data cards and checks the correctness of the format. When this has been done, one page is printed giving the run number and other incidental information. Then the second part of the program is brought into core memory and the actual simulation begins, using and changing the data in the tables. At the user's option, the first part of the program may be read in at various times to punch out the contents of the simulation tables. These tables are also punched out at the end of the program, thus allowing one to restart the program where a previous run has been stopped or at earlier points, in case of machine difficulties, This input and output is primarily the function of the START subroutine. The parameters in the simulation tables are given either as constants or as random variables of specified distribution functions (Appendix Aol.2). A brief list of the tables is given in Table I with functional descriptions given throughout this section, and a detailed description in Appendix A.1,3. 3.3.2. THE TIME LOG The principal mechanism of the simulation program is the time log, a table which consists of entries representing the next occurrences of all the independent activities in the AN/FSQ-27 system. These entries (rows in the TIMELG table) are items of several words each, containing the simulation 19

TABLE I SIMULATION TABLES 704 Name Name Contents IGPLOG Input generating A list of job program.s, by type) which are program sequence to be input to the AN/FSQ-27 in, presoribed log sequence. IMPLOG Master program A list of both the controlled modules to event log which the master computer connects to perform its functions (Figures 8 & 9) and the parameters giving the ti+mes to perform these functions. JRC Job computer record The status of each of the computer modules working on job prograrms. MAT Module availability The status of each module in the system — table whether it is busy or not, and w:hether it is available or has been assigned to some particular job. MCT Module characteristic The access time to each t'ype of shared modtable ule. MISC Miscellaneous array A collection of assorted variables:impcssible to describe briefl.yo The parameter it holds which is of chief concern is the switching time of the central exchange. PERBUF Peripheral buffer A list of those jobs which have arrived as queue input to the AN/FSW-27 but which the master program has not yet started processing. PURVUE Purview table The specifications of each type of job which is input to the systems the length and number of its major joints, its interrupt disposition, its equipment requirements, it priority number, and its arrival date. QUEUE Program queue The status of those jobs which are being processed through the systemi After a job is picked up from the peripheral buffer queue, it is placed into the program. queue until it; is completed and has been reported out to the system operator. SEQQ Sequence queue The status of those IGPLOG sequences which are being processed through the systemo TIMELG Time log The over-all status of the simulation. Roughly speaking, the next occurrence of each type of event is listed in the time logo 20

time and information about the type of activity which that entry represents. The main activities initiated by time log entries are minor joints (for both the job computers and master computer), job-program major points, jobprogram arrivals, and the end of the simulation run (Figure 10) The jobprogram minor joint, representing as it does a connection to a shared module, is considered here to be a part of the master program. The items in the time log are always kept in order by time by the use of the TIMLG subroutine. The simulation program operates by selecting the first entry in the logo Control is then transferred to the subroutine, which performs the simulation function indicated by that entry. This subroutine may change some words in the time log entry, including the simulation time, after which that entry is moved to a new position in the log. In effect, the old item is erased and a new one created. Whenever a new item is inserted into the log, it is placed after all the entries due to occur either earlier or at the same time. This is of particular significance in the modeling of the CX (Section 3o3.7). A full 704 word is used to hold simulation time. Therefore, the largest time quantity which can be used in the simulation is 235-1, or 34,359,738,367. If, for example, a run is started at time -(235-1) microseconds, the program could simulate 19 hours of real time. 3.3.3. THE INPUT GENERATING PROGRAM Each job program entering the AN/FSQ-27 is considered to be of a given class, or type, po The characteristics of each job type are specified in the purview, or purvue, tableo As each job arrival is simulated, the job request is placed into a queue in the simulated peripheral buffer, where it stays until the master computer removes it for processing. Each new arrival is assigned a consecutive job number k, regardless of the type of job or the method of arrival generation. There are two methods of generating problem arrivals. In the first, there must be an initial entry in the time log with the job type, and, of course, the time of arrival of that job. Each such entry in the log generates a succeeding entry for that job type, at a time interval given in the purview table (Figure 11)o A second method of generating arrivals allows the user to represent related sequences of job programs. Each of these sequences is composed of a set of "events," where an event may be either the execution of a job of a given type, or a time interval (which might be used to simulate off-line activity between computer operations) One can then specify that the initiation of a set of one or more events will occur upon the completion of another set of one or more events. For example, one might want to describe a sequence of job arrivals in the following manner: 21

Determine the next event to occur by finding the first entry in the time 0Log. Input Generating Program Put the next program request into the peripheral buffer. Simulation of Job Programs Generate the time duration Determine what type of the next major joint. of event th isI r\) Simulation of the Master Progra Simulate a minor joint and perform the associated master program function. Fig. 10. Program flow diagram. End of Simulation Read in the next set of parameters and begin the program again. Figure 10. Program flow diagram.

Examine the time log entry. Assign a Job number k. Place the Job at the end of the peripheral buffer queue. Determine, from the purview table, the time interval after which the next arrival of this Job type will occur. Move the Job arrival entry in the time log to its new position. Get the next time log entry. Figure 11. Generating independent job requests. (a) Problem type 3 is begun.l (b) At the completion of 3, there is to be a time delay of 1,000 seconds. (c) At the end of that delay, problem type 4 is to be started, and, at the same time, a time interval of 2,000 seconds will be begun. (d) When both events started in (c) are completed, another arrival of problem type 1 is to be generated. lWhen we say in this discussion that a job is begun, we mean that an arrival of that type is placed into the PB queue. 23

Each such sequence is considered to be of a given type r, with the characteristics of each sequence type specified in the IGPLOG table, As in the first method of generating job-program arrivals, the initial time log entry for each sequence generates a succeeding entry, at a time interval given for that sequence in the IGPLOG. As each sequence is initiated, it is assigned a consecutive sequence number L. Using a sequence to describe job-program arrivals may create additional entries in the time log: when an event is initiated which represents a time interval between jobs, entries will be made in the time log, at the time of completion of this event, for each event that follows this time-interval event (Figure 12). With the first method of arrival generation, the initiation of the next job of that type does not depend on the completion of the preceding job of that type. With the second method, the initiation of the next sequence does not depend on the completion of the previous sequence. Both these methods of specifying job arrivals may be used during one simulation run, with several different sequences being used and several different problem types arriving independently. The same job type may appear both independently and as parts of sequences. The same job type may appear more than once in the same sequence, and there may be more than one time log entry for the same job or sequence type. Each initial entry in the time log, and the set of subsequent entries it generates, are completely independent from all other entries in the log. 3.3.4. MINOR JOINTS There is one and only one entry in the time log for each computer module in the system. The job computers perform both major and minor joints; the master computer performs only minor joints, One word in the time log entry for each computer module states whether the next function to be performed by that computer module, starting at the time given in the time log, is to be a minor joint or noto The IMPLOG table lists all the minor joints in the simulation program, Joints 1 through 15 and 29 are master computer functions; 16 through 28 are performed by the job computers. On appearance of a time log entry calling for a minor joint, the MPMIN subroutine takes the following steps (Figure 13): (a) The joint to be starting is determined, This is given in the time log entry, except when the master computer has received and is accepting an alert (Section 3 o36) (b) The computer module is disconnected from its subordinate module, and CX switching time is added to the present time as given inth the time log entryo The time log entry contains the number of 2k

Examine the time log entry. Can the specified event be No started? (Have all of the precedent events been completed? ~es Determine what type of event this is. Is this a Job program or a time interval? Job program time interval Insert in the time log, at the point Assign a Job number k. indicating the end of this time Place the Job at the end of interval, an entry for each event the peripheral buffer queue. which is to follow this event. ~ - ~..... Determine, from the IGPLOG Was this the start of a afterwhichthis sequence new sequence? V now sequence? y | type will be restarted. No _Move this time log entry to its new position. Get the next time log entry. Figure 12. Generating job request by use of sequences. 25

Detexmine the Joint to be startedL Disconnect the computer module from its subordinate module, and add in switching time. Is the new subordinate module available? No Yes Connect the computer module and add in switching time. Perform the particular master program function associated with this joint and determine the next Joint to be started. Note in the time log the next joint to be started. Add in the time required to perform the master program function, and move the time log entry to its new position in the time log. Get the next time log entry. Figure 13. Minor joint action. 26

the subordinate module to which this computer module is now connected. The MAT table lists all the modules in the system, by type only (i.e., if there are two or more modules of the same type in the system,all are listed in MAT, but nothing differentiates one from another). The disconnection here is modeled by finding any module in MAT of the given type which is marked busy and not disabled, and re-marking that module as free, or available. The appropriate word in the time log item is now set to zero, indicating that the computer module is no longer connected to a subordinate moduleo (c) The subordinate module for the next joint, if any, is determined from the IMPLOG, and the MAT is searched to see if any module of this type is available and not disabled. [This searching does not take place if the subordinate module is the central exchange "module" (Section 3~3.7), since this pseudo module is considered always free ] If no such module is free at the moment, the time log is searched to find the time t when the first module of the necessary type will become free. The entry for this joint is then moved in the time log to time t, and, as always, is placed in the time log after all the entries at time t. There is no more activity on this joint at this timeo (d) If the subordinate module is available, it will be marked as busy in MAT and the time log entry for this computer module will be marked to show that the CM is now connected to a subordinate module of the given type. The access time to the subordinate module, computed from the parameters in the MCT table, is added to the present time as given in the time log entry. (e) Control is now transferred to the particular section of the MPMIN subroutine which performs the simulated master program function (Figures 8 and 9)o These program sections also determine the next joint to be executed by this particular computer module. Any action taken at this point which refers to "present time" considers as present time the time that the joint started plus CX switching time plus access time to the subordinate module. This figure is found in the time log entry for the jointo (f) The general section of the MPMIN subroutine places the next joint indication into the time log entry, adds the time of the joint (as found in the IMPLOG table) to the present time in the time log entry, and enters the TIMLG subroutine to move the entry to its new position in the log 3~ 3.5. JOINT NUMBER BOOKKEEPING At this point it is advisable to digress to introduce the concept of main routines and subroutines. As used in this simulation program with re27

gard to the activities of the AN/FSQ-27 computer modules, a main routine is the principal activity in a computer module, while a subroutine is an activity performed repetitively, from different points in the main routine. In job computers, the main routines are defined as major joints of job programs, while all master-program activity, or minor joints, performed by the job computers are considered subroutines. The repetitive use of these minor joints is obvious, when one notes that different job programs are run by a given job computer, but the same minor joints are used for each job program to effect its execution. In the master computer, the main routine consists of those minor joints which perform the regular tasks of accepting new jobs into the system, assigning them equipment, and finally removing them from the system. There is but one subroutine in the master computer, and that is the set of minor joints which is entered when a job computer alerts the master computer (Section 33..6). It is necessary for the simulation program to keep track of a computer module's progress as it goes from main routine to subroutine and back again. Two words in the time log entry-j and j'-accomplish this. j is the number of the next joint in the main routine to be executed; j' is the number of the next joint in the subroutine to be executed. A computer module enters a subroutine by setting j' equal to the number of a particular minor joint which is an entry to a subroutine. As the subroutine progresses from joint to joint, j' is progressively changed, while j is constant. At the end of the subroutine (during its last joint), j' is set equal to zero. This indicates to the simulation program that the next joint to be done by the computer module will be joint j of the main routine. The action of the MPMIN part of the simulation program is always to do the next joint of the subroutine rather than the main routineo For example, consider a master computer which is about to start joint 1 when it receives and accepts an alert from a job computer. Upon receipt of an alert, the master computer enters joint 11, and performs joints 11, 12, 13, 14, and 15 before returning to the point at which it was interrupted The sequence of time log entries which occurs will show j and j' changing as follows: j j' Before the alert is accepted, the time log entry has: 1 0 When the alert is accepted, joint 11 is started and the time log is marked for the next joint: 1 12 At the end of 12, the time log is marked: 1 13 At the end of 13, the time log is marked: 1 14 28

j jt At the end of 14, the time log is marked: 1 15 At the end of 15, the MC is allowed to return to its basic activity, and the time log has: 1 0 At the end of joint 1, the MC is scheduled to start joint 2: 2 0 As a second example, consider a job computer which is alternating between major joints of a job program and minor joints (joint 28 in the IMPLOG table). In this case the sequences of j and j' in the successive time log entries for the job computer module looks as follows: When the next joint to be done is joint 28: 1 28 When the next joint is major joint 1: 1 0 When the next joint is minor joint 28: 2 28 When the next joint is major joint 2: 2 0 When the next joint is minor joint 28: 3 28 3.3.6. ALERTS AND INTERRUPTS Computer modules communicate with each other via a system of alerts, the impulses sent from the MC to a job computer, or vice versa, via the central exchange. The receiving module can interrupt itself to test for and act on an alert at its option, that is, at any time after the alert has been sent. Although this type of action might have many uses when programming for the AN/FSQ-27, the simulation program models only a few particular uses of alerts. 3.3.6.1. Sending Alerts The sending of an alert is modeled by the execution of a minor joint in which the subordinate module is a pseudo CX module (Section 35.57). The conditions under which CM's alert one another can be seen in the general flow diagram in Figures 8 and 9. The master computer alerts a job computer (joint 7) when it wants that job computer to stop whatever it is doing, if anything, and start work on a particular job. The MC also alerts job computers (minor joint 13) when it has set the CX memory so that that job computer can start work on a new problem. 29

There are also two specific instances in which the job computers alert the master computer. When a JC has finished one job and, on its own, has found another job in the program queue which is ready to be executed, the job computer alerts the MC (minor joint 22) so that the MC can set the CX memory for the job computer. The second instance of a JC's alerting a MC occurs after a JC has been interrupted in the middle of a job by the MCo At this time, the job computer notifies the MC by means of an alert (minor joint 26) that it has interrupted itself and will soon be ready for further word from the MC. 3.3.6,20 Receiving and Acting on Alerts The simulation program, in modeling the accepting of an alert, is limited by not allowing most minor joints to be interrupted. The two exceptions to this arise when a CM is specifically waiting for an alert, This waiting procedure, employed by both job computers and the master computer, is modeled by having the computer module enter a minor joint with no subordinate module and of infinite duration (minor joints 8 and 23). This procedure is modeled by causing the time log entry for that module to sink to the bottom of the time log list. When an alert is sent to a CM in this condition, the ALERT subroutine recognizes the situation and immediately arranges for the receiving CM to accept the alert at once, It does this by moving the CM's entry in the time log up to the time at which the alert was sent, and by setting j' (see Section 3o3,5) so that the next joint performed by that CM is the one whose function it is to act on alerts (minor joints 11 and 24) When an alert is sent to a job computer which is engaged at, the time in the execution of a major joint, the following steps are taken to see if and when that JC will allow itself to be interrupted. A time interval is computed from the parameters listed in the purivew table as the interrupt disposition for that particular job type. This time interval is then added to the present time (the time at which the alert was sent) If this computed time of possible interrupt occurs before the end of the major joint (as given in the time log), then that major joint is cut short, by moving the time log entry for the job computer up to the computed time of interrupt, and j' is changed to joint 24, as described in the preceding paragraph, If an alert is sent to a CM, and the situation is not 'one of those described above, a marker is put in the time log entry for the module which received the alert, The word "a" in the time log entry, usually zero, is set equal to the time at which the alert was sent, In the case of the master computer, if an alert is sent and the MC is not in joint 8 (ioe., is not in a position to accept the alert immediately), "a" is first checked to see whether or not it is already nonzero. If it is nonzero, indicating the presence of an earlier alert from another job computer, "a" is left at its previous, lower value. This alert indicator "a" is then used as followsx 30

(a) When a computer module is about to start a minor joint, "a" is checked. If "a" is nonzero and if it is allowable to interrupt that CM before the start of its predesignated minor joint then J' is set to joint 11 or joint 24 as indicated above.2 Whether or not the CM is allowed to accept an interrupt before the start of a particular minor joint depends on parameters in the IMPLOG, set by the user of the simulation program, which state before which joints alerts will be accepted. (b) When a job computer is about to start a major joint, "a" is checked. If "a' is nonzero, the time of possible interrupt is computed as described above, adding the interrupt disposition time interval to the present time (or the time at which the alert was sent, whichever is the greater). The present time in this case is not the time the alert was sent but rather the time at which the major joint was scheduled to be started. The length of the next major joint is then computed (Section 3.3.10). If the time of possible interrupt is earlier than the time at which the next major joint would otherwise end, the end of the next joint is set equal to the time of interrupt and J' is set equal to 24. (c) If an "a" in a time log entry is nonzero, and if the alert is not accepted before or during the next joint, "a" is left as it is and tested again at the beginning of the next joint of that computer module. After a computer module has received and accepted an alert,.it erases the alert signal, i.e., it removes the signal from its input lines. In the simulation program this activity is modeled by the execution of a minor joint (15 and 24) in which the subordinate module is the pseudo CX module. This is not to be confused with the sending of an alert by that CM. The assumption was made, in this program, that the master computer has only one line on which to receive alert impulses, i.e., that it has no way of knowing, when it receives an alert, which job computer sent that alert. The simulation program solves this problem by assuming that certain information is placed on the master drum, which is a shared subordinate module, by the Job computer. This information, contained in the JCR table, is then checked by the master computer upon receipt of the alert impulse to determine which job computers have signaled it and why. 3.3.7. MODELING OF THE CENTRAL EXCHANGE The central exchange is not modeled precisely in this program. We have assumed that the CX is always available to any computer module which requires 2Atidtsistathtieteaetwssnmutntblaethnt A third test is that the time the alert was sent must not be later than the time at which the minor joint is tarting; this test is necessitated by the inaxactitude of the modeling of the CX. 31

it, thus ignoring the jump coimnutator actually used in the AN/FSQ-27. At the start of each minor joint, a constant time representing the CX access time and set by the simulation user with an input parameter is added to the present time as given in the current time log entry~ This represents the time needed to connect with a subordinate module and/or disconnect from it, To simulate the sending and clearing of alerts (Section 3 3~6), the artifice of a pseudo CX module is employed-a subordinate module to which a CM connects to send or clear an alert. Actually, this is just a matter of notation to aid in understanding the progress of events, since the minor joints which "connect" to the CX module act exactly as if there were no subordinate module at all, and the entire concept could be dropped out of the program. The pseudo CX memory module, however, has very real useo To simulate the master computer's loading the CX memory, the device is used of a m;.or joint (12) which has the CX memory module as a subordinate module. The access time to this module, as listed in the module characteristic table MCT, should be set equal to the time needed by the master computer to load the CX memory. This pseudo access time then determines the time t by which time the memory will have been loaded. At joint 12, the time log is examined and all entries occurring before time t are moved back to time t, thus modeling the fact that no access to the CX is possible during this time periodo For ease of programming, there is a slight inaccuracy in that all entries in the time log are so moved, whether or not they represent a future conx.teetiorn to the CXo (IGP entries, for example do not represent such a connectiono) 3.3.8. MASTER COMPUTER JOINTS The master computer executes a series of minor joints as shown in Figure 8. Each minor joint involves the set of general operations described in Section 3.304. In addition, certain specific functions are performed in each joint. The following list of activities complements Sections 3,2.2 and 3.2.3. (1) If there is a job in the peripheral buffer queue, the job is removed from the queue and placed into temporary storage, If there is more than one job in the queue, the first (earliest) is removed. (2) This joint simulates reading the new job's purview table from its place of storage (such as a magnetic tape file)o The simulation program performs no functions, (3) The new job is placed on the program queue, in the backlogo 32

(4) If there are jobs on the program queue that have been completed, the master program removes the job with the highest rank, and puts the modules that were used for that job back into the list of available modules. If there is no such job, and if the switch is not set to go back to joint 1 (see Figure 8 ), then the master program tries to assign equipment to jobs on the program queue in the backlog. In trying to assign modules (including job computers) to various jobs, the master computer simply scans the list of modules in the MAT table from top to bottom and takes the lowest numbered job computer available. (5) The IGP subroutine is entered here, in case the newly completed job is part of a sequence. (6) This completes the removal of the completed job from the queue. (7) This joint alerts a job computer which is executing a job. The function is also performed here of reordering the jobs in the queue, if necessary, because of any change of rank caused by tihe master computer's changing the priority number of a job after interrupting its execution. (8) In this joint, the master computer is waiting for an alert from a job computer. (9) and (10) These joints are entered by the MC whenever a job computer has signaled the master computer that it has interrupted itself. (11) This joint is entered by the MC when it is interrupted. If a job computer has signaled the master computer to set the CX memory, this procedure is initiated and the record of this request, a part of the JCR table, is erased by the master computer. If the JC that sent the alert was the one that the MC had previously signaled, that JC is also marked in the JCR table as being free. (12) The CX memory is loaded (Section 3.3.7). (13) The job computer is alerted. (14) The job computer is marked as busy. (15) The alert signal to the master computer is erased, by setting "a" equal to zero (Section 303.6) 33

It should be noted that the master program will probably spend the major part of its time oscillating between joints 1 and 4, essentially doing nothing, The user of the simulation has the option of speeding up the operation of the program by effectively removing the MC from the time log when there is nothing for it to do (see Appendix, Section A.1.1). 3o3.9o JOB COMPUTER FUNCTIONS The execution of a job program is expressed as an alternation of major and minor joints, beginning with a minor joint. The number of major joints and the length of each are peculiar to each problem type and are defined in the purview table. However, the minor joint is the same for all problem types, both in length and the subordinate module. Each job computer must also perform some of the executive functions of the system, using minor joints, to administer the succession of job programs. The minor joints listed below and depicted in Figure 9 are performed by all job computers in the same manner, regardless of the particular job program being processed. (16) The job computer marks itself as busy. (17) No simulation function is performed, (18) No simulation function is performed. (19) The words in the time log entry for this job computer are set to the proper values for the new job. An interrupted job will be restarted at the major joint in which it was interrupted. That joint will end at a time interval after the present time which is equal to that part of the major joint that was not completed plus the restart penalty, if any. (20) This is a simulation mechanism. (21) The job is marked as completed on the program queue and the queue is searched for a job which is ready to be executed, If there is none, the job computer marks itself as free, (22) The master computer is alerted, (23) The job computer waits for an alert from the master computer, (24) This joint is entered when the job computer is interrupted in the middle of a job, 34

(25) The amount of time left in the unfinished major joint is noted in the program queue, so that the job can be restarted properlyo (26) The master computer is alerted. (27) No simulation function is performed (28) This is the minor joint for all job programs, No simulation function is performed. (29) This joint is a simulation mechanism, 3 3.10. MAJOR JOINTS There are two sets of parameters in the purview table for each job type, giving the number of major joints and the length of each major joint for any job of that type, When a job first enters the system, the number of major joints for that particular job is generated from the input parameters, This number is unchanged for that job until the job is completed. At the time of starting each major joint, the length of that particular joint is generated. If a job is interrupted in the middle of a major joint, the amount of time t left in that joint (not executed because of the interruption) is saved, When the job is restarted, it begins with a (partial) major joint of duration t, plus whatever additional time interval is assessed as a restart penalty (as given in the purivew table) if this is being used, at the option of the simulation user. The computation of joint lengths is done in the subroutine JPMAJ. Complete details of the simulation program are given in Appendix A. 35

4. QUEUEING THEORY STUDIES 4.1. Introduction It became apparent during the contract period that a simulation approach must be augmented by an understanding of simplified analytical models. The mathematical theory of queues, i.e., the study of waiting lines in service facilities, furnishes a very useful analytical basis for study of simple models of the polymorphic system. For example, in the AN/FSQ-27 system one of the major functions of the master computer is the assignment of waiting job requests to the Job computers, the rules of assignment constituting a queue discipline. Hence, the master computer may be modeled as the maintainer of queue discipline. The job computers, augmented by the required numbers and types of subordinate modules, may be considered as single service channels. The resulting model of the AN/FSQ-27, then, is a multiple-servicechannel facility with a single waiting line. If one also reduces the characteristics of the job programs to a distribution on the service time in a channel (job computation time) and a distribution on time between arrivals of job requests, the model becomes one of the simplest to analyze in terms of queueing theory. The analogies between the multiple-channel service facility and the polymorphic computer are summarized in Figure 14. Job reREQUESTS MC JOB REQUESTS ARRIVE ASSIGNMENT COMPUTERS COMPLETED UNITS QUEUE SERVICE UNITS ARRIVE DISCIPLINE CHANNELS DEPART Figure 14. Queueing theory model for a polymorphic computer. 37

quests (units) arrive at the system queue, i.e., the backlog and stand-by lists, and are subsequently assigned to the job computers (service channels) as they become available. This model has been used for two purposes: to determine the length of the simulation run required to obtain statistically significant results, and to gain insight into some of the basic problems encountered in a polymorphic data-processing system. The purpose of this section is to present a logical development of queueing theory and to apply the results to the AN/FSQ-27 as modeled in Figure 14. The application of queueing theory to the problems associated with the utility of the simulation are covered in Section 5. The essential features of the system can be reduced to a waiting-line problem. That is, the measures of system performance of particular interest are the statistics describing the number of requests in the system and the waiting and throughput-time distributions. The emphasis upon the processing time per job request is justified because the system must keep up with the raw data received from the satellite readout stations, Sections 4.3 and 4.4 are devoted to the single- and multiple-channel service facility with exponential arrival and service-time distributions, The direct implications of Section 4.3 for the polymorphic computer are summarized in Section 4.4. Sections 4.5 and 4,6 show particular applications of queueing theory to the storage saturation and shared module queueing problems. Finally, the effect of arbitrary arrival and service-time distributions are discussed in Section 4.7. 4.2. Fundamentals of Queueing Theory3 Basic to the remainder of our queueing theory studies is an understanding of the equations of detailed balance for single- and multiple-channel systems with exponential service-time and arrival-time distributions, The approach taken in the theory of queues is to consider a system, at any instant of time, as being in one of a number of possible states. For example, in the simplest queueing problem, each state represents a certain number of units in the system. Knowing the probability of transition between states, one can write a set of linear, constant-coefficient, first-order differential equations in terms of the state probabilitieso If the concept of system states is extended to include the division of a given channel into series or parallel phases, as opposed to the number of units in the system, the arrival and service-time distributions can be approximated by a class or Erlang and/or Hyper-Exponential distributions. 5The best single reference for this section is Morse (Ref. 1) o 38

The equations of detailed balance for a one- and two-channel system are discussed in Section 4.2.1. In Section 4.2.2 the Erlang and HyperExponential distributions are introduced and the technique for writing the equations of detailed balance when phases are introduced is illustrated by a single-channel system with an Erlang Type Two or Hyper-Exponential servicetime distribution. The only queue discipline considered is first come, first served. 4.2.1. EQUATIONS OF DETAILED BALANCE A single- or multiple-service facility is characterized by the number of allowed states and the probability of being in a particular state Pn(t). The state of a system is, by definition, equal to the number of units in the system waiting and/or in the service channels. If length of the queue is finite, then the number of allowed states N is determined by the number of channels M plus the maximum number of units allowed in the waiting line. The system has an infinite number of states when the waiting-line length is unbounded. The equations of detailed balance are stated in terms of the state probabilities, Pn(t) The t dependence indicates that this probability can, under nonsteady-state conditions, be a function of time. A knowledge of the state probabilities is fundamental to any consideration of system performance, since many statistics, e.g., the mean number of units in the system, are a function of the state probabilities. The analogies between the servicefacility problem and the AN/FSQ-27 will be discussed as the particular queueing problems are considered. However, it is apparent that, for the simplest system representation, the units can be considered as requests for computation, and service channels as analogous to job computers. Now, changes of state result from either the arrival of units at the system input or the completion of services. Consider the transitions to the nth state shown in Figure 15. The probability of the system's being in state n at time t+dt is equal to the sum of the transition probabilities to the nth state plus the probability of remaining in the nth state, all weighted by the probability of being in the source state. Pn(t+dt) = Tnl,n(dt)Pnl(t) + Tn,n(dt)Pn(t) + Tn+l,n(dt)Pn+l(t) (1) where: Ti n(dt) = the transition probability from the ith state to the nth state during the interval dt, i ~ n. 39

T ^^ ^^ ~n-l,n^dt) n + I, n(dt) Pv )l()t) Figure 15. Transitions to the nth state. Tn n(dt) =the transition probability of remaining in the nth state during the interval dt. In general, the transition probabilities are functions of the time interval since the last change of state. That is, Tnl,n(dt) is dependent upon the time since the last unit arrival at the system input. Only when the arrival and service distributions are exponentially distributed can this time dependence be eliminated. Since the number of exponentially distributed events in a given interval are Poisson distributed, the probability of n transitions in time dt is given by Tn(dt) (Xdt) e-Mt n: n Tn(dt) (=.t). (2) where n = the number of events in the interval dt; A = average rate of events per unit time. b0

The probability of more than one event is proportional to dt raised to higher powers and, as a result, the probability of more than one event in the interval dt can be neglected. Therefore it is necessary only to consider transitions from adjacent states. The transition probabilities can be shown to be given by Tn_,n(dt) = Al(dt) Tn+l,n(dt) = S1(dt) Tn,n(dt) = Ao(dt)SO(dt) (3) where: Al(dt) = dt, the probability of one arrival; Sl(dt) = 4dt, the probability of one service completion for a single channel; Sl(dt) = nldt, n <M the probability of one service compleSi(dt) = Midt, n _ M tion for a multiple-channel system; Ao(dt) = l-Al(dt), the probability of no arrival; So(dt) l-Sl(dt), the probability of no service completions; A = 1/Ta, average arrival rate; p = l/Ts, average service rate for a single channel; Ta = average interval between arrivals; Ts = average interval between service completions for a single channel; n = the system state; M = number of channels in the system; p = \/p for a single channel system; and p = \/Mp for a multiple channel system. 41

When the system has more than one channel, the probability of one completion is equal to the sum of the probabilities that any filled channel will have a service completion, as the channels are assumed to be independent. Again the probability of more than one completion is negligible. If that system is in a state n which is equal to or greater than the number of channels in the system, Sl(dt) is determined by the number of channels M in the system. Otherwise, Sl(dt) is determined by the number of channels n which are filled. Notice that the probability of remaining in the nth state is equal to the joint probability that there will be no arrivals and no service completions during the interval dt. The parameter p is referred to in the literature as the utilization factor. This however, is true only when the queue is unbounded (see Section 4.3.1.2). When the queue is finite, the system utilization is approximately equal to p for small p and a large number of allowable states (N). It can be shown, by finding the expected value of the arrival and service times, that x and t are, respectively, equal to the reciprocal of the average interval between arrivals Ta and the average service time for a single channel Ts. It is certainly reasonable that the ratio of the arrival rate and the average service (for a channel constantly busy) would be the utilization factor for an infinite queue system. For a multiple-channel system, the equivalent service rate for the entire system (all channels again continuously busy) is equal to ML. Thus, for a single-channel system, p is equal to \/p while for a multiple-channel system p is equal to \/MI4. Having specified the equations for the transition probability, we can write down the equations of detailed balance for some typical problems. First the equations for a single channel, infinite and finite queue, will be considered. The weighted transition probabilities are shown in Figure 16. Considering the 0th state first, Eq. (1) becomes Po(t+dt) = T.l,o(dt)P_l(t) + To,o(dt)Po(t) + Tl,o(dt)Pl(t) (4) where: T_lo(dt)Pl(t) is omitted T0,o(dt) = [1 - Al(dt) ]S(dt) = 1 - dt T, o(dt) = Sl(dt) = [dt. Notice that the probability of no service completion is equal to one, as the system is already in state zero. Thus Eq. (4) becomes Po(t) + dPo(t) = (l-dt)Po(t) + (Ldt)Pl(t) (5) 42

INOUT QUEUE CHANNEL Xdt] Po( [ dt] PI( t [Xdt]p,(t) [I-(X +)dt]p (t)( ( a s \[ d ]p),(t ( [Ldt] P2 ( t)\,u P X +[I1(1i) dt] P2(t) [I (X +.A)dt PSMPt]P 2(t) k[/dt] P4(t( 3 I [I - =dt P4(t) + - (k+ )dt]Pn(t) [Xdt] l/idt P(+) FINITE INFINITE Figure 16. Transitions for a single-channel system. For the remainder of the states for the infinite queue case, the nth equation of detailed balance is Pn(t+dt) = (/dt)Pn-l(t) + [1 - ( \tL)dt]Pn(t) + (CLdt)Pn+l(t) (6) n > 0 for N infinite 0 < n < N for N finite. For the Nth state the required equation is given by PN(t+dt) = (dt)PN_l(t) + TN,N(dt)PN(dt) (7) +35

where: TNN A(dt) = A(dt)[1- S1(dt)] = - 1dt..Ao(dt) is equal to one because the system is already in the highest allowed state. That is, it is certain that there will not be any unit arrivals during the interval dt, bccause any unit which would normally enter the queue will, in this case, go away since the queue is already at its maximum allowable length. The following set of linear, first-order, constant-coefficient, differential equations is obtained for a finite queue of maximum length 3, by dividing Eqs. (5), (6), and (7) by dt: Po(t) - -Po(t) + kPi(t) IP(t) Po(t) - (Xt)Pl(t) + [P2(t) P2(t) P1(t) - (%k4)P2(t) + IP3(t) (8) P3(t) P2(t) - (hk)+P3(t) + IP4(t) P4(t) = P3(t) - 1P4(t) If the queue is infinite, thie number of equations is also infinite. In this case, Eq. (7) is not considered. When one considers a multiple-channel system, the transitions, Tn+l,n, are modified in accordance with the number of occupied channels. The transitions for a two-channel system are shown in Figure 17. The derivation of the equations of detailed balance is essentially identical to that of those of the single channel, and therefore will not be repeated. For a finite queue (N = 4) the system of equations is given by Po(t) = -o(t) + Pai(t) Pi(t) = XPo(t) - (X+L)P1 (t) + 2P2(t) P2(t) = iP(t) - (2+21)P2(t) + 2P3s(t) (9) P3(t) = XP2(t) - (x+'2)P3(t) + 2[P4(t) P4(t) -= P3(t) - 24P4(t) 44

IN _JI OUT QUEUE CHANNELS Jo) )[I- dt]Po(t) dt]d ]( t( \\[\dt]P^ [(dt]p,(t) 3 r [^2FdtP tXdt] P3( t ) f — [,~,dt]P4.( ) _ [lidt] pq )( ( 4 4 [Pdt]P3t) FINITE INFINITE Figure 17. Transitions for a two-channel system. If the independent variable t is scaled according to t' = itt, if k is written in terms of the parameter p, and if all equations are divided through by uL, the above equations of detailed balance can be written as

Po(t) = -2pPo(t') + Pl(t') Pi(t) = 2pPo(t) - (2p+l)P1(t') + 2P2(t') P2(t) = 2pPl(t') - (2p+2)P2(t') + 2P3(t') (10) p3(t) = 2pP2(t') - (2p+2)P3(t') + 2P4(t') p4(t) = 2pP3(t') - 2P4(t') Observe that t' (i.e., p = l/Ts, therefore t' = t/Ts) is equal to t normalized to the mean service time Ts of a single service channel and, as a result, all solutions are stated in terms of the mean service time for a single channel. In the remaining equations t' will be replaced by t to simplify the notation. The introduction of a matrix notation can simplify the notation to a considerable extent. For example, Eqs. (10) can become P] = [U] P] (11) where: Po(t) Po(t) f1(t) Pl(t) ) (t)] = Pt) (t)] = P2(t) P3(t) P3(t) P4(t) P4(t) -2p 1 2p -(2p+l) 2 [U] = 2p -(2p+2) 2 2p -(2p+2) 2, L 2p -21 U6

P] and P] are column vectors and [U] is a square matrix with constant coefficients. The elements of the [U] matrix are the transition probabilities for the system. Therefore [U] will be referred to as the transition matrix. 4.2.2. CASCADING AND PARALLELING OF EXPONENTIAL PHASES It was pointed out in the previous section that exponential arrival and service-time distributions given rise to a system of linear, constant-coefficient, differential equations for the state probabilities. However, the arrival and service-time distributions to be studied are often nonexponential. In this case, the above-mentioned method of obtaining the equations of detailed balance is no longer adequate because the transition probabilities are a function of the time since the last change of state (Ref. 1). Nevertheless, there are two types of nonexponential distributions which may provide satisfactory approximations to the actual distributions and have the advantage that the equations can be written with constant coefficients: the Erlang and Hyper-Exponential distributions. The derivation of these distributions and the equations of detailed balance obtained when the service-time distribution is either Erlang or Hyper-Exponential and the arrival-time distribution is exponential are discussed in this section. A similar analysis holds when the arrival-interval distribution is either Erlang or Hyper-Exponential. These cases are extensively discussed in Ref. 1. 4.2.2.1. Erlang Service-Time Distribution If a service channel is considered as a cascading of exponential phases, the service-time distribution for the over-all channel is of the Erlang type. A unit being served must pass through every phase in the channel before another unit may enter service, Assuming a cascade of two exponential phases (each having an average service time equal to one-half of the service time for the entire channel), the probability that service for a single unit will be completed in time t+dt is given by s(t)dt = t [2e -2tYdy][2te- 2 (t-y)dt] (12) The first term in the integral is the probability that service will be completed by the first phase by time y, while the second term is the probability that the second phase of service will be completed in the remaining time, t-y. To consider all combinations of y and t-y which will sum to the time of interest t, the above equation must be integrated with respect to y. Thus 47

s(t)dt = 2i(2t)e-2tdt (13) where: s(t) = the probability density for an Erlang Type Two distribution; and 2t = the service rate for a single phase, The class of distributions generated in this way are "less random" in the sense that the variance of the new distribution is less than that for the exponential distribution. Erlang density functions of type k are obtained by higher-order convolutions of the basic exponential density functions. The general form is s(t)dt = (kI)k tk-l e-ktdt (14) (k-l): The equations of detailed balance will now be considered for a singlechannel system with an exponential arrival distribution and an Erlang Type Two service-time distribution. The major modification, with respect to the exponential facilities discussed in the previous section, is that the states of the system are no longer defined simply by the number of units in the system, but must include a consideration of the two phases making up the service channel. Consider the transitions shown in Figure 18. Each state, with the exception of the zero state, is described by two subscripts. The first indicates the number of units in the system, n, and the second subscript, s, describes which phase of the service channel is occupied. The units enter from the queue into the s = 2 phase, with service rate 2k, and then progress into the s = 1 phase. Notice that transition from state n,l to n+1l2 is not allowed. That is, arrivals cause states to change from 1,1 to 2,1 or 1,2 to 2,2 and service phase completions allow transitions from 2,1 to 1,2 (the last phase completes its service and a unit that was waiting enters the first phase). The transitions in Figure 18 illustrate that a unit is either in the first or the last phase, but not both, because the two phases define the one service channel. A unit enters the channel only when the previous unit has completed the last phase of service. Finally, the probability of remaining in the state n,s is determined by the probability of no arrivals during the interval dt and the probability of no service completions by a service phase. The equations of detailed balance follow from Eqo (1). The first equation of the set is for state zero. The remaining equations follow the sequence 1,1; 1,2; 2,1; 2,2; etc. kQ

{ 3 U T 2 -d[I - A Pm( IN OUT QUEUE TWO -PHASE CHANNEL [2/dt] P,, (t) dt t]P( t) [I (t) - k.P0Po( t ) [I-+ 2P,)d(t)t) [l-(2 1)dt]p1,(t) = -(+2) P1 (t) + 2~P1 2(t) [2/ldt] P2 ( t/ [ ] P (t) - (+2)P1,2(t) + 2 P2,1(t) [I (X+ 2)dt] P3 (t) - (+ 22t) X+ 2P2 dt] t) (5 [2, dt] P1, ( tR [XdP2,2(t ) 2) [2dt] P2,2(t) [I -(X-2)dt]p3"( (t) (2Ad~ ~ P 1 ) )[l- (X 2/i)dt] p,2(t) Figure 18. Transient for a single-channel system. Erlang Type Two service distribution. PO(t) = -Po(t) + 24Pll(t) P (t) -(%+24)Pl,l(t) + 20Pl,2(t) P1 2(t) = Po(t) - (%+24)P1,2(t) + 24P2,1(t) P2Y l(t) = APl(t) -(%+24)P291(t) + 2 4P2 2(t) ( 1) 2,2(t) = - lY )P2 2(%+24)P2, 9(t) + 2P 3 l(t) 3,1(t) = xP2,1(t) - (\+24)P31(t) + 24P3,2(t) P3 2(t)= LP2 2(t) - (%+24)P3 2(t) + 2 P4 l(t)

After the solutions for the above set of equations have been obtained, the probability of n units in the system is found by summing the probabilities for the states nl and n,2. 4.2.2.2. Hyper-Exponential Service-Time Distribution The Hyper-Exponential service-time distribution arises when each service channel is considered as being in reality, two parallel exponential phases with different rates. Each unit which enters service chooses one or the other phase. A unit with probability a will enter a phase with mean rate 2a0?, or, with probability 1-a, will enter a phase with rate 2(1-0) p. Service of the unit is completed when the service time in the selected phase is completed. In addition, only one of the two phases may be occupied at any given time. The resulting probability distribution on service time for a single unit is s(t)dt = 2ae 2tdt + 2(1-a)e2(1-a)tdt (16) where: a = the probability of entering the fast phase; and,, = the over-all service rate for the channelo This distribution has a greater variance than the exponential distribution. The equations of detailed balance are derived in a manner similar to those for the Erlang distribution. The state of the system is specified by the total number of units present, n, and the service phase which is occupied in the single-channel case. The latter is characterized by a second subscript s = 1 when the phase with rate 2act is occupied (otherwise s = 2). The equations are P = -XPo + 2a4Pl,1 + 2(1-a)lP1,2 P1, = -[\+2ca4]P11 + o[2cTP 2 1+ 2(l-a)iP2 2] + aP+ P,2 -[+2(1-a)l]P_,2 + (1-a) [2aiP2,1 + 2(1-a)IP2,2] + (l-a) Po (17) n 1 = -[a+2a]Pn 1, + a[2Pn+l,l + 2(1-a)lPn+l,2] + Pn-,1l Pn,2 = -[+2(l-a) n]Pn 2 + (l-a) [2calPn+,,1 + 2(1-a)kPn+l,2] + %Pn-1 2 50

These equations emphasize that the transition from the state n+l to the state n,i depend not only on the rate of service completion in the n+l state (2cPn +, 1+2(1-)iPn+, 2), but also on the probability that the next unit will enter phase io Although the modification of the service time has been emphasized in this discussion, the same tectLnique can be applied to obtain Erland and Hyper-Exponential arrival-time distributionso In thise case, arrival intervals are considered to be exponentially distributed, but arrivals must pass through a pre-processing channel composed of series or parallel exponential phases before arriving at the system input. 4.2.3o SUiMARY As long as the transitions between states are exponentially distributed, the equations of detailed balance are first-order, constant-coefficient, differential equations. It is important to emphasize that the states can be defined with considerable generality, Specifically, the arrival- and service-time distributions can be extended beyond the exponential case by including the phase concept. Sequential queues and systems with priority can be handled by further refinements in the definition of a system stateo 4~3~ Queueing in Exponential Service Facilities The steady-state and transient solutions for a single- and multiplechannel service facility are summarized in this sectiono The arrival intervals and service times are assumed to be exponentially distributed and the queue discipline is first come, first served, It has been shown in Section 4.2.1 that these queueing problems can be described by a set of linear, firstorder, differential equations. P] = [U] P] (18) where P] = a column vector of the state probability derivatives; [U] = the transition matrix; and P] = a column vector of state probabilities. The steady-state state probabilities Pn are statistical descriptions of the system under normal conditions, ioe., normal in the sense that the sta51

tistics are not time dependent. The transient solutions for the state probabilities Pn(t), on the other hand, are functions of the observation time from a given initial state. For example, assume that a service facility is empty at the beginning of each working day. The state probability Pn(t) could be obtained experimentally from the ensemble of observations taken at time t each morning. The transient solutions are obtained by solving the set of differential equations, for a given set of initial conditions on the state probabilities, indicated in Eq. (18). On the other hand, the steady-state solutions are obtained by setting P] equal to zero and solving the resulting set of algebraic equations. The following discussion is divided into two major sections. The singlechannel (M=l) system is considered in Section 4.3.1 and the multiple-channel (M > 1) system is covered in Section 4.3.2. Recall that M is, by definition, equal to the number of channels and N designates the highest allowable state. These parameters are used throughout the following sections to emphasize the particular type of service facility under study. Although the topic discussed under each section will differ in emphasis and content, the general organization of each section will be as follows: Steady-State Solutions Steady-State Statistics Transient Solutions 4.3.1. SINGLE CHANNEL (M = 1) The single-channel system is of interest (a) as an introduction to the multiple-channel facility and (b) as an analogies of the conventional computer. The steady-state solutions, steady-state statistics, and transient solutions for the finite and infinite queue single-channel service facility are summarized in Sections 4.3.1.1-4,3.1.3. Since the objective is to present the results so as to aid in understanding the basic problems, the formulas are not always written in their most sophisticated form. An attempt is made to indicate the important steps for each derivation in the discussion accompanying each equation. 4.3.1.1. Steady-State Solutions Setting P] equal to zero, the steady-state equations of detailed balance for a single-channel system having a maximum queue of length two (N = 3) is given by 52

0 = -pPo + P 0 = pP - (p+i)P1 + P2 0 pP1 - (p+a)P2 + P3 (19) 0 = PP2 - P3 where: p = Vuo From the first equation it is apparent that P1 is related to P0 by the parameter p and, in general, we have the following relationship between Pn and Pnlo Pn = PPn-1 or Pn " P o o n N (20) Po is determined by one additional constraint on the state probabilities, The sum of all Pn's is equal to one. Thus, Po is given by N Po = 1 C pn P l/ 7 pn (21) n=O For the infinite queue Eq. (20) still holdso This follows from the fact that the nth equation relating P~n-l Pn, and Pn+1 is the same for both the finite and infinite queue case. That is, Pn pno 0 n < o (22) Again the state probabilities must still sum to one and, as a result, Po is given by PO = 1 - p N = oo only (23) 53

00 which follows from Eq. (21) by recognizing Z pn as the power series expansion for 1/1-p about p = 0, p < 1. The interpretation of the utilization factor p is apparent from a consideration Eq. (23). The probability of the system being empty is Po. Therefore, the average system utilization is 1-Po or p for the single-channel, infinite-queue case. It is instructive to compare the state probabilities for the finite and infinite queue system. A few values of the state probabilities for various values of p and N are given in Table II. Notice that the Pn's for a finite queue are slightly larger than for the infinite queue case. In addition, the state probabilities tend to become evenly distributed over the n states as p is increased. TABLE II STATE PROBABILITIES FOR A SINGLE-CHANNEL SYSTEM State p =.25 p =.50 p =.2 =.0 =.70 Probabilities N =3 N = 7 N = 10 N = N = N = co Po.75294.50394.30873.75000.50.3 P1.18822.25197.21611.18750.250.210 P2.04706.12599.15128.04688.1250.14700 P3.01177.96300.10590.01172.06250.10290 P4 ---.03150.074130.002930.03125.072030 P5 ---.015750.051891.0007325.015625.050421 P6 ---.0078750.036324 ---.0078125.035295 P7 --- ---.025427 ---.0039063.024707 P8 --- ---.017799 --.0019532.017295 P9 -- ---.012459 ---.00097660.012107 4.3.1.2. Steady-State Statistics The steady-state measures of system performance fall into three categories: direct interpretation of the state probabilities, the moments obtained from the state probabilities, and the distributions for the waiting 54

and throughput time. it is evident that the system performance is measured in terms of some criterion, io.e, statistic, which is appropriate for the particular system applicationo For example, mean throughput time is one measure for a service facility. It is important to realize that the following relationships are valid only under steady-state conditions, From a direct interpretation of the state probabilities one can determine the following probabilities: Po = probability that the system is empty; N E Pn = the average fraction of the time that the queue is n=2 occupied; and PN -= the average fraction of time for which the system is saturated (N < o) and/or the average fraction of the units which do not enter the queue. In general, the quantities indicated above are important if the reduction of system idle time is a prime consideration. However, as p is increased to effect this decrease in idle time, other statistics (mean throughput time, etc.) increase to intolerable levels. There are a number of measures of system performance which are functions of the state probabilities. Several of the following equations expressing these measures are applicable to both the finite and infinite queue system, i.e., N in the equations is simply replaced by N = oo. Many of these series can be easily reduced to closed form for the infinite queue case, and these formulas will be qualified by "N = o only." Otherwise, it can be assumed that the relationship is valid for both cases. The mean number of units in the system and in the queue are given by L E nPn n=l N L = Po E npn (24 n=l N Lq = Z (n-1)Pn n=l Lq L - 1 + Po (25) 55

where: L = mean number of units in the system; and Lq = mean number of units in the queue. When the queue is infinite, L and Lq are given by L = p/l - p N = o only (26) Lq = P N =o only (27) 1-p The mean queue length Lq is plotted in Figure 19 as a function of p. The significance of the first-order pole at p = 1.0 is simply that the queue grows infinitely long (in infinite time) when p is equal to one. The system utilization factor, s.u.f, is always of general interest. It is clear that the mean number of units in service N-1 Ls= 1P1l + 1 Pl+m m=l Ls= 1 - P (28) where: Ls = mean number in service cannot exceed the number of channels. Therefore, system utilization, which is equivalent to channel utilization since queued units are assumed to enter the first channel that becomes available, is equal to the mean number of units in service per channel. Ls s.u.f = s (29) M when M = 1 s.u.f = p N = oo only (30a) s.u.f = p (1-pN) N finite (30b) (1 pNl5l)

16 14 12 10.1 8 6 4 2 - I I I I.5.6.7.8.9 1.0 X P'_z Figure 19. Queue length (L) for a single-channel system (M=l, N=o). 57

For a finite-queue system P0 approaches zero for very large values of p, and for an infinite-queue system p must be less than one for the steady-state solutions to exist. Thus, under steady-state conditions s.u.f < 1 for finite-and infinite-queue systems. This condition establishes the validity of the original definition, Eq. (29). Furthermore, the probability that the system is utilized, or busy, is equal to 1-Po. It is apparent from Eq. (30b) that the s.u.f is not equal to p for a finite-queue system but only approximates p for large N and small p. This point can be emphasized if we recall that p can exceed one for a finite-queue system. Nevertheless, p is often referred to as the utilization factor for finite- and infinite-queue service facilities. Although the mean-value statistics are important, higher-order moments are also of interest. For example, the variance of the number of units in the system is N Var (L) = n2Pn - (L)2 (31) n=l Var (L) = - N = ooonly (32) (1-p)2 Finally, we want to determine the distribution of thw waiting time in the queue and the distribution of the throughput time for a single unit. Throughput time is by definition the interval between the time of arrival and service completion for a given unit. Since the service time is exponentially distributed, the number of completions in a time tw is Poisson-distributed. Given that the system is in state n when a given unit arrives at the system input, we want to know the joint probability of (n-l) outputs during the interval tw and one additional service completion during the next interval dtw. Since the servicing of units is assumed to be independent, the waiting-time incremental probability pn(tw)dtw, conditional upon the fact that the system is in state n, is given by: Pi (n-l) e 7 Pn(tw)dw = J dtw (33) (n-Jle-) t d jl 58

where:. = mean service rate for the channel; and tw = waiting time. The first come, first serve queue discipline is apparent in the derivation of Eq. (33), as the unit which has just arrived waits until all n units have been serviced. It follos that the waiting-time density function, considering all states n, is N p(tw) = Z PnPn(tw) + 5(O)Po (34a) n=l p(tw) = Poe-P~otw + b(O) P N = o only (34b) where: 5(0) = Dirac delta function. Thus the probability that the waiting time will be greater than or equal to some specified time t is equal to the integral of the density function between t and infinity. The delta function accounts for the probability that the system is empty. P(tw > t) = fI p(tw)dtw (35) tw where: P(tw > t) = the waiting-time probability distribution function. The derivation of the throughput time is analogous to that of the waiting time. In addition to considering the waiting which occurs when the arriving unit finds the system in state n > O, it is necessary to consider the service time for the unit. The probability density function for the throughput time tp is equal to the convolution (*) of the waiting and service-time density functions. That is, we want to find the probability density of waiting time tw and a service time ts = tp-tw for all tw's between 0 and tp. p(tp) = p(tw) * p(ts) (36) 59

For the infinite-queue case, p(tw) can be expressed in closed form and, as a result, the following relationship can be easily verified. P(tp) = Pote-"Potp N =- only (37) with the following substitution in Eq. (36). p(tw) = PO1e-IPotw + 5(O) P p(ts) = -eiAts PO = 1 - p Again, the probability that the throughput time tp will exceed a given value t is given by 00 P[tp > t] = f p(tp)dtp P[tp >t] = e-[-p]t N = o only (38) Thus, as p approaches unity it is nearly certain that the throughput time, under steady-state conditions, will exceed relatively large values of t. However, it is important to realize that the steady-state condition for the infinite-queue case has no meaning as p approaches one. The mean waiting time and throughput time can always be obtained by finding the first moments of their respective distributions. However, it is apparent that Tw and Tp are given by Tw = LqTa (39a) Tp = LqTa + Ts = LTa (39b) That is, a first come, first serve discipline specifies that a unit advances in the queue, relative to the end of the line, when a new arrival enters the queue [Eq. (39a)]. Therefore, the mean waiting time is equal to the product of the mean queue length and the average interval between arrivals. 60

4.3.1.3. Transient Solutions for State Probabilities The steady-state solutions for the state probabilities are generally sufficient for most queueing problems. However, there are certain situations in which the transient solution is of interest. For example, the mean arrival rate x is often a function of time. It is evident that the arrival rate can be assumed to be constant over the time interval of interest provided the transients in the state-probability solutions decay in a time which is short compared to the fluctuations in the mean arrival rate %. In such cases the transient solutions must be considered before the steady-state solutions and statistics can be applied. The equations of detailed balance for a single-channel (N = 3) system are of the form Po(t) -P 1 Po(t) P1(t) p -p-1 1 Pl(t) (40) p2(t) P -p-1 1 P2(t) P3(t) P -1 P3(t) There are, of course, two methods for obtaining solutions for the state probabilities. The equations can be solved directly, using the computer, or the solutions can be obtained by analytical methods. It turns out that the former method is satisfactory for our requirements and, in addition, involves considerably less labor than the analytical approach. Nevertheless, considerable insight can be gained by looking at one typical problem in detail. The analytical solutions for a single-channel system having a finite (N = 3) and infinite (N = oo) queue will be discussed in the following sections. 4.3.1.3.1. Finite Queue.-The theory required for the solution of systems of linear, constant-coefficient, differential equations is well known (Ref. 2), and therefore only a few of the high points will be summarized here. For example, the equations of detailed balance can be written as P] = [U] P] (41) Assuming a solution of the form eyt, the following set of homogeneous algebraic equations is obtained: [f(7)] P] = 0 (42) 61

where: [f(y)] = [I]y - [U]; [f(y) ] = the gamma matrix; [I] = the identify matrix; [U] = the transition matrix; and P] = a column vector of state probabilities. To obtain nontrivial solutions for the state probabilities, the determinant of the gamma matrix must equal zero. That is, the y's are equal to the roots of the characteristic equations. Am(y) = (43) where: A(7) = If(r) I; and m = N+1, the degree of the characteristic polynomial. Having determined the roots of the characteristic polynomial yi, Y2,...7i..**m, we find that the solutions for the state probabilities are of the form P] = [k][M(t)][k-]P(O)] (44) where: [k] = the matrix of eigenvectors; [k-1] = the inverse of the [k] matrix; and P(O) ] = a column vector specifying the system status at t = 0. 62

e/lo Po(O) I ee2t p (o) [M(t)] =; P()] - e'Ymt! PN(0) L When the roots are distinct the eigenvector vector ki] associated with the ith root yi is proportional to any column of the adjoint matrix [F(yi)]. (Recall that the adjoint matrix [F(yi)] is, by definition, the transpose of the gamma matrix co-factors.) When the roots have a multiplicity greater than one, the determination of the eigenvector is more involved. However, the above summary is adequate for this discussion, since the roots have been distinct for all the queueing problems which have been considered. If the last two matrices in Eq. (44) are considered, it is apparent that the column vector P(O)] "selects" only certain columns from the [k-1] matrix. For example, for an N = 3 system in state zero at time t = 0 -1 k -'i kI -k41 P4(O) k4l L and kllet. kl4e 4 [k][M(t)] = (46) k4 ieyt... k44e74t

Therefore, pO(t) = k1k- eYlt + k2 e2 + k13k31 e3t + k4k Pokt) 11 12kll + k 314k4 Pi(t) = kk- eylt + k22k21 e72t + k23k3 e3t + k24 Pk2kll + 2k21 31 e 4k (47) -1 t -1 P2(t) = k31ki1 e72t + k3k2-1 e73t + kk3 e3t + k34k41 =1 31 41 P3(t) = k41kll e3t + k42k1 e74t + k43k e74t + k44k when: Po(O) = 1, P1(0) = P2(0) = P3(0) = 0 If, on the other hand, the system is initially in state one, [k- ] P(O)] would be equal to the second column of the [k-1] matrix. It is evident, therefore, that the steady-state values of the state probabilities are P l -1 Po = kl4k4 = k14k42 = k4k4 444 41 1 1 -1 P3 = 44k 41 k44k42 = k44k42 = 44k44 For a single-channel system with a maximum queue of length two (Po(O) = 1, N = 3) the complete solutions for p = 0.25 are P(t) =.085 e-1957t +.144 e-125t +.0498 e-543t +.753 Pl(t) =.0998 e-1 957t-.144 e-1.25t -.14 e-'543t +.188 (48) P2(t) = +.0559 e1957t +.0359 e'2t -.139 e54t +.0471 P3(t) =.0147 e-1957t +.0359 e-25t -.0622 e-*543t +.0117 At least two observations can be made from the above equations. First, the coefficients of the time-dependent terms are the same order of magnitude as the steady-state terms and may be of either sign depending upon the initial condition. As a result, Po(t) is greater than Po while Pl(t), P2(t) 64

and P3(t) are less than their steady-state values. Second, the separation between the roots Y1, Y2, 73 is not sufficient to allow one to approximate the transient solution (for large t) by one minimal root and the steady-state probabilities. The solutions, in terms of t normalized to the mean servicetime for a single channel, are plotted in Figure 20O The value of Pn(6.0) is indicated on the figure with the steady-state value included, in parenthesis, for comparison purposes. At t = 6.0 service-times, the percentage error from the steady-state value in the computation of the mean number in the system is 2.75% with the following errors in the state probabilities:.6,.7, 4.3, 8.5% for n = 0, 1, 2, 3, respectively. It is apparent that the time required to reach P3, assuming P0(O) = 1, is greater than the time required to reach, for a specified percent error, the steady-state probabilities Pn (n < 3). The major advantage of a complete analytical solution over a strictly numerical solution is the added insight which can be gained by a consideration of the coefficients and roots as illustrated by Eq. (48). However, the complete process of root extraction, eigenvalue determination, and matrix inversion in practical only if programmed on a computer; and since The University of Michigan Computing Center had a subroutine available for the solution of linear, first-order, differential equations using the Runge-Kutta iterative technique,4 this rather than the analytical approach was chosen. 4.o31.3.2. Infinite Queue.-When the queue is infinite the analytical method indicated in the previous section is not applicable because the [U] matrix is of infinite order. L. Saaty (Ref. 3) circumvents this difficulty by the following technique. There are three major steps in the derivation of the final result. First, the generating function P(z,t) is obtained from the equations of detailed balance Po(t) = -pPo(t) + Pl(t) Pl(t) = pPo(t) - (p+l)Pl(t) + P2(t) (49) 0o Pn(t) = pPnl(t) - (p+l)Pn(t) + Pn+l(t) 4The program for this computation is described in Appendix C.

,.0 n:Q.8 - ^"~""- Po.757428(.75294).6 Po0(): I Lq=.071 =:.25 '2 Pi =:.186882(.18822).1.08.06 P:.045020 (.04706),040l n=2 — ~ ^, P. -.010671 (.01177).01.008 /.006.004 - /.002 1.0001 2o 30 4.0 5.0 6.0 7.0 t [NORMALIZED TO Ts] Figure 20. Transient state probabilities for a single-channel system (M N=l, 1=3). 66

by summing the above equations. That is, P (z,t) - -(p+l)P(z,t) + pzP(zt) + - P(zgt) - 1 P(l) + P(l) (0) where: 00 P(z,t) = E znPn(t); and n=O P(z,O) = 1 (assuming PO(O) = 1). The Laplace transform of the generating function P(z,t) is then obtained, and is given by z - (l-z)Po(s) P(z,s) - (>1).. [pz2-(p+l+s) z+l] Second, the poles, ol(s) and cz2(s), of this transformed generating function are obtained: U2(s) = p+l+s (p+l+s) 4p 2p 2p where: 10o2(s) I < 1, and cal(s) is found from the relationship al(s). 2(s) = p Because P(z,s) is known to be an analytic function of z for Izl < 1, and since P(z,s) has a pole at z = c2(s), the numerator of P(z,s) must have a zero at z = 02(s). It follows therefore that 02(s) - [1 - ()]P(s) = 0 (52a) or Po(s) 2 (52b) 1 - 2(s) 67

The third and final step is to take the inverse transform fl(LPo[C2(s) ]} (Ref. 4), where Q2(s) is a irrational function of s. The result is ei P+l)t O k+l Po(t) - Z (2) (k+l) k+l(2 Jp t) (5) k=O The expression for Po(t) is thus equal to the product of a decaying exponential and an infinite sum of modified Bessel functions. The solutions for p.25,.5,.8, and.9 are indicated in Figure 21. The principal conclusion to be drawn from this figure is that as p approaches one the time required to reach the steady-state probability becomes infinite. It follows, therefore, that for the infinite queue one must use considerable caution in applying steadystate statistics for large value of p. To obtain other state probabilities, eo,g, Pl(t), simply take the Laplace transform of the first equation in set (49), Po(s) from Eq. (52b), and solve for Pl(s). PI(S) = (stp) 2( - 1 (4) 1 - (2(S) The transforms for the remaining Pn(s) can be obtained similarly, and the Pn(t) are of course determined from the inverse transforms. 4.3.1.3.3o The Approximation of an Infinite-Queue System by Finite System.-It is reasonable to theorize that, if p is small and N is large, the transient solutions for the finite- and infinite-queue cases should be nearly identical. That is, if the steady-state probabilities are nearly equal, then all the Pn(t)'s should be nearly equal. This is in fact the case, as illustrated by Table III. It turns out that, for a p =. 25 and N = 4, the errors are less than.01. The error is greatest for small n and small to The APo, the difference between the steady-state probabilities,5 for p = o8 and N = 20 is equal to.002. Thus, by analogy, a system of N+1 = 21 equations of detailed balance is satisfactory for our purpose. 4.3.2. MULTIPLE CHANNEL (M > 1) Since the discussion in this section roughly parallels that of Section 4.3.1, the major results can be stated without repeating the detail of the previous section. Although the seven-channel system is of particular interest, since this is analogous to the AN/FSQ-27 system, the two-channel system will be used to illustrate the multiple-channel system because at least eight 5Recall Eqso (20) and (22). 68

Po =:75, p:.25 Po =.50, p.50 1.0 Po =.20,p:.80 Po =,0,p.90.8 p =.50.4 0.4 - N =.o p.90.2 0 2P. 4.0 6.0 8.0 10.0 12.0 t (NORMALIZED TO Ts) Figure 21. Transient solution, Po(t), for a single-channel system (M=l, N=oo). 69

TABLE III TRANSIENT SOLUTIONS FOR A SINGLE-CHANNEL SYSTEM WITH p = 0.25, Po(O) = 1.0 State t Probabilities N = 3 N = 4 N =o Pn Po.90623.90623.89700 P1.08852.08852.5 P2.00507.00505 P3.00021.00020 P4 --.00001 Po.85299.85299.84815 P1.13229.13229 1.0 P2.01364.01363 P3.0 8 00108 00103 P4 --.oooo00006 - Po.80066.80065.78512 P1.16755.16752 2.0 P2.02785.02774 P3.00394.00367 -- P4 --.00042 Po.76675.76651.76618 P1.18369.18342 4.o P2.04090.o4068 -- P3.00865.00807 P4 --.00152 Po.75294.75294.75 P1.18822.18824.18750 X0 P2.04706.04706.04688 P5.01177.01176.01172 P4 -- 96.0029.29 70

equations are required to describe even the simplest, i.e., a zero-length queue, system. However, the results for the seven-channel case will be included in the discussion. Again, many of the formulas are applicable to both the finite- and infinite-queue systems while others apply to the infinite queue only. The latter will be emphasized by "N = oo only." 4.3.2.1. Steady-State Solutions The steady-state equations in the state probabilities for a two-channel system having a maximum queue of length of two (M = 2 N = 4) are: 0 = -2pPo + P1 0 = 2pPo - (2p+l)P1 + 2P2 O = 2pP1 - (2p+l)P2 + 2P3 (55) 0 = 2pP1 - (2p+l)P3 + 2P4 0 = 2pP3 - 2P4 where: p = 2t As for the single channel, the state probabilities are obtained by successive substitutions of Po, P1, etc., in the above equations, Pn = (Mp)no/n' 0 < n<M (56a) Pn = MMpnPo/M' M < n ~ N (56b) Again Eqs. (56a) and (56b) are applicable when the queue is infinite. However, the values of Po for the two cases are given by n(M- n N MM (7a) Po = 1Z (M)n z N (57a) n=0 n. n=M MM —l1 P 1 Z ( )n + (M) l N c_ only (57b) ln=o n- MN(l-p) 71

A few values of the state probabilities for the two-channel system are shown in Table IV. The state probabilities for a seven-channel (M = 7) finite queue (N = 20) are of particular interest in our studies. Values of Po...P20 are given for a number of values of p in Table V. As for the single-channel case, the state probabilities become more nearly uniformly distributed over the N+l states as p becomes large. TABLE IV STATE PROBABILITIES FOR A TWO-CHANNEL SYSTEM State p =.25 p =.50 p =.70 Probabilities N = oo N = oo N = oo PO.60002.33333.17647 P1.30001.33333.24600 P2.07500.16666.17294 P3.01875.08333.12106 P4.00485.04166.08474 P5.00121.02083.05932 P6.00030.01042.04152 P7.00007.00521.02906 P8.00002.00261.02034 P9.00004.00131.01424 4.3.2.2. Steady-State Statistics The three categories for steady-state statistics are: direct interpretation of state probabilities, the moments obtained from the Pn's, and the distribution for waiting and throughput time. The interpretation of the state probabilities will be considered first. PO = probability that the system is empty; 1-Po 0 average fraction of the time the system is in use; N Z Pn = average fraction of time that the queue is occupied; and n=M+l PN = the average fraction of time for which the system is saturated. 72

TABLE V STATE PROBABILITIES FOR A SEVEN-CHANNEL SYSTEM State p =.50 p =.60 p = ~70 p =.80 Probabilities N = 20 N = 20 N = 20 N = 20 P0 0.029845 0.0144353 o.0067183.0028981 P1 0.104458 0.060628.032919.0162294 P2 0.182801 0.127319.080653.0454422 P3 0.213267 0.178247.131734.0848254 P4 0.186609 o0187159.161374.1187556 P5 0.130626 0.157214.158146.133006 Pe 0.076199 0.11005.129143.124139 P7 0.0380993. 06603.090407 099311 P8 0.0190497 0.0396179.063285.079449 P9 0.0095248 0.023771.044299.063559 Plo 0.0047624 0.014264.031009.050847 P11 0.0023812 0.0085575.021707.040678 P12 0.0011906 0.00513448.0151946.032542 P13 0.00059532 0.00308069.0106362.026034 P14 0.00029766 0,0018484.0074453.020827 P15 0.00014883 0.00110905.00521174 016661 P16 0.000074415.oo006654.0036482.013329 P17 0.000037207 0.0039926.00255375.010663 P18 0.000018604 0.00023955.00178763.0085308 P19 0.0000093019 0.00014373.00125134.0068246 P20o oooo0000046509 0.00008624.00087593 0054597 Second, it is clear that the mean number of units in the system and in the system queue are given by: N L = Z nPn (58) n=l N-M Lq nPM+n (59) n=l The relationship between L and Lq can be obtained by writing L as: M N-M N-M L I7n= nPn +M n PM+n + Z nPM+n n=l n=l n=l L = Ls + Lq (60) 73

where: Ls = the average number in service. Thus, the mean number in the system is equal to the sum of the mean number in service and in queue. When the queue is finite, Ls is equal to Ls = pM(1-PN) N finite (61a) whereas for an infinite-queue length, Ls = pM N = oo only (61b) The system utilization factor is, by Eq. (29) s.u.f = p(l-PN) N finite (62a) s.u.f = p N = oo only (62b) where: MM?N - M pIpo proxAgainmately equal to p for the finite-queue system when. The mean proximately equal to p for the finite-queue system when PN < 1. The mean queue length for a seven-channel system is plotted in Figure 22. Again, Lq becomes infinite as p approaches one for the infinite-queue case. Comparing a single- and a seven-channel system having identical mean queue lengths (i.e., Figures 19 and 22), it is apparent that a multiple-channel system can realize a higher system utilization for a given average queue length than a single-channel system. The variance, for both the finite and infinite queue, is obtained from the fundamental relationship: N Var (L) = E n2Pn - (L)2 (63) n=l A number of the above formulas have been tabulated in the literature (Refs. I and 5). However, the desired results can always be obtained directly from a knowledge of the state probabilities and the above equations. 74

16 14 12 10 0. cI 6 o-0 4^62^ ^ ^-^^ ~ 2 7. ""^ - a^^ 004 Q5~~~~~~~~~~~~~, 6 0-7 1

Waiting will occur in a multiple-channel system only when all the channels are occupied. Since the outputs from seven continuously occupied channels are still exponentially distributed (with a mean service rate of Mb), the incremental probability pM+n(tw)dtw, conditional upon the fact that the system is in state M+n when the unit of interest arrives, is given by PM+n(tw)dtw (tw) -~edtw tw (64) (n-l): which is the probability that there are initially n units in the queue, that n-l units have completed service in time tw, and that one additional unit will be completed in time interval dtw. The waiting-time density function, considering states n > M, is N-M N p(tw) = PM+nPM+n(tw) + 5(0) Pn (65) n=l n=0 The second term in Eq. (65) accounts for the probability that the queue is empty just after the unit of interest arrives. Thus the probability that the waiting time will exceed a specified t is given by P(tw >t) = f P(tw)dtw The above equations can be reduced to the following equation for the infinite-queue case: P(tw >t) = QMe-M(1-p)t N = o only (66) where: t >0 N-M QM -= PM+n the probability that all channels are busy. n=l Again, the throughput-time density function is equal to the convolution of the waiting-time density function and the service-time density for a single channel: p(tp) - p(tW) * p(tS) 76S

and the probability distribution on throughput time is given by 00 P(tp t) = t p(tp)dtp (67) 4.3.2.3. Transient Solutions The transient solutions for the single- and multiple-channel systems are similar in many respects. Therefore the following brief discussions are essentially extensions of the discussions in Section 4.3.1.3. The principal objective of this section is the presentation of typical transient solutions for a multiple-channel service facility. These transient solutions are applied, in Section 5 to the run-length-specification problem. 4.3.2.3.1. Finite Queue.-The fundamental difference between the singleand multiple-channel systems is in the [U] matrix. For example, the equations of detailed balance for a two-channel (M = 2, N = 3) system is given by P]= [U] P] (68) where: -p +1 p -(p+l) 2 [U] = P -(p+2) 2 P -2 Since the roots of the transition matrix determinant are all real and distinct, the solutions for the transient state probabilities are of the form indicated in Eq. (47) of Section 4.3.1.3. The root locus for N = 2, 3 and 4 are plotted in Figure 23. As for the single-channel system, there is always one root at the origin which gives rise to the steady-state probabilities Pn. Also, the minimal root moves toward the origin and becomes less dependent upon the parameter p as the maximum allowed state N is increased. One implication from Figure 23 might be that the roots are always real and distinct; however, this is not always the case. Lacking sufficient theory to draw general conclusions, each queueing problem must be investigated separately. Typical transient solutions for a seven-channel (M = 7, N = 20) system are shown in Figures 24 and 25. It is evident that P20(O) = 1 is a severe initial condition as the time required to reach steady-state is increased [consider Plo(t)] by a factor of two. Since the roots are identical for the 77

(.9) (..) (.9) (.7)(.5) -7.0 -6.0 -5.0 -4.0 -3.0 -2.0 -1.0 A3 (r) ROOTS (M:2,N=2) Y, YY (.9) (.7) (.5) (.9) (.7) (.5) (.9,,.5) -7.0 -6.0 -5.0 -4.0 -3.0 -2.0 -1.0 A4(Y) ROOTS (M=2,N=3) XI r2, r4 rY3 (.9) (.7) (.5) (.9) (.7) (.5) (.9) (.7) (.5) (.9)(.5), I",I I, I -7.0 -6.0 -5.0 -4.0 -3.0 -2.0 -1.0 At (Y) ROOTS (M=2,N= 4) Figure 23. Root locus for a two-channel system.

1.0 0.8 0.6 Fig. 24. Tyrnsient state probabilit es for a seven hannel system (M-7, N=2 _)l 0.4 0.3 0.2\ O(0) I, Lg 3.5 p=X/7/ =.50 0.1 - = 10.03 f A \^ ^^^^^^~~ ~ PO 029786 (.029845).0 2.01.008.006 a-c.004 P V i [ Po-0048148(.0047624).004.003.002 ~ 20.001.0008.0006.0004 -.0003 -.0002 - (M=7, N=20). 79

LO,,.8.6 P (0): 1.0 Lg 3.5.2 p =X/7L:.=5C QI.08.06 n=0.04 - Po'.029848 (.029845).02 -.01 - _.008 -.006 n=10 o= 0047599(40047624).004 -.002 -.001.0008 -.0006.0004.00002 - Pi =.00014839(.00014883) n15 ~0001,.0001I.* I. * I I I. I, 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 t (NORMALIZED TO Ts) Figure 25. Transient state probabilities for a seven-channel system (M:7, N=20). 80

two figures, the relative magnitude coefficiern;s of the exponential terms eYit cannot be ignored [see Eqo (47) ]o hat is, the transient behavior cannot be approximated by the steady-state solution Pn and one minimal root. If a one- and a two-channel system are subject to the same environment, i.e., equal arrival rates, the transient solutions for the two-channel system approach the steady-state values for Pn's much faster than for the singlechannel case (Table VI)o It is important to realize here that PO(O) lM=l # Po(oo) M=2 and, therefore, the approach to the steady-state probabilities Pn is noted by looking at the difference between successive values in each column, It is evident that the values of p required to obtair equal average arrival rates;. will also2 by 'Eqo (6ia) (P0o << 1) result in the same mean number of units in service for the one" and two-channel systems. That is to say, equal environments ( 's equal) imply equal Ls's. TABLJE V TRANSIEIIT SOLUTIONS FOR A OrE- AND A TWO-CHANNEL SYSTEM (M - 1, N 10; M 2, N 10) t PtPof) e(t) P_Pio(t_______ (Normalized p = 8 o = 4 p= 8 p.4 p 8 p 4 to Ts) M 1 M - 2 M l=1 M 2 i M lM = 2 0 loO 1,0 0.0 0.0 0.0 0.0 2.0 o47253.49862.00532 002 12 lo5x 1iO 307x1-7 4.0.37 445.446o3.02232 o00578 o00012.00001 6.0 033019.43447 003674.00752 o00079 o00004 8o0.30402.43089.04640 o00839.00225 00005 10o0.28642 42957 005275 o00853.002424. 00007 12.0 27367 42903. 05704 00867 o00645 o00008 14,0.26396 42879.06007 o00873 o00864 o00009 16.0.25632 42869 o06228 o00875.01068 o00009 18.0 25017 42864 06397 o00876.01252.00009 20,0.24513.42862.06529 o 00877.01413 00009 4.3.23.2o. Infinite Queue o-When the queue is infinite and the number of channels is greater than one, the discussion in Section 4.3o2o3 must be expanded to include some additional considerations. The two-channel system will be used to illustrate these pointso The equations of detailed balance are 81

Po(t) = -2pPo + P1 Pl(t) = 2pPo - (2p+l)Pi + 2P2 Pn(t) 2pPn-l(t) - (2p+2)Pn(t) + 2Pn+1 n > (69) For the two-channel system, the equation analogous to Eq. (52a) is a function of Po(S) and P1(s). 2Po(s) + O2(s)P1(s) = 2((70) 1 - 02(5) One additional equation in terms of Po(s) and Pi(s) is obtained by taking the Laplace transform of the first equation in set (69): -(s+2p)Po(s) + Pl(s) = -1 (71) when: PO(O) = 1 Solving Eqso (70) and (71) for Po(s), one obtains the desired equation for PO(s) Po(s) 2() 1 + 2po:2(s) + 2p - 2 (72) 2p + 2 1 - 2(s) 2pa2(2) - 202(s) + 4] The technique is to expand the second term in partial fraction, ioeo 2pCa(s)202(s) +4 has a pair of complex roots oe(s) and ce2(s)) and take the inverse transform term by term. Again, the solutions involve series of modified Bessel functions similar to Eqo (53). As the number of channels is increased, the problem becomes increasingly complex, since a set of M equations must be solved for Po(s) and the characteristic equation for the determinant of this set of equations must be solved for the roots oCl(s)..ae(s). Each of the terms in the partial fraction expansion transforms into an infinite series of modified Bessel functionso Therefore the approach has been to approximate the infinite-queue case by a finite number of equations of detailed balance and then to obtain the transient solutions by a direct solution of the equations of detailed balanceo 82

4.3-3. SUMMARY The steady-state and transient solutions for the single- and multipleexponential channel service facilities have been discussed in this section. We see that queueing theory models give results in two areas. (a) the number of units in the system queue and service channels, and (b) the time required to pass through the queue and the service channelo Each can be described by the moments of their respective distributions, Although the steady-state statistics have been emphasized in this section, many of these equations can be applied under transient conditions by replacing Pn with Pn(t) o This technique and other formulas developed in this section will be applied in the remainder of this reporto 4.4. Application of the Exponential Model to the Polymorphic Computer Several of the formulas developed for the exponential service facility in Section 4)3 will now be applied to the polymorphic computer as represented by this simple modelo A number of measures of system performance can be used to describe a service facility; mean waiting time and system utilization are particularly well suited to a computer system. If one assumes equivalent environments, it is evident that increasing the number of job computers (channels) will reduce the waiting time per job request. The "price" which nature demands for this customer benefit is reduced system utilizationo The purpose of this brief section is to point out the relationships between these conflicting measures of system performance. Consider the mean waiting time Tw for the M = 1-, 2-, 4-, 6-, and 7 -channel system operating in the same environment. It was pointed out in Section 4.302.3. (page 77), that systems having the same mean number of jobs in service Ls have equal arrival rates X. The mean waiting time Tw, as a function of the environment Ls, has been plotted in Figure 26. Tw is normalized with respect to the mean interval between arrivals Ta. Since the queue is assumed to be finite, the system utilization factor (s.uof) is equal to p. Therefore, the mean waiting time and the utilization factor can be tabulated (Table VII) for various values of Lso It is clear that the mean waiting time can be reduced by an order of magnitude by reducing the system utilization by a factor of two. Given a specified environment, Ls = 305, the mean waiting time is reduced from 5.0 to.25 by dropping the utilization factor from.875 to.5830 The waiting-time distribution for a multiple-channel, infinite-queue system is given in Section 43.o2o2, Eqo (66). If t is normalized with respect to the mean service time Ts for a single channel, the waiting-time distribu83

TW [NORMALIZED TO TA] o o -o — 00 cc+oI Pu co Cl)ji cD _ C)1. a, v.i ~ ~

TABLE VII SY5.I', PERFORMANCE CHART iTVw System Ms II (Normalized to Ta) Utilization Factor 1o6 2 ~ 67.8 1.6 4 O0158.4 3.5 4 50o.875 3~5 6 ~ 25,583 3.5 7 o08 o500 5~0 6 360 ~834 5o0 7.78 0715 tion can be written as P(tw t) = e-M(-P)t + [I-Q] t 0 (73) where: 00 QM = PM+n n=l 00 QM = Z PM the probability that all channels are busy; M=i M 1-QM = E Pn the probability that the queue is empty; and n=O p - / Mo Assuming equal environments Ls, it is instructive to plot the waiting-time distributions for some multiple-channel systems (Figures27a-d). The probability of immediate service, 1-QM, has been omitted from these figures, This contribution to the waiting-time distribution, arising from the 5(0) [1 -QM] term in t!h density function, is included in Table VIII. Each curve in Figures 27a-d is identified by M and p. Since p is equal to the system utilization factor, the curves again show the trade-off between waiting time and system utilization. For example, assume that the environment places a requirement upon the system that the mean number of jobs in service is equal to 1o6 under steady-state conditions (Figure 27b). We want to determine the value of t for which the probability of waiting t mean service times or more is o01 (ie., P(tw > t) = oOl) and the system utilization 85

1.0 ^ M=l a! p L 8 olE =I a I I8 0.1 A ~ - I\I M=2 -.41 4-= IX\I I \ I I I~I~ Aloooo..001 M=4 ~ p:.2.0001.00001I 0 2D 4.0 6.0 8.0 10.0 12.0 14.0 t [NORMALIZED TO TS] Figure 27a. Waiting-time distributions for multiple-channel systems. 86

1.0 Lsl.6| 0. ________ M=2 & p=2.8.01X r A I | M=4 & p.4 I 4-, Al\ a..001 M=7 a \p:229.0001.0000, L 0 20 4.0 6.0 8.0 10.0 12.0 14.0 t [NORMALIZED TO T,] Figure 27b. Waiting-tiime distributions for multiple-channel systems. 87

L s=3.2 0.1__ M=4 p=.8.01 ^ 2.0 4.0 6.0 8.0 10.0 12.0 14.0 t [NORMALIZED TO Tl Figure 27c. Waiting-time distributions for multiple-channel systems. 0 2.0 4.0 6.0 8.0 10.0 1 2.0 14.0 t [NORMALIZED TO TS] Figure 270. Waiting-time distributions for multiple-channel systems. 88

1.0 Ls=5.6.10.01 A a..001.0001.00001 1 0 2.0 4.0 6.0 8.0 10.0 12.0 14.0 t [NORMALIZED TO Tw] Figure 27d. Waiting-time distributions for multiple-channel systems. 89

factor for each system is considered. Table IX is the system performance chart. Thus, the addition of two channels reduces the critical waiting time TABLE VIII THE PROBABILITY OF IMMEDIATE SERVICE M Ls P[tw = 0] 1.8.3600 2.8 o9090 4.8.9981 2 1.6.4320 4 1.6 09638 2 1.6.9997 4 3.2.524 7 3.2.977 7 5.6.615 TABLE IX SYSTEM PERFORMANCE CHART. P(tw >t) =.01 System Lst Utilization Factor 1.6 2 10ol o8 1.6 4.5.4 1.6 7 0.229 t by a factor of twenty, but the utilization, on all four-job computers, drops to.4. The trade-off between delay and utilization is essentially the same regardless of the measure of system performance which might be employed. The final selection of the number of job computers M is based upon a relative weighting between the benefit tDthe customer, reduced delay, and penalty for a reduced utilization factor on the job computers. (System and job-computer utilization are equivalent terms because the queued job requests are divided equally among the job computers,) It is evident that M must be great enough to handle the environment Ls. However, the number of additional channels depends on the relative weighting between utilization and delay which is, in turn, dependent upon the system application. For 90

example, a university computing center, which is maintained on a limited budget, would stress system utilization over the delay in processing student problems. In the next two Sections, 4.5 and 4.6, two additional queueing problems are considered. The first deals with storage saturation and the second with competition for a shared module. 4.5. First Passage on the nth State The measures of performance which have been described so far for the multiple-channel system are those most often discussed in queueing theory literature. However, if the penalty for storage saturation is very high (e.g., if the saturating request is destroyed), an equally important measure is the probability that the system will reach a given state n for the first time, assuming that the system was in state zero at t = O. It is evident that the probability of nonsaturation is equal to one minus the first-passage probability, on the nth state for an N-state limited system. As in the previous problems, the service and arrival-time distributions are assumed to be exponential and the queue discipline is first come, first serve. A typical "system-state waveform" is shown in Figure 28. The time ton required to reach the nth state is indicated on the figure. The time to reach saturation, to,N is just a special case of the above. o,n n - n-I 3 - I t The equations of detailed balance and their solutions are summarized in Section 4.5.1. Some additional queueing problems of the same general type are discussed in Section 4.5.2. 91

4.5.1. SOLUTION FOR FIRST-PASSAGE PROBABILITY DISTRIBUTION The equations of detailed balance for a seven-channel, infinite-queue system are: Po(t) = -XPo(t) + Pl((t) Pn(t) n= Pnl(t) - (+npl)Pn(t) + (n+l)pLPn+l(t) n <7 (74) Pn(t) = Pn-l(t) - (%+71)Pn(t) + 7bPn+l(t) n > 7 where: X = average arrival rate; = average service rate for a single service channel; and P = V/7. The above equations can be written in normalized form as Po(t) = -7pPo(t) + Pl(t) Pn(t) = 7PPn-l(t) - (7p+n)Pn(t) + (n+l)Pn+l(t) n < 7 (75) Pn(t) = 7PPnl(t) - (7p+7)Pn(t) + 7Pn+l(t) n 7 To determine the first-passage distribution, an absorbing barrier is placed at the nth state. That is, transitions from the nth or higher states are not allowed and, as a result, transitions among the states O, 1,..., n-l will terminate when the nth state is reached for the first timeo Notice, however, that transitions to the nth state are allowed. For example, the rate of change of the probability of being in the 10th state is given by Plo(t) = 7pP9(t) (76) Also, Pg(t) is modified by the restriction that no transitions from the 10th state, resulting from service completions, can occur. P9(t) = 7pP8(t) - (7p+7)P9(t) (77) 92

The remaining equations remain unchanged. Thus the infinite set of equations required for the infinite-queue case become a finite set of n+l equations when a barrier is place at the nth stateo In general, for n ) 8 the equations are of the form P()] = [uu] P(t)] (78) where: PO(t) Po(t) 1 P(t))] - o P(t)]] =- P(O)] - Pnil(t) Pnl(t) 0 Pn(t) Pn(t) 0 -7p 1 7P -(7p+l) 2 []=0 0 [u] 7p -(7p+7) 7P Notice that in Eqo (78) the initial conditions are specified by column vector P(O), and in the case considered here the system is always initially in state zero, Po(O) = lo0. 93

The time-dependent or "transient" solution of Eq. (78) provides Pn(t) = P(to,n < t), the probability-distribution function on the first-passage time; and Pn(t) = p(to,n), the probability-density function on the first-passage time, to,no Numerical solutions of these equations have been obtained for P(to,n t)with n = 7, 10 and p = 0.5, 0.7, 0.9, and also for n = 20 and p = 0.7, 0.9. These are shown in Figures 29-32. For small n(n < 7) it is evident from Figure 29 that the system is certain to reach capacity (state 7 in a 7-channel system) in a few service times regardless of the value of p, As one considers first-passage to higher and higher states (Figures 30 and 31), the parameter p becomes increasingly important. The result is anticipated when the dependence of the steady-state state probability on p is considered for a given value of n (see Table X). The Pn's are nearly equal for small values of n (say n = 7) while they differ by orders of magnitude for increased n. TABLE X STEADY-STATE STATE PROBABILITIES FOR AN INFINITE-QUEUE, SEVEN-CHANNEL SYSTEM States p =.5 p =.7 =.9 n = 7.0380993.090221.0671113 n = 10.0047624.0309457.0489256 n = 20.000046509.000874145.0170593 n = 40 ---- ----.002074010 4.5.2. ADDITIONAL PROBLEMS First-passage time distributions from initial states other than zero can be obtained by setting Pi(O) = 1, i < n, in Eq, (78). That is, firstpassage to the state n, assuming that the system is initially in state i, is obtained by a simple change of the initial conditions, A second possibility is to put the absorbing barrier at some low level. Saaty (Ref. 3) determines the distribution for the system busy period P(tl,o), infinite-queue case, by placing the barrier at n = 0 and setting Pl(O) = 1. The busy period is the interval between an arrival to an empty 94

1.0 0.8 0.6 0.4 P=.9 P 0.2,. O. 1 -O0.08 -.06.04.02.01 0.1 0.2 0.4 0.6 0.8 1.0 2.0 4.0 6.0 &o0 0.0 20 40 60 80 oo t (NORMALIZED TO Ts ) Figure 29. First-passage probability to state n = 7 for p =.5,.7,.9.

i.0 0.8 0.4 =.9 0.2 p =.5 -O.r.0 2.0 4.0 6.0 8.0 10.0 20 30 40 60 80 100 200 400 600 800 1000 CYN0 ~ O(NORMALIZED TO T ) Figure 30. First-passage probability to state n = 10 for p =.^.7, ^ 0F 5.04.02.01 1.0 2.0 4.0 6.0 8.0 10.0 20 30 40 60 so 100 200 40 60 80r0 t (NORMAL I ZE To Ts) Figure 30. First-passage probability to state n 10 for p.5, 7 9

I.0 0.8 - 0.6 - 0.4 - 0.2 - 9 0 0.02.01 1.0 2.0 4.0 60 8X) 10.0 20 40 60 80 0 200 400 600 800 1000 t (NORMALIZED TO Ts) Figure 31. First-passage probability to state n = 20 for p =.9,.7.

1.0 0.8 0.6 0.4 [t0.20] 0.2 P=. N 0._ O Os1.08 2. 4... 00 40 ] C.06 t (NORMAL I ZED TO T ) Figure 32. First-passage probability to state n = 20 and state n = 4O for p p=.9. Co~~~..0 -- o. X 0 60 801~ 04 6 010 ~ 090 608010.06~~~~~~~~~ — RILZDTOT c~ ~ ~ ~ ~ iue~. Frtpsaepoablt dsaei 0adsaen=4 14'" ~ ~ ~ ~ o ~ 9

system and the next time the system is empty. For the infinite-queue case the number of equations remains infinite. However, if the maximum number of states is limited (finite queue), the only modification on Eq. (78) is in the [U] matrix. Leading rather than trailing terms are modified. It is apparent, therefore, that by controlling the initial conditions and the location of the absorbing barrier, a large variety of first-passage probability distributions may be obtained, depending upon the initial conditions and the barrier location. 4.5.3. SUMMARY The equations and some typical solutions have been presented for a sevenchannel system (assuming exponential arrivals and services). The probability of saturating storage, first-passage on the Nth state, decreases for large N and reduced system utilization p. The emphasis placed upon this measure of system performance is a function of the penalty associated with storage saturation, which is, again, dependent upon the system application, Although the major application here is to the storage saturation problem, one can obtain the first-passage time distribution to any desired state n of interest. 4.6. Job Computer Queueing for Use of Shared Modules Recall, from the description of the AN/FSQ-27 system in Sections 1 and 2, that a job computer and other subordinate modules are assigned to process each job request. However, some modules are not assigned exclusively to one job, but are shared by all "in progress" job requests. Consequently, there is competition or queueing of job computers for the shared modules (e.g., the master drum). This queueing of job computers for use of a shared subordinate module in a polymorphic system corresponds to the channel machine maintenance problem in queueing theory. The finite number of job computers, N, which request use of the shared module, are analogous to the machines that breakdown. The shared module is analogous to the repair crew that must service the failed machines. In the representation of Figure 33, requests for service are units that circulate in the system, and job computers are the arrival generating channels. Each request unit, upon completing service, returns to the arrival channel (job computer) from where it originated, and experiences a delay of random duration before entering the queue again for another service. The solution of this queueing problem is discussed in this section. The queue discipline is first come, first served, and the arrival and servicetime distributions are either both exponential or both constant. 99

COMPUTERS (ARRIVAL CHANNELS) SHARED MODULE l 2^ |^^ (SERVICE CHANNEL). QUEUE N Figure 33. Representation of shared module queueing. 4.6.1. SOLUTION FOR CONSTANT ARRIVAL AND SERVICE TIMES The case of constant arrival and service times with first come, first served queue discipline can be readily solved without resorting to differential equations. Let Ts = service time for a computer by the shared module (same for all computers); Ta = time between completion of a service by the shared module and the next request for service from the same job computer; and P = Ts/Ta. and let the job computers be numbered 1 through N, as shown in Figure 33. Assume that the system begins operating with each computer making a request for use of the module, in turn according to its number, with only a small time increment between each request. The first computer to have use of the module will be number 1, and after an interval Ts job computer 2 will obtain 100

use of the module, etc. Now job computer 1 will request use of the module again in time Ta after completion of its first service by the shared module. It is clear that if Ta > (N-l)Ts, job computer 1 will experience no waiting time on its second request, nor on succeeding requests, and furthermore none of the computers will experience additional waiting time. This is because after the first round, the request times of the computers will be in a phase relationship which does not change thereafter, and for which there is no waiting time if Ta > (N-1)Ts. On the other hand, if Ta < (N-1)Ts, the waiting time per request for each computer will be the difference of (N-1)Ts, the time to service the other computers, and Ta, the interval since its last request. Hence Wq = (N-1)T - = Ts [(n-l) - ] > (79) P N-1 Wq =0 P 1 (80) Figure 34 gives a plot of Lq = Wq/Ts versus p for the case of N = 7 computers with constant arrival and service times. 4.6.2. EXPONENTIAL ARRIVAL-AND SERVICE-TIME DISTRIBUTION The solution of this queueing problem for exponential arrival and servicetime distributions is given in a number of references (Refs. 1 and 6). The time-dependent equations for the state probabilities (the probabilities of having a given number of computers queued for the shared module) are as follows for N = 7: PO -7 PO PI 7. -[-+6\] +I P1 6k; -[11+5X] M| ' e 5X - [++4 ]] e 5\ -[+L+2X] ~.P7~ 32\h - [>+x].t 101

6 5 0 LU 0 ^^0 4 UJ z CE 3 U __~ EXPONENTIAL ARRIVAL AND 0 I / SERVICE TIMES -- ~ ~CONSTANT ARRIVAL AND 12 2 SERVICE TIMES LUJ Z /l cr ~~~~I 0 0 0.2 0.4 0.6 0.8 1.0 1.2 1.5 1.6 1.8 20 Figure 34. Mean number in queue Trs. p (M = 7).

The steady-state solution of these equations is obtained by setting the derivatives Po, P1,...,P7 = 0. Then one finds: Pn = pNPo n N (81) (N-n)' where: X = mean arrival rate for a single computer; u = mean service rate by the shared module; and P = A/t = Ts/Ta, The mean arrival rate X for each computer is equal to l/Ta, where Ta is the mean time between completion of a service by the shared, module and the arrival of the next request by the computer that was serviced, Ts, the mean service time by the shared module, is equal to \/Ao Po is found from the constraint, N Z P = 1.0 (82) n=0 The mean number in the system, i.e., the mean number of job computers waiting for the shared module including the one which has it, is N L = nPn (83) n —O and the number in the queue is N Lq = Z (n-l)Pn = L- 1 + Po (84) n=l The mean waiting time in the queue is Wq = LqTs (85) References 1 and 5 provide tables of functions from which Lq can be calculated for a range of values of N, p, and M, 103

Figure 34 presents a curve of Lq = IWq versus the ratio of mean service time and mean arrival time per job computer, p. Figure 35 presents the same quantity plotted against the mean shared module utilization factor (s.m.uof). Som.Uof = 1 - PO (86) That is, s.m.u.f is the mean fraction of total time that the shared module is used. Also plotted in Figure 35 is the normalized average throughput time, TP, T- = (Lq+l) - p ( L+l) (87) Ta q which is the mean total delay experienced in using the shared module (waiting time + service time) in terms of the mean arrival interval, Ta. Because job-computer waiting time for the shared module is not useful in furthering the completion of a job request, queueing for a shared module results in a decrease in the job-computer utilization factor, the fraction of the available time the job computer is available for computation (i.e., not waiting for the shared module). Figure 36 presents the mean utilization factor of a single job computer against the utilization factor of the shared module. The job-computer utilization factor (j.c.Uof) is given by Ta + Ts + p j.c.u.f = aTs (88) Ta + Ts + Wq 1 + p(Lq+l) It is evident from Figure 36 that an attempt to achieve very high utilization of a shared module may result in decreased system efficiency because of the resulting degradation in utilization factor of the job computers. Any procedure for sharing a subordinate module must therefore take into account this trade-off in utilization, and the relative weight to be given to jobcomputer utilization as opposed to shared-module utilization. 4.7. The Effect of Arrival- and Service-Time Distributions on System Behavior The performance of a service facility as determined by the various measures which may be applied (e.g., mean number in the system or mean waiting time), depends to a great extend upon the nature of the service and arrivaltime distributions. Most of the queueing theory literature deals with models 104

6 5 r4 0 E 3 -^"1 M 1 0 3 T 50 55 60 65 70 75 80 85 90 95 100 SHARED MODULE UTILIZATION FACTOR (%) Figure 55. Queue length (Lq) and throughput time Ts (normalized to Ta) vs. the shared module use factor.

EQUAL UTILIZATION I1 POINT 0 I 0 z _F 60 0 20 8 65~ ti 0 85 50 55 UTILIZATION FA C T 0 R SHARED MODULE Figure 56. job-com-puter vs. shared-module utilization

in which these distributions are exponential, i.e., the probability density function of the time duration has the form f(t)dt = \e-ktdt (89) The purpose of this section is to discuss the relationship of system performance with exponential distributions to the performance with nonexponential distributions. Specifically the nonexponential distributions to be considered are the Erlang distribution of order k, and the Hyper-Exponential distribution. These distributions exhibit smaller and larger variance, respectively, than the exponential distribution. The questions to be considered are the effect of these distributions on the mean number in the system and on the transient solutions for the state probabilities. The entire discussion will deal only with the single-channel system. 4.7.1. AVERAGE NUMBER IN THE SINGLE-CHANNEL QUEUE SYSTEM, ARBITRARY ARRIVALAND SERVICE-TIME DISTRIBUTIONS Under the assumption that a queueing process is stationary (i.e., that the expected number in the system does not vary with time), it is possible to derive a relationship for the mean number in the single-channel system with arbitrary arrival-and service-time distributions (Refo 6, p. 336). This result is E(n) = p + E(r2) (90) 2(l-p) As in the previous sections:6 n = number in the system; A = mean arrival rate (1/Ta); p = mean service rate (1/Ta); p = _/ p; and r = number of arrivals during the service for a single unito 6Mean rates X and 1. describe arbitrary arrival and service distributions. 107

Equation (90) holds provided only that the arrival- and service-time distributions are stationary and independent of the number of units in the system n, The implication is that the system has an infinite queueo It is not possible to derive a similar equation for the multiple-channel system since the interval between service completions depends upon the number in service at any instant, which is unknown. Let us now attempt to determine the relationship of E(r2) to the arrivaland service-time distributions, If we define the following, a(rlt) = probability of r arrivals in given time t (derived from the arrival-time distribution); s(t)dt = probability of a service time of length t (the incremental service-time distribution); then a(rlt)s(t)dt = the joint probability of r arrival in time t and a service time t; 00 f r(rlt)s(t)dt = the probability of r arrivals during a service o~0 ~time; and E(r) and E(r2) are as follows: 00 E(r) = r foa(rlt)s(t)dt (91) r=0 00 E(r2) = 7 r2 fa(r t)s(t)dt (92) r=0 o the mean number of arrivals in time t and the mean service time are 00 Z ra(rlt) = \t (93) r=0 fO ts(t)st T = Tg (94) for all distributions a(r t) and s(t) Hence we can obtain, from Eq. (91), 108

00 Z E(r) -= r ra(rlt) s(t)dt r=O o o E(r) = %J (ts(t)dt I= Ts = p (95) This result states that E(r) is the mean number of arrivals in a mean service time, which is intuitively obvious. We also know that the following are true: 00 Z r2a(rlt) = Var(rlt) + (t)2 (96) r —O fo t2s(t)dt = Var(ts) + ( (97) where Var(rlt) is the variance of the number of arrivals in a specified interval t, and Var(ts) is the variance of the service-time distribution. Then, using Eqs. (96) and (97), we obtain from Eq. (92), E(r2) = Jo [Var(rlt) + (Xt)2]s(t)dt E(r2) = ~ + 2Var(ts) + o Var(rjt)s(t)dt (98) It is now clear that E(r2) is minimum when Var(ts) and Var(rlt) are both zero, corresponding to constant arrival and service times. It is therefore the combination of constant arrival and service time which yields minimum expected number in the system. Unfortunately Eq. (90) cannot be used to determine E(n) for constant arrival and service times, because these distributions do not result in stationary solutions, which is the important assumption in the derivation of Eq. (90). But the above conclusion is not altered, since one can obtain a constant service-time distribution and an arrival distribution for which Var(rIt) is very close to zero. A stationary solution would then exist, and one could calculate E(n) from Eq. (90). Then, as one made Var(rlt) still closer to zero, one would arrive at the above conclusion. It is also clear from Eq. (98) that one may reduce E(n) either by reducing the variance of the service-time distribution or by reducing the variance of the number of arrivals in a specified time. Hence, the general 109

conclusion may be drawn that arrival- and service-time distributions which are more random, in the sense of having larger variance, will result in longer queue lengths (in first come, first served queue discipline). 4.7.1.1. Exponential Arrival-Time Distribution In this section we will compare the expected number in the singlechannel system with an exponential arrival-time distribution and exponential, Erlang, or Hyper-Exponential service-time distributions. It would be desirable to also compare systems in which the arrival-time distributions were either Erlang or Hyper-Exponential. Unfortunately, the determination of Var(rlt), which involves finding the rth convolution of the arrival-time distribution, is difficult to carry out for these cases. For exponential arrivals a(rIt) = 1 e) (99) r' and Var(rlt) = E r2 (t)r et (t)2 = t (100) r=0 Hence, for exponential arrivals E(r2) = p2 + \2Var(ts) + p (101) and therefore E(n) = + + Var(t) (102) 2(1-p) The Erlang k service-time distribution has a density function k ktk-i s(t (k) ktk-1 kt (103) (k-l) The expected value and variance are E(t) = - (104) 110

Var(t) = 1/l2k (105) For the Hyper-Exponential distribution s(t) = 2a2[e-2t + 2(1-a)22e-2(1-a) t (106) E(t) = (107) Var(t) = 1 + (12c) (108) C _ 2c2a(1- a) where: 0 < a 1/2 The variance of the Erlang distribution is less than that of the exponential by the factor k. The variance of the Hyper-Exponential is greater than that of the exponential. Table XI presents values of the ratio of the variance of the Hyper-Exponential distribution to that of the exponential for several values of a. TABLE XI RATIO OF HYPER-EXPONENTIAL VARIANCE AND EXPONENTIAL VARIANCE J_________a __Ratio. 4 1.084 0.2 2.124 0.1 4.560 0,01 49050 0,001 500.0 Table XII presents values of the expected number in the system for several values of p with exponential arrivals and the different service-time distributions. It is clear that the Erlang and Hyper-Exponential distributions can be used to obtain a variance of almost any magnitude relative to that of the exponential distribution. [Note in particular that the Erlang k = 1 distribution is the exponential, while k = o gives a constant service time as Var(ts) = 0, ] Table XII indicates the general trend in the improve111

TABLE XII EXPECTED NUMBER IN THE SINGLE-CHANNEL SYSTEM WITH EXPONENTIAL ARRIVAL TIME (a) Exponential service time P E(n) 0.1 0.1111 0.25 0.3333 0.50 1.0000 0.90 9.0000 (b) Erlang service time k =2 k= 10 P rRatio to Ratio to E(n) E(n) E.__n)_ _Exponent ial Exponential 0. 1 0.1084 O 0975 0.1061 0.955 0.25 0.3125 0.940 0.2959 0.888 0.5 0.8750 0.875 0.7750 0.775 0.9 6.9700 0.775 5.3500 0.595 (c) Hyper-Exponential service time =01 0.01 p E(2 Ratio to n)Ratio to _______________ Exponential Exponential 0.1 0.1509 1.175 0.3805 3.420 0.25 0.4820 1.450 2.3550 7.080 0.5 1.8900 1.890 13.1250 13 125 0.9 23.4500 2.605 205.4000 22.80 ment of degradation of the mean number in the system for various service-time distributions. Also, it is clear from Eqs. (102) and (108) that the worst possible distribution is the Hyper-Exponential with ca - O, having infinite variance. It seems quite unlikely that such a distribution would ever be encountered in practice. Indeed, a variance of only several times the square of the mean seems to be the greatest that would be encountered. Since the variance of the exponential distribution is equal to the square of its mean value, this distribution could be considered as a moderately pessimistic 112

case. Considering also its mathematical convenience, this justifies the emphasis on the exponential model. 4.7,2. TRANSIENT SOLUTION FOR THE STATE PROBABILITIES The effect of the service-time distribution on the mean number in the system is indicative of its effect on other measures of steady-state performance, average number in the queue, mean throughput time, etc. In this section the transient solutions are considered for a single-channel system with exponential arrivals and exponential, Erlang k = 2, and Hyper-Exponential service-time distributions. The set of differential equations has already been discussed in Section 4,2 for the exponential arrival-time distribution with the exponential, Erlang Type Two and Hyper-Exponential service-time distributions Solutions for these equations have been obtained for values of p = %\/ of 0.25 and 0,5. The maximum allowed state for the system was chosen sufficiently high to give a good approximation to the infinite-queue case. The steady-state values for the state probabilities for the Erlang and Hyper-Exponential distributions have not been calculated. However, Po is known since Po is equal to 1-p regardless of the service-time distribution for the single-channel system. Po(t) is therefore used here as the measure of how close the system is to steady-state behavior, The only initial condition used was zero requests in the system. Figures 37 and 38 compare Po(t) for the exponential, Erlang Type Two, and Hyper-Exponential distribution with a = 0.1o It is clear that the system with Erlang service-time distribution approaches steady-state behavior faster than the exponential system. On the other hand, the Hyper-Exponential system takes longer to reach the steady state, The conclusion can therefore be drawn that systems having smaller variance in the service time than. that, of the exponential distribution will reach steady-state conditions faster, while those with larger variance will approach the steady state more slowlyo 4.7.3. SUMAARY It has been shown that the expected number of units waiting or in service in the single-channel system, with first come, first served queue discipline, is a function of the variance of the service-time and arrival-time distributionso The expected number can be reduced by reducing either or both of these variances. Consideration of the transient solutions for the state probabilities for exponentially distributed arrival intervals and exponential, Eriang, and Hyper-Exponential service-time distributions has shown that the time required 113

1.00 0.95 0.90 -o0 0.85 0.80 s HYPEREXPONENT I AL a\ = 0.1 ERLANG EXPONENTIAL k=2 0.75 0 5 10 15 t [Normalized to Ts] Figure 37. Po(t) for the single-channel system, p = 0.25. 1.00 0.9 0.8 Q-o 0.7 \\HYPEREXPONENTIAL 0.6 ERLANG EXPONENTIAL k=2 0.5 0 5 10 15 t [ Normalized to Ts ] Figure 38. Po(t) for the single-channel system, p = 0.5. 114

to reach steady-state behavior from a zero initial condition can also be reduced by reducing the variance of the service-time distribution. It seems quite likely that the optimum distribution for arrival and service times in regard to all aspects of performance of the single-channel system is to have them as constants, although this investigation has not been so extensive as to warrant this as a rigorous conclusion. On the other hand, the exponential distribution, because its variance is near the limit of what one might expect to encounter in a realistic case, and because of the comparison of the performance of exponential systems with those having other service-time distributions, would seem to provide a model with intermediate performance. Coupled with the mathematical convenience of using the exponential distribution, this suggests the exponential arrival- and service-time model as a good choice for exploratory studies. In this section, queueing theory has been applied to a number of problems which arise in a polymorphic computer. These problems and the resulting conclusions are summarized in Section 63,. The reader who is particularly interested in the application of this service facility model to the AN/FSQ-27 should bypass Section 5, which deals with the statistical accuracy of the data obtained from the simulation. 115

5. STATISTICAL ACCURACY OF MEASUREMENTS FROM SIMULATION DATA 5L 1 I ntroduction Simulation is in essence an experimental method of obtaining results, except that experiments are not conducted on the actual system, but on a model representative of the system. Hence one has the problem of determining the accuracy of the measurements obtained, not withstanding the accuracy of the representation of the system. The simulation which has been developed for the AN/FSQ-27 computer system is in many respects a statistical mechanism. The behavior of the system, as simulated, is therefore best described by the respective distributions and distribution moments for the random variables of interest, as such descriptions constitute the measures of system performance. The measurements to be made are consequently measurements of moments and distributions, and must be based upon a large number of observed values of the variable whose distribution is sought. To determine how accurately a measurement represents the true value of the performance measure requires some knowledge of the true distribution of the observed values, and the number of sample values used, It is obvious that little is known about the true distributions of variables in the complex system representation realized in the AN/FSQ-27 simulation. However, the gross behavior of the system is that of a multiplechannel service facility. The true values of the several performance measures for this analytical model can of course be calculated as indicated in the preceding section. The accuracy of measurements in the AN/FSQ-27 simulation (Section 3), can therefore be investigated on an approximate basis through a study of the statistical accuracy of measurements which one would obtain from a simulation based upon the multiple-channel model for the AN/ FSQ-27. This section describes methods for determining statistical errors as a function of the sample size, Specific calculations are made of the required sample sizes for a given accuracy when the measured quantities are: (1) mean arrival or service time; (2) mean throughput time (mean total delay from input to output); (3) mean number of requests in the system; 117

(4) state probabilities; and (5) mean time to the first passage to a given number in the system. The calculations are based upon exponential arrival- and service-time distributions in the multiple-channel modelo Finally, the calculated sample sizes are related to length of simulation runs using two observed values for the speed of the AN/FSQ-27 simulation program. 5.2. General Discussion of Statistical Errors The measurements which are to be considered here fall into two categories: measurement of a mean value, and measurement of a probabilityo A measurement of a mean value can be obtained by averaging a large number of independent observations of the random variable (eg,, arrival interval or throughput time) whose mean value is desired, Because of the random fluctuations of the individual observations, the measured mean value has a random deviation about the true mean. However, as a result of the central limit theorem, the distribution of the measured mean is Gaussian regardless of the distribution of the observed values, provided only that the number used (the sample size) is large enougho The expected value of the measurement is the true mean value, and the variance7 is given byo population variance variance of sample mean n v e (109) sample size The situation in regard to determining the statistical error of a measured mean from the true mean is, then, as shown in Figure 39. Given a maximum allowed error (e), the true mean (m), the population variance, the sample size (N), and the standard deviation (a) of the measurement, one can compute from a table of the normal probability density function, knowing sample variance from Eq. (109) the probability that the measured value will fall within the error interval, This is the cross-hatched area in Figure 39, Conversely, given the maximum error and the probability that the measurement falls within it, one can compute the required sample variance and consequently the required sample size, A measurement of the probability of an event can be obtained by counting the number of observations on which the event occurred, and dividing by the 7Cf. Goode and Machol (Ref. 6), po 101o 118

I-e(/), I I ~~~~~~~~~~~~E = allowed error z w I ^ ^ ^ \ m = true mean value II ~o L r rn 0 0 m-E m m+E MEASURED VALUE Figure 39. Distribution of a measured mean value.

total number of observations. The expected value of this estimate 's equal to the true probability. The variance of the number of occurrences of the event is determined from the binomial distribution: variance of number of occurrences = Np(l-p) (110) where p is the true probability of the event, and N is the total number of independent observations or trials. Since the probability estimate is obtained by dividing the number of occurrences by N, it is clear that the variance of the probability estimate is found by dividing Eq. (110) by N2. Hence, variance of probability estimate p(l-P) (11l) N The probability estimate is again normally distributed, and hence one can calculate the probability that the estimate falls within a certain percentage of the true value just as in the case of a mean valueo Formulas (109) and (111) are used in the following sections to determine sample sizes (N) needed to obtain estimates falling within a given error percentage of the true values. 5.3. Calculation of Sample Sizes 5.3.1. MEAN ARRIVAL AND SERVICE TIME For the exponential distribution on time interval between arrivals or time duration for service, f(t)dt = \et dt, (112) the population variance is l/x2, and the mean value is l/%. Therefore, the variance of the measured mean time interval is "Feller (Ref. 7), p. 214. 120

a2 = ~ (113) 2N and since the expected value of the measured mean is equal to l/%, _1 a = (N) (114) m In this case the sample size N is the number of arrivals or service completions observed. Values of N required to make the maximum error in the measured mean +10, ~20, and +40% with 0.95 probability have been calculated. The results are presented in Table XIII. TABLE XIII SAMPLE SIZES FOR MEASUREMENTS OF EXPONENTIALLY DISTRIBUTED ARRIVAL OR SERVICE TIME 95% Probable Expected Value a/m Ratio of Required Maximum Error of Error Measurement N + 10% + 4.85%.061 270 + 20% ~ 9.7%.122 68 + 40% ~19.4%.244 17 Also indicated in Table XIII are the expected values of the error for a given sample size N. 5.3.2. MEAN THROUGHPUT TIME Any observed value of arrival or service time is independent of the state of the system. Such is not the case for the remaining measurements to be discussed here. For example, throughput time is by definition the total time taken for a request to go through the system, from the moment of its arrival to the moment of its departure. It thus includes service time and waiting time, with the latter dependent upon the state of the system at the time of arrival. The state of the system at any instant is in turn dependent to some extent upon its state at any previous instant (the "transient" effect discussed in Section 4.3). Hence, in contrast to observations of service time, consecutive observations of throughput time of completed jobs are not inde121

pendent. For independent observations to be obtained, an amount of time must elapse between observations so that the degree to which the system state at one observation point determines the system state at the next point has become negligible. This interval, which can be determined from the transient solutions for the state probabilities, will be called the "sampling interval," The discussion of transient solutions has pointed out that the sampling interval is dependent upon the system state (initial condition) at the preceding observation point. It has been found that for values of p < 0.8, an initial state of 20 requests in the system results in the longest sampling interval (for a system limited to N = 20). Rather than determine a sampling interval for each of the possible initial states, the sampling interval for an initial state of 20 will be usedo This will yield somewhat pessimistic results for the total time duration of a simulation run, The sampling interval also depends upon the measurement being made, For example, the distribution of throughput time,9 tp, given by P(tpt) =(M —PM+QM)e - M e-M(l-P)t (115) M - 1 - oM depends upon the transient phenomena only to the extent that N QM - Z Pn(t) n=M does. The time interval required for QM to reach the steady-state value (within a given small error) is clearly smaller than the time for P20(t) to reach steady-state value. Hence, measurements of mean throughput time can be made with a smaller sampling interval than measurements of P20o The criterion for determining the sampling interval is, therefore, that the error due to the transient (nonindependent) phenomenon, in conjunction with the statistical error due to a finite number of sample values, shall be less than the desired error in the measurements of steady-state behavior. From Eq. (115) the expected value and variance of throughput time can be obtained as follows: 1 QM E(tp) - + - (116) ki iM(i-p) 9See Morse (Refo 1), p. 107. 122

QM(2-QM) Var(tp) = 1 + (117) M2(1-p)2 The transien-t solutions for the state probabilities yield transient values of E(tp) and Var(tp), as shown in Table XIV. (As previously indicated, the initial state is 20,) TABLE XIV TRANSIENT VALUES FOR QM, E(tp), AND Var(tp) T N p (Normalized QM = Z Pn(t) ~E(tp) Ci2Var(tp) to Ts) M 0.5 10.5 o08131 1.02323 1.01273 11.5.07873 1.02249 1.01235 12.5.07744 1.02212 1.01215 07619 1.02177 1.01196 0.8 10o5.53993 1.38567 1,40221 12.5.51200 1.36571 1,38870 15.0.49321 1.35229 1.37916.47472 1.33908 1,36943 The value T is the sampling interval normalized to the mean service time, Ts = 1/i. Steady-state values are given as the entries T -+ o. Table XV presents the sample sizes calculated at the given sampling intervals to achieve 10% maximum error from the steady-state mean throughput time. It is clear that, as T increases, the error due to the transient solution decreases, and the total error is principally composed of the statistical error due to the finite sample. Hence, the number of sample values required decreases, but as a result of the increasing sampling interval, the total simulated time required (NT) increases. The desired sampling interval is the one which results in minimum NT. For p = 0,5. T is therefore 7 mean service times. 5.3.3. MEASUREMENT OF MEAN NUMBER IN THE SYSTEM The mean number of job requests in the system, either in service or awaiting service, is N E(n) = L - nPn (118) n=0 123

TABLE XV CALCULATED VALUES OF SAMPLE SIZE FOR DIFFERENT SAMPLING INTERVALS IN MEASUREMENT OF MEAN THROUGHPUT TIME T p ( lT i95% Probable a/m Ratio of Sample p (Normalized NT toTs) Maximum Error Measurement Size N 0.5 5.0 + o10.0253 1625 8125 7.0 + 10.0495 416 2912 10.5 + 10%.0521 375 3938 0.8 10.5 + 10%.0529 500 5250 12.5 + 10%.0627 356 4450 15.0 + 10%.0670 306 4590 where Pn are the state probabilities. The steady-state value of L is obtained using the steady-state values for the probabilities P^ = Pn Mn P 0 < n< M Pn =P M Po M< n< N M1- where Po is determined by N E Pn = 1.0 n=O Use of the transient values of the state probabilities gives a transient value, L(t), just as in the case of mean throughput time discussed in the preceding paragraphs. The calculation of the sampling interval and sample sizes is therefore quite similar to the discussion in Section 5.302. Table XVI presents the values of N and T which give the desired maximum error with minimum length of run, NT. 5.3.4. MEASUREMENT OF STATE PROBABILITIES The number of samples and sampling intervals have been determined for measurements of state probabilities. The determination involves use of Eq, 124

TABLE XVI SAMPLE SIZES AND SAMPLING INTERVALS FOR MEASUREMENTS OF MEAN NUMBER IN THE SYSTEM 95% Probable Steady-State Transient _P Maximum Error L L N 0.5 ~ 10% 3.576 30593 12.0 124 + 20% 3.576 3.593 120 31 0.8 ~ 10o 7.163 7o217 20.0 119 + 20% 7.163 7.217 20.0 30 (110), using for p the calculated transient state probability for an initial state of 20. Values of N and T are then found so that the deviation of the transient probability from the steady-state value, together with the statistical error, is less than the desired maximum error in measurement of the steady-state value (with 95% probability). The values of N and T also give minimum NTo Results are presented in Table XVII for several probabilities. The results indicate that a large number of samples is required, primarily because the state probabilities are rather low. Sample sizes could be reduced considerably if, instead of measuring probabilities of individual states, one were content to measure, for example, the probability of all channels being busy. TABLE XVII SAMPLE SIZES FOR MEASUREMEiT OF STATE PROBABILITIES Steady-State Transient 95% Probable Probability P TProbability Maximum Error N P7 =.038099 0,5 12,0.038486 ~ 10% 10,230 ~ 20% 2,465 P7 =.090407 0o7 121 o 09006 ~ 10% 3,870 ~ 20% 955 P12 =.001191 0.5 14.3 o001214 ~ 10% 390,000 ~ 20% 84,600 125

5.3.5. MEASUREMENT OF THE MEAN FIRST-PASSAGE TIME TO THE nth STATE The mean first-passage time (to,n) to the nth state, assuming that the system is initially in state zero at time t = O, is given by E(ton) = o tp(to,n)dt (119) where: p(to n), the probability density of the first passage to the nth state. If, however, E(to,n) is obtained from reduction of simulation data, the parameter of interest is the number of observations required to reduce the variance of the sample mean to the desired level [Eqo (109)]. The number of samples required to obtain maximum error of ~10% or ~20% (with 95% probability of the measurement falling in the specified error interval about the true mean) for some representative measurements is shown in Table XVIII. The number of observations is greatest for small p and/or large N. Each observation corresponds to one simulation run. The system initially is in state zero, and the observation is terminated when the nth state is reached. When the distributions P(to,n) are known, everything about the length of the simulation run is known. The normalized sampling interval T is therefore the expected value E(to,n) = T, indicated in Table XVIII. The total amount of simulated time (in terms of TS = 1/p) required is equal to the TN product. For example, this computation for P(to,lo) at p =.5 is given by TN = 15,450 units of TS 5.4. Length of Simulation Run The results for sample sizes presented in the previous sections can be expressed in terms of average IBM-704 time required to achieve that number of samples in the AN/FSQ-27 simulation program. The two observed speeds of this program, normalized to the arrival rate, are 0.86 k and 0.o44 A. (The units of these numbers are minutes of computer time per unit of simulated time.) To convert data on sample sizes to minutes of simulation run, then, requires an expression for the mean interval between samples in terms of the average arrival interval, Ta = 1/\. This interval is tabulated in Table XIX, column two, for the various measurements to be made. The expression for the 126

interval in terms of X makes use of the relation p = \/74o TABLE XVIII SAMPLE SIZES FOR THE MEASUREMENT OF THE MEAN FIRST-PASSAGE TO THE mth STATE 95% Probable P(ton) P Maximum Error T Var(to,n) N P(to,7) 5 ~ 10% 8.218 48.579/b 194 ~ 20% 69.7 ~ 10% 3.510 6.325/b 111 + 20% 49 P(to,10).5 ~ 10% 60.056 3,462.888/b 258 + 20% 92.7 + 10% 12.134 109.430/k 200 ~ 20% 71.9 ~ 10% 5.157 15.113/A 153 ~ 20% 54 P(to,20).9 ~ 10% 41.732 1,343 484/k 208 + 20% 74 TABLE XIX AVERAGE INTERVAL BETWEEN SAMPLES Mean Interval Measurement in Units of Interval in Simulated Time Terms of Mean arrival time 1/\ 1/\ Mean service time 1/\ 1/A Mean throughput time T/i 7pT/2 Mean number in system T/p. 7pT/\ State probability T/Cp 7pT/k Mean first-passage time T/p. 7pT/2 127

To convert the data on sample sizes to simulation run length, t7he number of samples N is multiplied by the appropriate average interval between samples given in Table XIX and the speed of the program (o86 X or 044 Q) Table XX presents the values of 704 time obtained in this manner for various measurements. The steady-state value of the quantity to be measured, as computed from the assumed analytical model, has been included, The principal factor determining the speed of the simulation program is the number of time log entries per unit of simulated time, The number of entries can vary over a wide range, depending upon the complexity of the job program representation. (i.e., the number of major joints required per job program). The figures in the last column of Table XX indicate the 704 time required when the job program is represented by only one major joint. As a result these figures are representative of the maximum performance for the present stimulation. On the other hand, the next to last column indicates the time requirements when the job program representation contains a large number (_ 1000) major joints per job. In the first case, we have essentially a simple queue simulator, while in the second, queue interaction occurs because there is competition for the shared moduleso 5, 5 Summary It is apparent from a consideration of Table XX that even with an efficient simulation (ie., high speed), experimentally determined state probabilities and mean first-passage times for small p and large n are beyond consideration at a charge rate of $5.00 per minute (the cost of 704 computer time). On the other hand, mean arrival, service, and throughput time, as well as measurements on the mean number of jobs in the system, are certainly within acceptable limits, The principal advantage of a Monte Carlo technique is that the system can be modeled to a detail which cannot be obtained by analytical methods, The price to be paid for this desirable feature is, in general, expensive computer runs, It is clear, then, that the advantage of the simulation, approach can be lost if the cost of simulation runs approaches the cost of direct experimentation with an actual system. Numerical solutions for an analytical model, as in the case of transient solutions for the state probabilities, represent a second approach to the problem of system evaluation. Once the equations of detailed balance are obtained and programmed on a computer, the computer costs are considerably less than for a Monte Carlo simulation, For example, numerical calculation of the first-passage time distribution to the l0th state for p =.5 was obtained in this study for $120.00; the same result (see Table XIX) would have cost $11,900 using the simulation. Therefore it is desirable to program the solutions to an analytical model if the model studied is satisfactory for the application. 128

TABLE XX AVERAGE DURATION OF SIMULATION RUN FOR MEASUREMENTS Steady-State Number of Average 704 Time Average 704 Time Measurement p Value to be 95 Probable Samples Required at Required at Measured Maximum Error Required Speed of 0.86 A Speed of 0.044 k Mean arrival or - 1/A or l/ + 10% 270 232 min 12 min service time + 20% 68 58 Mean throughput 0.5 1.022/i +~ 10% 416 8,750 448 time ~ 20% 97 2,040 105 0.8 1.339/p + 10% 356 21,400 1,100 ~ 20% 78 4,700 240 Mean number in 0.5 3.576 ~ 10% 124 4,480 230 the system ~ 20% 31 1,120 58 0.8 7.163 ~ 10% 119 11,500 586 + 20% 30 2,900 148 ro State probability 0.5 0.038099 ~ 10% 10,230 370,000 18,900 \u0 P7 + 20% 2,465 89,000 4,550 0.7 0.090407 ~ 10% 3,870 197,500 10,100 + 20% 955 48,500 2,490 P12. 0..001191 ~ 10% 390,000 16,800,000 860,000 ~ 20% 84,600 3,640,000 186,000 Mean first-pas- 0.5 8.218/1 + 10% 194 4,470 2 sage time to ~ 20% 69 1,695 87 state n, n = 7 0.7 3.510/ +~ 10 111 1,640 838 + 20% 49 725 37 n = 10 0.5 60.1/u ~ 10% 258 46,500 2,380 + 20% 92 16,550 850 0.7 12.1/ ~ 10% 200 10,200 518 + 20% 71 3,530 184 n = 20 0.9 41.7/u + 10% 208 47,000 240 + 20% 74 16,700 85.......~~~~~~~~~~8

6. SUTIARY AND CONCLUSIONS 6.1. Capability of the Simulation The computer program described in Section 3 incorporates a considerable degree of flexibility. The result of this flexibility is a rather broad capability for study of different aspects of the system design. The input generating mechanism of the simulation program makes it possible to consider a variety of problem mixes. It provides for arbitrary specification of the distribution of arrival intervals for each problem class, and also for the simulation of interdependence between arrivals. The latter feature is especially useful in studies of job-program segmentation, where arrivals would be interpreted as requests for execution of only a segment of an individual program, and would therefore be dependent upon the completion of preceding segments. The ability to assign priorities to entire programs or to individual segments is an important feature of the simulation program. The statistical method of generating the characteristics of job programs or program segments gives generality in studying the performance of the system in processing different classes of problems. The equipment requirements, time durations, and interruptibility characteristics of each class of problems can be varied. Representation of the manner in which programs use individual modules (in terms of major and minor joint durations) makes possible the study of subordinate module sharing. In addition to the number and variety of subordinate modules available in the system, the simulation program provides for arbitrary specification of the access time distribution for each module type, as well as the switching time required to establish connections between modules. It is clear that flexibility in the study of master program functions cannot easily be provided through variable parameters alone. Since functions analogous to those of the master program in a real system must also be performed in the simulation, modifications of master program functions will involve reprogramming parts of the simulation program. However, the simulation has been designed to provide isolation between sections of the master program, so many modifications can be accommodated without undue difficulty. Important among these is the method used by the master program to schedule job requests for service, i.e., the queue discipline. 131

6.2. Limitations of the Simulation The flexibility and detail of system modeling which has been introduced in this simulation has of course resulted in a reduction of simulation speed from what might be accomplished with a cruder model and a less flexible program. Section 5 has indicated that obtaining measurements from the simulation requires long and rather expensive computer runs in general, and in particular that measurements of state probabilities cannot practicably be obtained. The following table reproduces certain entries from Table XX in Section 5.4, and indicates the lengths of run required for those measurements that are at all feasible. These figures are based on the slowest simulation speed, since this case is representative of the detail of modeling for which the simulation would be expected to show its greatest utility. System Measuremen System 704 Computer Measurement Utilizationer Factor (up) Time Mean throughput time 0.5 8,750 min Mean number in the system 0.5 4,480 Mean first-passage time to state 7 0.5 4,470 The speed of the simulation could of course be considerably increased by a simplification of the model. But the complexity of the system being modeled here demands a rather complex simulation if one is to answer the questions that originally resulted in the choice of simulation as a means of investigation. The Monte Carlo allows the system to be modeled to a detail which cannot easily be obtained by analytical methods. An attempt to improve simulation. speed by elimination of this detail would therefore reduce the value of the simulation approach. Other possibilities for improvement of speed are coding of the simulation program in an assembly language rather than a compiler, refinements in programming technique, and use of a higher-speed computero It is difficult to assess the degree of improvement that could be obtained in such ways, but it is unreasonable to anticipate much more than an order of magnitude improvement. This would be insufficient to bring state probability measurements within the realm of practicality, and would not appreciably alter the conclusion that simulation runs are expensive. 132

There is another alternatives given only limited consideration, which can also lead to an improvement in simulation speed. This is to incorporate results of analytical studies of parts of the system in the Monte Carlo simulation of the complete system, The analytical results to be incorporated would of course be distributions on time intervals, or the probabilities of events. The simulation would thereby be simplified. This procedure has been used to some extent in the AN/FSQ-27 simulation, as can be seen from the following example. Consider the method used to generate exponentially distributed intervals for job request arrivalso The desired interval is obtained using the functional relationship between a random variable uniformly distributed over the unit interval and an exponentially distributed random variable (see Section A.2.6)o The same result could have been obtained by specifying a constant probability of a job-request arrival in an incremental element of time dt, independent from interval to interval, and thereby generating the occurrence of a job request by a Monte Carlo modeling of the shot noise mechanism, The latter is obviously inefficient compared to the former. The point is simply that analytical models (i.e0, the distribution functions obtained from their solutions) should be incorporated whenever possibleo If large portions of the system can be handled in this manner, the utility of a simulation is enhanced, Specifically, one might include the throughput time distributions obtained from the solutions of some simple queueing problems in a secondgeneration simulation program. Although judgment of the utility of simulation is in the last analysis subjective, the above discussion supports the conclusion that a simulation, as described in Section 3, is an expensive research tool for a complex system like the AN/FSQ-27. This conclusion holds particularly when the purpose of a study is to derive general principles regarding system behavior. Such a study, of course, involves varying many different parameters over broad limits; in other words, a large number of runs. It is therefore desirable to use simplified analytical models, wherever possible, to establish broad principles of behavior, to guide the investigator to those aspects of system detail which are critical in performance, and to achieve simplification of simulation when this is possibleo Further attention should be given to the problem of improving simulation techniques in the manner suggested in this section. 6o3. The Queueing Theory Model The mathematical theory of queues has proven to be an effective approach to an analytical model for the AN/FSQ-27 system, 133

As applied to a polymorphic computer, queueing theory provides measures of system performance in two areas: the number of requests in the system, and the waiting and throughput time per job request. It has been shown that an attempt to obtain high utilization for the job computers increases the mean queue length. This implies, of course, that the delay per request is also increased. The trade-off between efficient utilization of equipment and waiting time is therefore a basic problem in a polymorphic computer. Regardless of the measure employed (mean waiting time as in Section 4.4 or nonsaturation of storage as in Section 4,5), the penalty for high utilization of the job computers is increased delay. A graphic illustration of this point is the inefficient use of the job computers, i.e., increased service time per channel, when there is competition for a shared module. To the extent that the exponential service facilities described in Sections 4.4, 4.5, and 4.6 model the AN/FSQ-27 polymorphic computer, the conclusion can be drawn that the shared module utilization should be less than.75 to avoid queueing for a shared module.,0 Similarly, the system utilization factor (^_P) should not exceed.5 if the mean waiting time is to be small (Tw <.1 Ts) compared to the mean computation time per job request.11 Although a relative weighting between delay and equipment utilization is implicit in the above summarizing statement, the general principle still remains. The price for high equipment utilization is a degrading of the "time" performance of the system and, in general, this degradation becomes increasingly nonlinear as the utilization factor approaches one. The generality with which the state of a system can be defined justifies the position that a queueing theory approach is a powerful analytical tool.12 Priorities, modified arrival- and service-time distributions, sequential queues, and queue interaction are some of the problems which can be handled by redefining the system state, These, as well as additional studies, would constitute the basis for additional research, 1OFigure 4, Section 4,o6 11Figure 1, Section 4.4. 12A more detailed discussion of this point is included in Section 4.235 134

7. REFERENCES lo P. M. Morse, Queues, Inventories and Maintenance, Operations Research Society of America Publications in Operations Research, No. 1 (New York: John Wiley and Sons Inc.9 1958) 2. R. Ao Frazer, W. J.o Duncan and. A. Ro Collar, Elementary Matrices (Cambridge: University Press, 1955 ) 30 L. Saaty "T'ime-Dependent Solutions of the Many-Server Poisson Queue," Journal of Operations Resear-ch (December, 1960), 755-772. 4. Ao Erdelyi, Wo Magnus, Fo Oberhettinger. and. F. G. Tricomi, eds., Tables of Integral Transforms (New York: McGraw-Hill Book Co., Inc., 1954), I, No. 40 5~ Lo Go Peck and. Ro No Hazelwood, Finite Queueing Tables (New York~ John Wiley and Sons, Inc.o 1958). 6. Ho H. Goode and Ro Eo Machol, System Engineering (New York: McGraw-Hill Book Coo, Inc., 1957)7- W. Feller, An Introduction to Probability Theory and Its Applications, 2nd Ed. (New York: John Wiley and Sons, Inco, 1959)9 Io 8. Jo W. Butler, "Machine Sampling from Given Probability Distributions," in Proceedings of a Second Symposium on Large-Scale Digital Calculating Machinery; XXVI, Annals of the Computation Laboratory of Harvard University (1951), 249. 9. A. Rotenburg, "A New Pseudo-Random Number Generator," J Assoco Compo Mach. VI, No. 1 (January, 1959), 75-77 -10. H. Go Kuehn, "A 48-Bit Pseudo-Random. Number Generator," Communications of the Assoc. Com Mach., IV, No. 8 (August, 1961), 350-352O 135

APPENDIX A DETAILS OF THE SIMULATION PROGRAM This appendix describes the simulation program in exhaustive detail. Operating instructions, including a definitive exposition of input card format, are covered in Section Ao1. Flow charts and the complete coding of the program (using MAD and SAP)13 are available in Section A.2. A. lo Operating Instructions A. l.. THE PROGRAM DECK There are two main programs and 10 subroutines which are combined to form a two-core Ping Pong deck, with one subroutine used in both core loads' The complete operating deck contains, in this order, (1) two ID cards (2) the program deck (Figure 40) (3) a specification card -- "*$ DATA" (4) the input data cards (Section A. lo3) Certain variations in the simulation program are made possible by the use of override cards, placed in numerical order in the program deck after the last card of the routine which is being modified. In the case of the overrides to the TMLG subroutine, the cards must be used in both core loads. The table below describes the effect of the overrides when inserted into the program deck. Card Identification Function TIMLG 098, 099 Suppresses the printing of each new time log entry. 1It is assumed that the reader is familiar with the MAD compiler and the Executive System as used by The University of Michigan Computing Center with the IBM-704. 137

MPMIN 200 Causes the master computer to loop through joints 1 and 4 when not otherwise occupied. MPMIN 201 Eliminates consideration of switching time.14 MPMIN 202, 203 Eliminates consideration of job program restart penalties.14 Name of Routine MAIN1 START First core load TIMLG Transition card MAIN2 ALERT DIST IGP JPMAJ Second core load MPMIN NOTE ONEMD SETMD TIMLG Transition card Figure 40. The program deck. It is faster to use these overrides than to make the appropriate parameters zero. 138

Ao 1o 2 DISTRIBUTIOCN PARAMETERS All parameters P of the simulation which might be represented by a statistical distribution are carried in the program in the form of a code d.igit, F, and variables Pio P is computed as a function of F and the Pi's each time that P is called for during the simulation, F is used by the program to determine the type of function to be applied to Pi. This computation is performed in a subroutine accessible to all parts of the simulation program, so that the values of F (except for F = 1) and the functions so defined are applicable to all simulation parameters. Table XXI describes all presently defined values of Fo (r is a uniformly distributed random number, 0< r 1lo) Ao 1o3 INPUT All input to the simulation is in the form of one- or two-dimensional arrays of integers These input arrays make up the initial conditions of the tables (Table I, Section 33,1l) used by the simulation, A. 13 1. Card Format Ao.3o1 lo0 The Run Number Card. -Each set of data to be used as input to a given simulation run must be given a run numberO This is a 6-digit integer to be punched in columns 1 through 6 of every input card of a given run. A card with this information only, and the rest of the card blank, is called a run number cardo Aolo3ol.2, Data Cards —Each array has a name of 6 or fewer alphabetic characters. The contents of each array, however, must be integers0 As an example, let us assume we have a 5 x 2 array named ABODE which contains the following information: -i 27 666666666 0 75 0 15 -1023 55 0 The first card (Figure 41) contains the run number, the array name, a card number of 0, the number of words in each row of the array (as data word number 1), and the total number of words in the array (as data word number 2) Succeeding cards of the array have the run number, the array name, and consecutive card numbers starting with 1o Each row of the array is punched starting at data word 1, using each data word field in succession through 139

TABLE XXI THE DISTRIBUTION PARAMETERS F Distribution Pi (input parameters) P (subroutine output) 0 Constant P1 = constant P1 1* Uniform over Given the two intervals P2or + P3 if r < e two intervals (a,b) and (cd), with P4-r + P5 if r ) e e = probability of P in (a,b): P1 = eL106 P2 = (b-a)/e P3 = a P4 = (d-c)/(l-e) P5 = d-P4 2 Exponential 1/P2 = mean -P210oger if -P2log0er < lesser of (ll P2, P1) P1 = upper limit P1 otherwise 3 Normal P2 = mean P will be given as positive between + 4P1 + P2 P1 = standard deviation *This is a special code to be used only for major joint lengths.

RUN ARRAY CARD NUMBER NAME DATA WORDA NO. 1(2) DATA WORD NO. 2(2) DATA WORD NO. 32 DATA WORD N0.42 I 6 8 1314 16 18 30 32 44 46 58 60 72 112200 ABCDE 0 5 10 _______________ 112200 ABCDE 1 -1 27 66666666666 112200 ABCDE 2 75_______________ 112200 ABCD _____3 I______o_ 15 -1023 35 12200 4 H 112200 XXX ______ ___xxx_________ 1. JUSTIFIED TO THE LEFT. 2. JUSTIFIED TO THE RIGHT. LEADING ZEROS NEED NOT BE PUNCHED. Figure 41. Basic card format.

number 4, and then continuing with word 1 of the next card. A new row always starts with a new card, the card immediately following the last card of the preceding row. Rules for keypunching these data are as follows: (a) The array name is justified to the left. (b) All numeric information is justified to the right. (c) Leading zeros need not be punched. Thus, 027 may be punched as 27. (d) A field which is entirely zero may be left blank. (e) Plus signs need not be punched, (f) Minus signs must be punched, but may be placed at any position to the left of the most significant digit. That is, there may be spaces between the sign (plus or minus) and the integer. A.,1.31o.3o The Decko-A complete set of data for a simulation run consists of one run number card followed by the data cards for the arrays. Within each array the cards must be in order by card number, but the order of arrays is immaterial. All eleven arrays must be entered. However, if the array named XXX is not needed for a particular run, only one card need be punched (Figure 41). Data word 1, the number of words in each row of the array, may be zero in this case except for arrays QUEUE and PERBUFo It is advisable first to keypunch the data without punching the run number, and then to make a copy of this deck, This will prove useful if the simulation is to be run, stopped, and then run again starting from the point at which the first run was stopped. A, 1.3 2. Input Arrays There are eleven tables that must be entered at input data to the simulation. These arrays can be considered as belonging to three distinct groupso The parameter tables are the arrays containing the parameters of the hardware and the problem mix, The contents of these tables remain unchanged during the course of the simulationo The status tables show the condition of the equipment and the progress of the input problems. The contents of these tables change as the simulation proceeds~ The queues are the waiting lines 142

that are generated. Not only the contents, but the lengths of these arrays change during the course of the programn In the following paragraphs the description of each array is headed by the array name, the maximum number of words for which space has been allotted in the present program, and the simulation names (if they exist) for the number of words in each row and for the number of words in. the entire array. It should be noted that each row of an array must have the same number of words. The program assumes that the same units of time are given in all tables. Aolo3o2ol. Parameter Tables o-IGPLOG, 196, DIG: This table describes related sequences of job programs to be used as input to the simulation (Section 3o3o3)o If no such interdependent set of job programs is a part of the input problem mix to be simulated, the IGPLOG may be left blank, Each sequence is given a sequence number r, which must be greater than 19. Each program to be run and each time delay between programs is considered an event of a sequence. These events are numbered from 1 through no Each sequence is then described by n+l rows of the IGPLOG array, with the first row used to describe the sequence in general, and one row for each event. The first row describing each sequence has six relevant wordso -1, r, F, P1, P2, and n. The distribution parameters F, P1, and P2 give the time intervals between succeeding initiations of the entire sequence, A row describing an event which is a request for a job program has the following information: E, 0, the job program type, 0, 0, el, e2,ooo, where the ei's are the numbers of the events following the completion of this event, and E is the number of times that this event is listed as an ei by other event s A row describing a time delay between the completion of one job and the start of others has this information~ E, 1, F, P1, P2, el, e2, oo, where E and ei are as described above, and the distribution parameters give the length of the time delayo All the sequences to be used as input in one run are put together into one IGPLOG arrayo The different sequences in one IGPLOG need not have the same number of events in each, and one sequence follows immediately after the other, Although the sequences themselves need not be in any order, the events within each sequence must be in order by event number, although this number is not keypunched on the array cards. One restriction on the form of the data is that event number 1 must be the first event to be performedo It must have an E of zero, and this must be the only event with E = 0, 143

Figure 42 illustrates the IGPLOG in tabular form for three sequences, the first of which is the example in Section 3.3.3. Figure 43 shows the same data in card layout form. ID r or Distribution Parameters n Event or Event or or e2 e3 Number E Code Program Number el -1 28 0 20,000 0 5 1 0 0 3 2 2 1 1 0 1,000 0 3 5 3 1 1 0 2,000 0 4 4 2 0 1 5 1 0 4 4 -1 26 0 500,000 0 6 1 0 1 0 20 5 3 4 2 3 0 66 3 1 08 2 4 1 0 5 2 5 1 1 0 30 0 2 6 1 0 7 -1 30 2 20,000 30,000 3 1 0 0 7 2 3 2 1 0 4 3 1 0 6 Figure 42, An IGPLOG table. IMPLOG, 145, DMP: The master program may be considered as a series of connections between a computer module and a controlled module, followed by certain operations which involve the processing of job programs through the system. Figures 8 and 9 (Section 3.2.2), show these connections and the ensuing master program functions. Each row of the IMPLOG array has data regarding one joint of the master program: 144

RUN ARRAY CARD NUMBER NAME RA NO!2 IDATA WORD NO. 1(2) DATA WORD NO. 2(2) DATA WORD NO. 3(2 DATA WORD N. 4() 1 61 8 13 14 16 18 30 32 44 46 58 60 72 112200 I IGPLOG 0 8 136 ___ 112200 IGPLOG 1 -1 28 0 20000 112200 IGPLOG 2 0 5 0 0 112200 IGPLOG 3 0 0 3 0 112200 IGPLOG 4 0 2 0 0 112200 IGPLOG 5 1 1 0 1000 112200 IGPLOG 6 O 3 5 YH| 1 snn ___ IGPLOG _______________ 112200 IGPLOG 13 -1 26 0 500000 112200 IGPLOG 14 0 6 112200 IGPLOG 15 0 1 0 20 112200 IGPLOG 16 0 5 3 4 112200 IGPLOG 112200 IGPLOG 33 1 0 6 o 112200 IGPLOG 34 0 0o o 1. JUSTIFIED TO THE LEFT. 2. JUSTIFIED TO THE RIGHT. LEADING ZEROS NEED NOT BE PUNCHED. Figure 43. An IGPLOG card set.

(a) the controlled module, coded numerically (Figure 44) (b) the interrupt criterion for that joint, where a "1" means that an alert will be accepted before the start of that joint, and a "0" means that the alert will be ignored (c) F, P1, P2, giving the time needed to perform the function following the module connection, Module Type Numerical Code BM-B 10 PB 20 CX 30 TM 4O CX memory 50 BM 60 DB 70 DM 80 PL 90 PR 100 TA 110 Figure 44, Numerical coding of module types. There are four joints not depicted in Figures 8 and 9 (Section 3,2,2). Joints 19, 20, and 29 are needed for certain technical aspects of the simulation program. For these, the controlled module should be zero and the function times are ignored. Joint 28 is the minor joint of job programs, occurring before each major joint. There are certain restrictions on the interrupt criteria. Joints 8, 20, 21,15 23, and 1 or 4 must be interruptible, while 7, 11 through 19, 22, and 24 through 28 cannot be interrupted. It should be noted that 8 and 23 are also interruptible at any point during the joint. The controlled modules for joints 8 and 23 should be given as zero, as these joints represent a computer module not connected to any controlled module, waiting for an alert from another computer module, For this reason 5If a job computer receives an alert after the completion of a job program but before it can connect to the master drum to mark the job complete, the completion of the job by the job computer will be noted twice in the output, and the ASTRSK and INPROG totals will be incorrect accordingly (Figure 61)o 146

also, the function times for these joints must be given as very large-any amount which will insure that the simulation comes to an end before these joints are overo Joints 7, 1i3 15, 229 24, and 269 representing connections to the CX, should have a function time of zero, although this is not necessary to the simulation, The function time for joint 12 should also be zero, with the access time to the CX memory, given in the module characteristic table, specifying the time to load the memory (Section 335,7) A sample IMPLOG in tabular form is given in Figure 45, Part of the IMPLOG in card layout form is shown in Figure 46. Note that it is not necessary to consider P2 if this is zero for all the joints, Although the cards must be in joint number order, the joint number does not appear on the cards. MCT, 120, DMC: The module characteristic table contains the access time for each type of controlled module in the system which is used by the master program, ioe,, listed in the IMPLOGo There is only one row for each different type of module. Each row gives the module type (coded numerically) and the access time in F, P1, P2 form, If P2 is not needed, it does not have to be included. The central exchange memory is considered as a controlled module for this purpose, and is included in the table. Its access time represents the time needed to load the memory. The CX module need not be listed, The rows of the array may be in any order. Figure 47 shows a sample MCT array. PURVUE, 368, DPUR: The purview table contains information specifying the job type. It is assumed by the simulation program that the job program types are numbered consecutively starting with 1, that each row of the purview table has the data for one job type, and that the rows of the PUR-ITE array are in order by job type number, although these numbers are not punched. The first word of each array is the priority number of the jobo The next four sets of three words each are the distribution parameters F, Pi1, and P2 needed to compute the following data: (a) the time interval after which (from the present time or from the time of the alert, whichever is later) the job will interrupt itself (b) the time interval between successive requests for, or arrivals of, this program, a quantity used only when this job is in the input problem mix by itself and is not part of a sequence 147

Joint Controlled Interrupt F P P2 Number Module Criterion 1 PB 1 0 1,000 0 2 1. 0 140,000 0 3 MD I 0 3,000 4 MD 1 0 55,000 5 PB 1 0 1,000 6 MD 1 0 260,000 7 CX 0 0 8 0 1 0 34,359,738,367 9 MD 1 0 240,000 10 MD 1 0 1,000 1L M.D 0 0 2,000 12 CX memory 0 0 0 13 CX 00 0 14 MD 0 0 240,000 15 CX 00 0 16 PB 0 0 1,000 17 MT 0 0 200,000 18 MD 0 0 1,000 19 0 0 0 0 20 0 1 0 0 21. MD 1 0 26,000 22 CX 00 0 23 0 1 0 34,359,738,367 24 CX 00 0 25 MD 0 0 1,000 26 CX 00 0 27 MT 0 0 40,000 28 PB 0 0 1,000 29 0 1 0 0 0 Figure 45. An IMPLOG table. 148

RUN ARRAY DATA WORDRD NO. 22(2 DATA WORD NO. 3(2) DATA WORD NO. 42) NUMBER NAME 1) NO~2) 1 6 8 13 14 16 18 30 32 44 46 5860 72 112200 IMPLOG 4 116 __ 112200 IMPLOG 1 20 1 1000 112200 IMPLOG 2 40 1 140000 112200 IMPLOG 3 10 o1 __ _ 3000 112200 IMPLOG 4 10 1 o000 112200 IMPLOG 5 20 1 1000 112200 IMPLOG 6 10 1 ____ 260000 112200 IMPLOG 7 30 _______o_.|____ F-1 o |112200 IMPLOG 8 _1 4 9738367 112200 IMPLOG 112200 IMPLOG 29 _______ 1. JUSTIFIED TO THE LEFT. 2. JUSTIFIED TO THE RIGHT. LEADING ZEROS NEED NOT BE PUNCHED. Figure 4b. An IMPILOG card set.

Module Number F P1 10 0 8,500 20 0 8,500 40 0 2,800,000 50 0 2,000 Figure 47. An MCT table. (c) the length of a major joint (d) the number of major joints. All the modules required to run the job program are listed, in numerical order, starting with the 14th word of the array. The computer module and shared modules must not be listed. The word immediately after the last module must be 999, If the distribution code of F = 1 is used (for major joint lengths only), parameters P3, P4, and P5 are placed in words 23, 24, and 25 of the PURVUE array. These need not be included on the input cards if not used. This means that, in this situation no job- can have more than 8 exclusive modules, and only 14 different problem types can be entered as input data. Words 26, 27, and 28 contain the distribution parameters for the penalty applied when a interrupted job is restarted, When job restart parameters are used, words 23, 24, and 25 must, obviously, be punched on the input cards. They may, of course, be set equal to zero. If restart penalties are not used and there is a possibility that jobs may be interrupted, either words 26-28 should contain zeros or the proper overrides (Section A.l.1) must be used. Figure 48 shows a purview table with three jobs. In this example, DPUR would be punched on the input cards as 28. However, if restart penalties and P3, P4, and P5 were not needed, DPUR could be 18. Aol.3.2o2. Status Tables. —JCR, 35, DJC, JCEND: This is a record of the status of each job computer in the system. There are five words in each rowo The first word is 1 if the job computer is busy with a job program; otherwise it is Oo The second word indicates whether or not the computer is sending an alert to the master computer. A 0 indicates that no alert is being sent, A 1 indicates that the job computer is alerting the master computer to set the CX memory at the start of execution of a job program, A 2 shows that an alert is being sent to the master computer in response to an alert previously sent by the master computer. The third and fourth words are used as temporary storage by the simulation program when a job has been interrupted, They hold, respectively, the number of the major joint which has 150

Interrupt Arrva Maj or Joint No, Major Restar ^Interrupt Arrival Required Modules (If Needed.I Priority Criterion Rate Length Joints Penalty ____ F PI P2 F P 2 P P2 F PP P2 Pi P- P1 P [111 2" 5 0 25 0 0 1,000 0 0 200 00 5 0 406060999 4 0 30 002,000 00 150 00 00 60 6080110999 210010 \J15 H 6 0 100 0 0 5,000 0 1 100,000 200 0 20 0 999 300 40 425 Figure 48. A PURVUE table.

been interrupted and the length of time lost in that joint because of the interruption. The fifth word is a switch used by the simulation. It is set to 2 while the job computer is working on a job, and to 1 after the job has been completed. To start the simulation from a point at which no job computer is working on a job program, set words 1 through 4 equal to 0, and set word 5 equal to 1. (See Figure 9 for the card layout forms for a system with two job computers.) To start the simulation at any other point, it would be advisable to study the flow charts and coding carefully before constructing the JCRO It is assumed that the job computers are numbered consecutively starting with 0, and that the rows of the array are entered in this order. JCEND/DJC must equal the number of job computers represented in the time logo MAT, 3259 DMA, MAEND: The module availability table has one entry for every controlled module in the system, including the CX memory pseudo module, but excluding the CX pseudo module, Each row gives the status of a module: (a) the module type, coded numerically (b) the condition of activity, where 1 means that the module is connected to a controlling module, and 0 means that the module is free (c) the operative status, where 1 means that the module is disabled and 0 implies the reversel6 (d) the module assignment, where -1 means that the module is free to be assigned to any job program, 0 indicates a module used by the master program (as shown in the IMPLOG), and any other number is the job number k to which this module is assigned. Where the assignment is other than 0, the activity status is irrelevant. The MAT rows must be in numerical order. Figure 50 depicts a sample MAT, where only one job program in the system, k = 53, has any modules assigned. MISC, 75: This table is a collection of miscellaneous information needed by the simulation mainly for internal communication between its various subroutines. Only the first six words and the 25th word of this array need be considered by the simulation user unless a simulation run is to be 16since there is no mechanism now in the simulation to change this status, this word should be 0 for all modules0 152

RUN ARRAY CARD 2(2 NUMBER NAME DATA WORD NO. 1(2 DATA WORD NO. 2(2) DATA WORD NO. 32 DATA WORD N0.4(2 NUMBER NAME i' NO.^ AT WR 1 6 8 131141618 30 32 44 46 58 60 72 112200 JCR 5 10 __________ __________ 112200 JCR 1________ _____________________ 112200 JCR 2 1_____________________ ______ ____ 112200 JCR ______ _____ _____________________ 112200 JCR 4 1 _____________________ \J1 1. JUSTIFIED TO THE LEFT. 2. JUSTIFIED TO THE RIGHT. LEADING ZEROS NEED NOT BE PUNCHED. Figure 49. A JCR card set.

Module Operative Type Activity Status Assignment 10 1 0 0 20 1 0 0 40 0 0 0 40 0 0 -1 400 0 53 50 0 0 0 600 0 -1 600 0 0 600 0 53 6o 0 0 53 80 0 0 -1 80 0 0 53 900 0 -1 110 0 0 -1 Figure 50. An MAT table. started at a point where the first master program joint to be performed is not 1 or 4, or there are jobs which have already entered the system. However, all 26 words of the array must be punched as input (Figure 51), Table XXII gives the name by which each word is called in the simulation program, plus a brief explanation of its use. It is necessary to study the flow charts and coding of the program to learn the exact use of MISC (6) through MISC (25). A.1.3.2.3. Queues. —PERBUF, 160, DPBQ, PBQEND: This queue holds the job program requests in the peripheral buffer, in the order of their arrival, Each row of the array represents a job request, and has (a) the problem type p (b) the sequence number L (c) the sequence type r (d) e, the event number in the sequence L that this problem represents (e) the job number ko If this occurrence of the problem p is not in connection with any sequence of jobs, L must be zero, and r and e are irrelevant. DPBQ must always be 5o When the array is empty, PBQEND must be Oo 154

RUN ARRAY CARD NUMBER NAME NO2 DATA WORD NO. 1(2) DATA WORD NO. 2(2) DATA WORD NO. 32 DATA WORD N0.42 i 6 8 1314 16 18 30 32 44 46 58 60 72 112200 MISC 26 26 __________ 112200 MISC 1 1 1 0 80 112200 MISC 2 2 11 __________ 112200 MISC ____3_ ____ _____________________ 112200 MISC 4___________ ____________ ____________ _____ 112200 MISC 5 __________ ____________ ____________ _____ 112200 MISC 6 112200 MISC 7 34359788367 ____________ ________ 1. JUSTIFIED TO THE LEFT. 2. JUSTIFIED TO THE RIGHT. LEADING ZEROS NEED NOT BE PUNCHED. Figure 51. A MISC card set.

TABLE XXII THE MISC TABLE Names Function MISC(O) LASTL The sequence number L to be assigned to the next sequence of jobs initiated by the input generating program. If this input scheme is not used, L is irrelevant. If L is used, it must be greater than 0. MISC(1) LASTK The job number k to be assigned to the next job request put into the peripheral buffer. k must be greater than 0. MISC(2) COMPLT A count of the number of completed jobs in the program queue (the QUEUE). If the program is to start at master program joint 5 or 6, the coding should be examined to determine the proper value of COMPLT. MISC(3) CXTIME The switching time of the central exchange. MISC(4) ALPHAI A switch used by the simulation. This should be set to 1 initially. MISC(5) TLX The location of the first (in time) item in the time log. Considering the TIMELG array as a vector with subscripts starting at 0, TLX is the subscript of the first word in that TIMELG row (item) where the time, given by TIMELG(TLX+1), is the earliest time in the array. MISC(6) NEWP MISC(7) NEWL Used by the master program to store, temporarily, information about a MISC(8) NEWR new Job request before that job is put into the program queue. MISC(9) NEWJ MISC(10) NEWPR MISC(11) Q An index of the job in the program queue that the master program is presently working on. MISC(12) JC A function of the number of a job computer that the master program is considering. MISC(13) QBUMP An index for a job in the program queue whose equipment the master program might appropriate for a higher-priority job. MISC(14) GAMMAI MISC(15) PHII Switches used by the simulation when one computer module alerts another. MISC( 16) PII J MISC(17) K The job-program number of a job being processed by the master program. MISC(18) PURI Needed for temporary storage by the subroutines which assign modules to job programs. MISC(19) PBQU MISC(20) BACKLW MISC(21) STANBY The initial values of the totals described in Section A.1.4. MISC(22) INPROG MISC(23) COMP MISC(24) ASTRSK MISC(25) UNIRAN The initial value of the random number used by the DISTI subroutine to generate succeeding random numbers and to compute the required distributions. 156

Figure 52 illustrates the peripheral buffer queue with five job requests. Note that the first is a request for job 1 as occurring in the sequence shown in Figure 42. Job 1 has also been requested independent of any sequence. P L r e k 1 3 28 4 17 3 0 0 0 18 1 0 0 0 19 2 0 0 0 20 2 0 0 0 21 Figure 52. A PERBUF table. QUEUE, 250, DQ, QEND: The program queue lists all job program being processed by the system. Jobs are added to the queue shortly after being picked up from the peripheral buffer by the master program; they are removed from the queue shortly after they have been completed by a job computer. The queue is ordered by priority number, and, within priority, by the job number k. Each row of the queue pertains to one job program, and has the following information: (a) the priority number (b) the job number k (c) the job type p (d) 0, unless this is a job which was started and then interrupted, in which case this word contains the number of the major joint which was interrupted (e) 0, unless this is a job which was started and then interrupted, in which case this word contains the amount of time remaining to be executed in the major joint which was interrupted (f) the sequence number L (g) the sequence type r 157

(h) the present status of the job, where 63 means the job is in the backlog, 255 means the job is in standby, 1023 means the job has been completed, m < 16 means that the job is in progress and is being executed by job computer m, and 16 < m < 31 means that job computer m-16 is about to start the job17 (i) e, the event number in the sequence L that this job represents (j) n, the total number of major joints in this program (as derived from the purview table). If this occurrence of the problem p is not in connection with any sequence of jobs, L must be zero and r and e are irrelevant, When the QUEUE is empty, QEND must be wet equal to zero. Whether the QUEUE is empty or not, DQ should be given as some integer > 10, in accordance with the following discussion, The simulation program stops running and signals an error (Section Aolo6) when the number of jobs in the QUEUE times DQ exceeds 250. In this way, one can model a queue which holds only 4 jobs by setting DQ equal to any number between 51 and 62. A maximum length queue of 25 is achieved by setting DQ = 10o Figure 53 depicts a program queue with five jobs in it, under the following conditions~ (a) the jobs are those given in the PERBUF table in Figure 52, and defined by the PURVUE table in Figure 48 (b) job 19 has been interrupted in the middle of the second major joint and is now in stand-by (c) job 20 is being processed by job computer 0 (d) job 21 is about to be processed by job computer 1 (e) job 17 has been completed (f) job 18 is in the backlog. Note that job 19, whose original priority number was 5, now has a priority number of 4 because it was interrupted. 17Before this status is assigned to a job in the queue, the flow charts and coding must be studied carefully. 158

Joint Time Priority k p Interrupted Left L r Status e n 4 19 1 2 -0 255 5 4 20 2 0 3 4 21 2 17 3 5 17. 3 28 1023 4 5 6 18 3 63 20 Figure 53~ A QTEUE tableo SEQQ, 1129 DCQ, QENILo The sequence queue gives the status of the sequences of jobs in progress. The sequences themselves are described by the IGPLOG; their present status is given in the SEQQo If the IPGDODG is not being used, the SEQQ can be emptyo The sequence queue is in order by the sequence number Lo For each sequence (in progress) of n events, the queue has n words-L the number of events antecedent to event 2 which have not yet been completed the number of events antecedent to event n which have not yet been completedo Thus, at the initiation of each sequence. the last n-1 words are the E's of the IGPLOGo Figure 54 illustrates a sequence queue with three sequences in progress. Sequence number 3 is of type 28 (refer.to Figure 42) and has just one more event to be done before it is completedo Sequence nuztber 4 is also of type 28 and has just been startedo Sequence 5 has obviously been completed. and sequence 6 is of type 30 and has just been startedo -L -3 0 0 1 C -4 1 1 2 1 -6 1 1 Figure 540 A SEQQ tableo 159

The rows in one SEQQ need not have the same number of words in each, and one row follows immediately after the other (Figure 55). DCQ should always be 4, even when CQEND is zero, if the sequence queue is to be used by the program. TIMELG, 440: The time log is the mechanism which runs the simulation. There is usually one entry in the log for each element in the AN/FSQ-27 system which is operating simultaneously with, and generally unrestricted by, the other parts of the system. Each such time-related, independent activity of the AN/FSQ-27 is represented by an entry in the time log. Examples of such activities include master program functions, execution of job programs, and the arrival of job requests. Each entry in the time log corresponds to a row of 11 words in the TIMELG array. The first three words in each row contain: (a) i, an indicator determined by the format and contents of the log (b) t, the time at which this event is to occur (c) s, a code determining the interpretation of the rest of the words in the row. CONTENT: Five different values of s are used to define the different types of entries which can be represented in the time logo Computer Module Activity (s = 0,1) — There must be one and only one entry in the log for each computer module in the system. The last eight words in each such entry contain: (a) a, an alert indication — if this computer has not received an alert from another computer; otherwise, the time at which such an alert was sent (a is reset to 0 when the alert is accepted) (b) k, the job number (c) p, the job type (d) j, the next joint of the main routine to be performed (a major joint for a job computer; a joint of the basic master program loop for the master computer) (e) J', the next joint of a subroutine to be performed (a minor joint for a job computer; the alert-accepting section of the master program for the master computer) 160

RUN ARRAY CARD RUMBR NAE NO2 DATA WORD NO. I(2) DATA WORD NO. 2(2 DATA WORD NO.3(2) DATA WORD NO.4(2) _1 _6 I1 8 13 14 1618 30 132 44 46 58 60 72 112200 SEQQ _ 4___ 13 ____________ 112200 SEQQ 1 -53 0 0 1 112200 SEQQ 2 0 -4 I 112200 SEQQ 3 2 1 -6 1 112200 SEQQ1 4I1 1 ______ a' 1. JUSTIFIED TO THE LEFT. 2. JUSTIFIED TO THE RIGHT. LEADING ZEROS NEED NOT BE PUNCHED. Figure 55. A SEQQ card set.

(f) JC, the job computer number (-1 indicates the master computer) (g) Y, the controlled module to which the computer module is presently connected (-1 indicates that the job computer is in a major joint) (h) n, the number of major joints in the job program. K, p, and n are 0 for the master computer. Figure 56 illustrates several entries representing computer module activity which could be in a tine log (individually). In order they depict: (a) a master computer, not presently connected to any controlled module, which will attempt to start joint 1 at time 5 (b) a master computer, presently connected to module 50, which is due to start joint 13 at time 17, was alerted at time 7, and would have started joint 3 at some earlier time had it not been for the occurrence and acceptance of the alert (c) job computer 2, at present in major joint 3 (j-l) of job type 1, which is due to start joint 28 at time 8 (d) job computer 0, presently connected to module 20, and due to start major joint 9 of problem type 2 at time 4. Note that s = 1 when the next joint to be performed is a minor joint; s = 0 when the next joint is to be a major joint. i t s a K JC Y n 5 1 0 0 0 1 0 -1 0 0 17 1 7 0 0 3 13 -1 50 0 8 1 0 46 1 4 28 2 -1 5 4 0 0 43 2 9 0 0 20 10 Figure 56. Computer module TIMELG entrieso 162

Arrival of Job Request (s = 2).-~For each problem type whose arrival is not related to a job sequence as given in an IGPI.G, there is one entry in the time log. The problem type p is given in the 6th word of that row. The use of sequences as an input device means that there is at least one entry in the log for each such sequence being used, In this case, the data following s are: an event number e, the sequence number L, and the sequence type r. When e = 1, this entry indicates the start of a new progression through the sequence r. In this case, L should be zero, as this will be assigned by the simulation program. An e greater than 1 indicates that at time t, one event in the sequence r antecedent to event e will have been completed, Figure 57 illustrates some typical situations, where: (a) job type 2 will be requested at time 700 (b) one of the precedence requirements18 for event 4 in sequence type 28 (Figure 42) will have been satisfied at time 720 (c) sequence type 28 will be started again at time 20,500. i t s e L r or p 700 2 0 0 2 720 2 4 3 28 20,500 2 1 0 28 Figure 57. Job request TIMELG entries. Restart Procedure (s = 5). -The word after s gives the time interval at which this procedure (the punching out of the contents of the tables for restart purposes) is repeated (Section 3.3.1). End of Simulation (s = 4).-This entry must appear in the time log. The simulation program ends at time t. 1STo be precise, only one of the precedence requirements for event 4 could be represented by an entry in the time log. When event 5, a job request, is completed, no entry is made in the time log, whether or not event 4 can be started. Event 3, on the other hand, will always be noted by an entry in the time log at the end of the interval which event 3 represents. 1653

FORMAT: The TIMELG array is in the form of an associative list; that is, each item gives the location of the next item, in a chain fashion. Figure 58 illustrates what might be a complete set of time log entries, There is, first, a master computer, about to start joint 1. There are two job computers not working on any job and waiting to be alerted by the master computer. There is one restart entry, and it can be seen that the restart procedure will occur twice during the running of the simulation (and once at the end). There is only one problem type which will be input to this simulation runo After all the entries in the log have been listed, the index location (left-hand column of Figure 58) for each item should be noted. For a situation in which the IGPLOG is not in use during a particular simulation run, this is always 0 for the first item, 11 for the second, etc. Next, parameter TLX in the MISC array should be set to the index location of the first (in time) entry in the time log to be executed. In this case, one could set TLX equal to 0 or 55, but since it would be useless to start the master computing going before there is anything for it to work on, TLX should be set at 55. Then, indicator i, the first word of every row in the array, is set to the index location of the next (in time) item in the log. The last i must be -1. There must always be at least 2 items in the logo Where the IGPLOG is in use, the situation is slightly different, In this case, there must be available to the simulation a list of available slots into which new time log entries may be placed during the simulation run, To accomplish this, a blank entry (all words equal to zero) is placed before the first entry in the log (Figure 59)~ This entry then has the index location of Oo The items immediately following that one have indices starting with 11, 22, etco, and the chaining of the time log proceeds as described, above, The blank entry at location zero is now the first entry of a list of blank, available items which are chained together in exactly the same fashion as the rest of the time logo The last i in this chain must also be -1. There must be a number of blank entries equal to one more than the maximum number of sequence events that could occur simultaneously. A.o 4. OUTPUT The principal output from the simulation program is an historical listing of the events associated with each job as it passes through the various stages of processing. 164

a, e, or k p Index LIone i t s Restart or or j j' JC Y n Location Interval L r 0 Master computer 33 0 1 1 -1 11 Job computers 22 34,359,738,367 23 22 - 1 34,359,738,36 7 23 33 Restart 44 20,000 5 20,000 44 End 11 50,000 4 55 Input 0 0 2 1 Not Punched Time log entries TLX = 55 Figure 58. A TIMELG table.

a, e, or k p Intdx i t s Restart or or j j JC Y n Location oca ion Interval L r 0 Available 77 11 44 0 1 1 22 33 34,359,738,367 1 23 33 - 1 34359,738,367 1 23 44 Time log 55 20,000 5 20,000 55 22 50,000 4 66 11 0 2 1 1 26 77 88 88 Available 99 99 -1 TLX = 66 Figure 59. A TIMELG table.

A. 1. 4.1. Printed Output The printed output from a simulation run is usually just one page, giving the run number, the initial entries in the time log, and the times at the beginning and end of each program segment. Program segments are those intervals of computation which exclude both the initial loading of the program and the input arrays, and the punching of the simulation tables as caused by the appearance of a restart or end of simulation entry in the time log. The first program segment starts after the input data have been read in. The last program segment ends before the contents of all tables are punched out. Intermediate segments end and begin before and after (respectively) the punching of the simulation tables due to the action of the restart procedure. Both real time and simulated time are printed. At the option of the user, all time log entries can be printed as they are inserted into the time log. A.1. 4.2. Punched Cards Three types of cards are punched as output from the program, and these cards can be distinguished by means of a punch in column 80. A.1.4.2.1. Time Cards (2 in Column 80). —These cards contain the same information on the times of each program segment as is printed.19 A.1.4.2.2. Array Cards (Blank in Column 80).-A set of array cards is punched for each restart and end of simulation entry in the time log. These cards are exactly the same in format as the input array cards, and give the contents of the simulation tables at the time that the cards are punched. The only tables punched are those that change during the program. That is, the parameter tables IGPLOG, IMPLOG, PURVUE, and MCT are not punched. The run number on the first set of these output cards is one more than the run number on the input cards, and this number is increased by one for each succeeding set of output cards. To restart the simulation from any point at which a set of these cards is punched, it is necessary only to add to the output cards a copy of the input cards for the parameter tables IGPLOG, IMPLOG, PURVUE, and MCT with a matching run number. This complete set will then form a new input data deck. A.1.4.2.3. Program Progress Cards (1 in Column 80). —As each problem enters the AN/FSQ-27 computer, it goes through several stages of processing (Figure 60) before it is completed. In addition to the states of progress 19The real times printed and punched may differ slightly. 167

Code Job request arrives, 0 Peripheral buffer queue l Master program processing Backlog 3 \ Master program processing I Standby __ Master program processing L 6 Execution 7 Completion 8 Job is reported completed. o Figure 60. Job processing stages. Each job request is first received in the pheripheral buffer. It is then processed by the master program and put into the backlog. Some additional processing may or may not be required before the job is placed in the stand-by list. Master program processing is always necessary before execution can begin, and there is always a delay after the execution of a job before the master computer can send a completion message to the system operator. The dotted lines indicate the possible regression steps of a job because of its pre-emption by a higher-ranking job. 168

of a job shown in Figure 7 (Section 3.2.1), there are four more considered by the program. Three of these are the intermediary stages, when the master program is moving the job from the peripheral buffer to the backlog, from the backlog to the stand-by list, and from the stand-by list to the stage of actual execution of the job program. The fourth is the unimportant one where the job program is not in the computer at all. These stages are given numerical codes. A program progress card (Figure 61) is punched for each job at every point at which the job changes stages. The time of this change, the processing stages involved, and job-program identification are punched. The processing stage code numbers form the first and third digits of a threedigit field (columns 10-12) on the card. If the job's transition between these two stages is accomplished at the cost of retrograding another job, the middle digit in this field will be a 1. Otherwise, the digit will be a 0. All the possible three-digit configurations are shown in Table XXIII, together with a brief description of the meaning of the configuration and its place of origin in the simulation program. The simulation program maintains running totals of the number of problems in the system in each stage of processing, for stages, 1, 3, 5, 7, and 2, 4, and 6 combined. These totals, which change only as each job changes stages, are also punched on each program progress card. Pseudo program progress cards are punched if the user of the simulation program has taken the option of eliminating the master program's repetition of the loop between joints 1 and 4 (Section A. 1.1). In this case, a card is punched whenever the master program leaves or enters (effectively the simulated AN/FSQ-27 system. The three-digit identification codes (card columns 10-12) used are 706 and 607, respectively. The rest of the information on the card is as described in Figure 61. K and p are both 0. A. 1.5 TIMING The speed of the simulation program is almost completely a function of the number of entries made in the time log. The time to process one timelog entry depends on a large number of factors, primarily the number of modules in the system, the number of items in the time log at any given time, and the types of distribution functions used. A figure of 10 to 15 milliseconds per time-log entry should give a reasonable estimate of the time for a given set of input cards. Note that moving down (in time) an item in the log because of the unavilability of a subordinate module constitutes another entry in the log. 169

Card704 Names Card Co o.umns Information in NOTE Col umns Subroutine 1-6 The run number (as given on the input cards). RUNNUM 10 The processing stage the job is leaving. CODEA I. An indication of whether or not another job has been retrograded to accomplish this change of stages. A 1 means yes; a 0, no. CODEB 12 The processing stage the job is entering. CODEC 18-29 The time at which the job is changing stages. TIMELG(TLX+l) 33-35 The job number k. KPRINT 38-39 The job type p. PPRINT 49-52 The number of jobs in the peripheral buffer (stage 1). PBQU 53-56 The number of jobs in the backlog (stage 3). BACKILG 57-60 The number of jobs in the stand-by list (stage 5). STANBY 61-64 The number of jobs being executed (stage 7). INPROG 65-68 The number of jobs which have been completed, but not yet reported out (stage 8). COMP 69-72 The number of jobs in all other processing phases (stages, 2, 4, and 6). ASTRSK 80 I... Figure 61. Program progress cards (primary simulation output). 170

TABLE XXIII THE IDENTIFICATION OF A JOB'S PROGRESS ON A PROGRAM PROGRESS CARD Identification Origin in Program* Meaning 001 IGP routine The job has just arrived at the peripheral buffer. 102 MP joint 1 The MP has removed the job from the PB. 203 MP joint 3 The job has been placed in the backlog. 305 MP joints 4, 6, 9, The job has been moved from the backlog 10, or 14 to the stand-by list. 314 MP joints 4, 6, 9, This job has been removed from the back10, or 14 log, and the MP is alerting another job (in progress) to pre-empt its modules. 315 MP joints 4, 6, 9, The job has been moved from the backlog 10, or 14 to the stand-by list, while another job has been moved in the reverse direction. 415 MP joint 9 This notation will always follow a 314 card, and means that the alerted job has responded and has given up its modules. This job is now in the stand-by list. 503 MP joints 4, 6, 9, This job has been moved to the backlog 10, or 14 from stand-by. 506 MP joints 4, 6, 9, This job is about to be started. Either 10, 14, or 16 the MC is alerting a free JC, or a JC has picked up this job on its own from the program queue. 516 MP joints 4, 6, 9, The MP is alerting a JC to stop process10, or 14 ing its lower-ranking job to start work on this one. 605 MP joint 25 This job is put back into the stand-by list after being interrupted. This notation always follows a 706 card. 607 MP joint 19 This job has started execution. 706 MP joint 24 This job has just been interrupted. 708 MP joints 20 or 24 This job has been been completed. 800 MP joint 5 The MP is removing this job from the program queue and reporting its completion to the system operator via the peripheral buffer. *When the output originates in the master program, the time punched on the card is the time at which the CX time and the access time to the subordinate module have been computed, but before the time to perform the MP function has been considered. 171

Ao, l 6, SCHEDULED ERROR STOPS There are several points in the program at which an error may occur and be detected by the program itselfo At these points, the program stops and a memory dump is taken, There are other, unscheduled errors which cause the program to end prematurely, and in some of these there is also a memory dump printout. In the former instances, however, the dumps give precise information about the cause of the error stop; namely, the two's complement of the address of the order which transfers control from the simulation program to the memory dump subroutine is found in index register 4, or Co Figure 62 lists the relative addresses of the entries to the dump routine, together with the absolute addresses of those words which might be a clue as to the source of the difficulty, The first three error stops listed occur because of an error in the input cards, and, in the first two cases, the program is stopped before any printed output from that run occurs. The last four error stops listed occur because a queue has exceeded capacity. These occur only after the output page for that run has been printed. Table XXIV will aid in the debugging of all types of errors, as it lists the locations in memory of all the tables which contain the simulation parameters. Addresses in both tables are given in octal. TABLE XXIV SIMULATION TABLES Octal Equivalent Location of Name _of Name First Word* IGPLOG +312747434627 333 IMPLOG +314447434627 554 JCR -012351606060 617 MAT -042163606060 1324 MCT -042363606060 1514 MISC -043162236060 1627 PERBUF -072551226426 2067 PURVUE -076451656425 2647 QUEUE -106425642560 3241 SEQQ -222550506060 3421 TIMELG -233144254327 4311 *Arrays are stored, in a sense, backwards. If the address of the first element is x, succeeding elements will be found in x-l, x-2, - etc. The information stored in these locations does not include the words on cards numbered zero in the input deck. 172

Name of Routine Relative Significant Information in Which Exit to Dump Meaning of Error Absolute Name of Error is Subroutine Address* Meaning of Contents of Address Variable Detected START 276 The card just read did not have the 4455 Run no. as given on the run no. input card. RUNNO expected run number, array name, or 4456 Run no. as given on the last card read. RtNNUM card number. The first card (num- 4675 Array name as given on the last card read. ARRAY bered 000) of an array was expected 4700 Card no. as given on the last card read. CARDNO here. 4701 First data word on the last card read. DAR 4673 Second data word on the last card read. AREND START 703 The card just read did not have the 4455 Run no. as given on the run no. input card. RUNNO expected run number, array name, or 4456 Run no. as given on the last card read. RUNNUM card number. A card other than the 4675 Array name as given on the first card of first of an array was expected here. the array. ARRAY 4674 Array name as given on the last card read. ARRAYi 4700 Card no. on the next to last card read. CARDNO 4677 Card no. on the next to last card read. CARDNI START 1100 All of the input cards have been 4547... These locations contain the no. of words INPUT(i)... read in, but one of the arrays has 4355 in each array (in alphabetical order) as INPUT(5) H exceeded the space allotted to it given on the input cards. Check these in memory. figures against the dimension statements in the MAD program and/or the figures given in Section A.1.5. MPMIN 1032 The no. of items in the program 4437 Present no. of words in the program queue. QEND queue has exceeded capacity. 4454 Maximum no. of words allowed in the queue. QMAX TIMLG 233 This error can occur only when the IGPLOG is being used. This stop results when a space is needed in the time log for a new entry. IGP 700 The no. of items in the peripheral 4341 Present no. of words in the PB queue. PBQUEND buffer queue has exceeded capacity. 4433 Maximum no. of words allowed in the queue. PBQ$AX The no. of words in the sequence 4336 Present no. of words in the sequence queue. CQEND queue has exceeded capacity. 4432 Maximum no. of words allowed in the sequence queue. CQMAX *The addresses given here, where they are derived from relative addresses, may change if any part of the program deck is changed by anything other than the overrides listed in Appendix A.l. Figure 62. Debugging aids.

A. 2. Flow Charts and Coding A. 2.1. THE MAIN1 ROUTINE The MAIN1 routine (Table XXV) is the main program for the first core load. The code examines the first entry in the time log and performs one of the following actions: (a) enters the START routine to read in the input cards, and transfers control to the second core load (b) enters the START routine to punch out the contents of the simulation tables, and either returns control to the second core load or performs (a) above. A. 22. THE START SUBROUTINE This subroutine (Table XXVI) has two entries, START (Figure 63) and RESTAR (Figure 64). The first is used at the beginning of the program to read in the input deck. Checks are made to see that the format of the card is correct. The entry RESTAR is used whenever a restart or end of simulation item is found in the time log. The contents of the arrays are then punched out. A. 2.3. THE TIMELG SUBROUTINE The TIMELG subroutine (Table XXVII) is concerned with the mechanical arranging of the entries in the time log. There are seven entries to this subroutine: (a) FINDJC - The time log is searched for a particular job computer. (b) FINDMC - The time log is searched for the master computer. (c) MOVEl - The time-log item at the top of the log has had its time changed by some subroutine. This item is moved to its proper new place. (d) MOVET - The time-log item at a given position in the log has had its time changed by some subroutine. This item is moved to its proper new place. (e) PUTT - A new item is inserted into the log. 174

TABLE XXV MAIN1 ROUTINE *COMPILE MAD,PUNCH OBJECT MAIN1000 NORMAL MODE IS INTEGER EQUIVALENCE (INPUT(30),DIG) ( INPUT (31)DMP), (INPUT(32) 1,DJC) ( INPUT(33) DMA) ( INPUT(34) DMC), (INPUT(36),DPBQ) 2,(INPUT(37),DPUR)*(INPUT(38).DQ),(INPUT(48) MAEND),(IN 3 PUT(51),PBQEND),(INPUT(53),QEND),(INPUT(54) CQEND),( 4 MISC(O),LASTL),(MISC(1),LASTK),(MISC(2).COMPLT),(MISC 5 (3),CXTIME) (MISC(4),ALPHAI) (MISC(5),TLX) (MISC(6) NEWP),( 6 MISC(7),NEWL)MISC(8NEWR(MSISC(9),NEWJ),(MISC(10) NEWPR 7 ) (MISC(11),Q) (MISC(12),JC)(MISC(13)QBUMP), (MISC(14), 8 GAMMAI).(MISC(15),PHII) (MISC(16),PII)t(MISC(17) K), 9 (MISC(18),PUR1),(INPUT(47),JCEND) EQUIVALENCE (MISC(19))PBQU),(MISC(20),BACKLG),(MISC(21),STA 1 NBY),(MISC(22) INPROG) (MISC(23) COMP),(MISC(24) ASTRSK) PROGRAM COMMON IGPLOG IMPLOG,JCRMAT.MCTMISCPERBUFPURVUE 1,QUEUESEQQTIMELGINPUTINFINTLJLRCQMAXPBQMAXQMAXT 2 IMEPUROLDTLOLDTLXJX.MPTIME3,RUNNORUNNUM DIMENSION IGPLOG(195) IMPLOG(144),JCR(34) MAT(324), 1 MCT(119),INPUT(74) PERBUF(159),PURVUE(367),QUEUE(249), 2 SEQQ(111) TIMELG(439) MISC(74),TIME3(9) TRANSFER TO DO (TIMELG (TLX +2)) DO(O) EXECUTE START. INFI N34359738367 PBQMAX=32*DPBQ QMAX=250 CQMAX=112 GO EXECUTE SEQPGM. 00(4) EXECUTE RESTAR. TRANSFER TO DO(0) DO(5) EXECUTE RESTAR. TRANSFER TO GO VECTOR VALUES TIME3=$1HO14,911212,11212115,13,)15. 1 110I13141,I10,119 *$ END OF PROGRAM 175

TABLE XXVI START SUBROUTINE *COMPILE MAD. DUMP# PUNCH OBJECT STARTOOO EXTERNAL FUNCTION ENTRY TO START. NORMAL MODE IS INTEGER EQUIVALENCE( INPUT( 30 ) DI6) T( INPUT (31) DMP ) ( INPUT ( 32 1 tDJC),(INPUT(33) DMA) (INPUT(34) DMC) (INPUT(36) DPBQ) 2 ( INPUT(37) DPUR) (INPUT(38),DQ) (INPUT(48) MAEND) ( IN 3 PUT(51) PBQEND),(INPUT(53) QEND)t(INPUT(54) CQEND) ( 4 MISC(O)tLASTL).(MISC(1).LASTK),(MISC(2),COMPLT),(MISC 5 (3),CXTIME)(4MISC(4)tALPHAI)t(MISC(5)*TLX)t(MISC(6),NEWP),( 6 MISC(7),NEWL).(MISC(8),NEWR),(MISC(9),NEWJ) t(MISC(10)NEWPR 7 ),(MISC(11))Q) (MISC(12) JC) (MISC(13) QBUMP),(MISC(14), 8 GAMMAI) (MISC(15)t PHIIi (MISC(16) PII),(MISC(17) K)t 9 (MISC(18 )PUR1) (INPUT(47) JCEND EQUIVALENCE (MISC(19),PBQU),(MISC(20).BACKLG),(MISC(21)tSTA 1 NBY)t(MISC(22),INPROG ),MISC(23) COMP) (MISC(24) ASTRSK) PROGRAM COMMON IGPLOG, IMPLOG, JCR MATMCT M ISC PERBUFPURVUE 1 *QUEUESEQQTTIMELG INPUT.INFINtTLJLR,.CQMAXtPBQMAXQMAX.T 2 IME.PUR.OLDTLDTLOLDTLXJXtMP TIME3rRUNNORUNNUM DIMENSION IGPLOG(195 ) IMPLOG(144) JCR(34 ) MAT(324) 1 MCT(119) INPUT(74) PERBUF(159) PURVUE(367) QUEUE(249), 2 SEQQ(11 )TIMELG(439) MISC(74 )TIME3(9) VECTOR VALUES INPUT ~ SIGPLOG$,$IMPLOGStSJCRSSMAT$S$MCT$ 1,SMISCSSPERBUFS$SPURVUES$SQUEUE$S$SEQQS$STIMELGS THROUGH S581,FOR IN=15.1,IN*E*26 S581 INPUT(IN)=S1S VECTOR VALUES ALL S $I6, S1. C6t 13. 4(Slt13)*S READ FORMAT ALL, RUNNO S 58 READ FORMAT ALLt RUNNUMtARRAY, CARDNOt DARAREND S 59 THROUGH S 59tFOR IN= O, lIN.E.15*OR.RUNNUM.E.RUNNO.AND. 1CARDNOE. OAND*INPUT(IN) ^EARRAY WHENEVER IN *E. 15 S63 EXECUTE ERROR. END OF CONDITIONAL WORDNO a 0 INPUT(IN+30) a DAR INPUT(IN+45) a AREND INPUT(IN+15) a $ S S 60 WHENEVER WORDNO.GE.ARENDTRANSFER TO S 64 CARDCT = WORDNO WORDNO~WORDNO+DAR S 61 WHENEVER CARDCT+3oGE*WORDNO END a WORDNO-1 OTHERWISE END = CARDCT+3 END OF CONDITIONAL TRANSFER TO GET4(N) GET(O) READ FORMAT ALLRUNNUMARRAY1tCARDNIIGPLOG(CARDCT).*tIGPLOG 1 (END) TRANSFER TO S 62 GET( 1) READ FORMAT ALLRUNNUMARRAYICARDN1IMPLOG(CARDCT).*.IMPLOG 1 (END) TRANSFER TO S 62 GET(2) READ FORMAT ALLRUNNUMtARRAY1lCARDNIXJCR (CARDCT)*..JCR 1 (END) TRANSFER TO S 62 GET(3) READ FORMAT ALL.RUNNUM.ARRAY1CARDNlMAT (CARDCT) ~.MAT 1 (END) TRANSFER TO S 62 176

TABLE XXVI (Continued) GET(4) READ FORMAT ALLRUNNUMARRAY19CARONNIMCT (CARDCT). MCT 11-13-61 1 (END) TRANSFER TO S 62 GET(5) READ FORMAT ALL,RUNNUMARRAYIlCARDNlMISC (CARDCT).*.MISC 1 (END) TRANSFER TO S 62 GET(6) READ FORMAT ALL.RUNNUMARRAY1,CARDN1,PERBUF(CARDCT)...PERBUF 1 (END) TRANSFER TO S 62 GET(7) READ FORMAT ALLRUNNUMARRAY1,CARDN1,PURVUE(CARDCT)*..PURVUE 1 (END) TRANSFER TO S 62 GET(8) READ FORMAT ALLtRUNNUM#ARRAY1LCARDN1,QUEUE (CARDCT).*.QUEUE 1 (END) TRANSFER TO S 62 GET(9) READ FORMAT ALLfRUNNUMtARRAYltCARDN1SEQQ (CARDCT)..SEQQ 1 (END) TRANSFER TO S 62 GET(10) READ FORMAT ALLRUNNUMARRAY1,CARDN1,TIMELG(CARDCT)...TIMELG 1 (END) TRANSFER TO S 62 S 62 WHENEVER RUNNO *NE.RUNNUM.OR.ARRAY*NE.ARRAYl.OR.CARDN 1 1-1INE^CARDNOP EXECUTE ERROR. CARDNO = CARDN1 CARDCT = CARDCT+4 WHENEVER CARDCT.GEeWORDNOTRANSFER TO S 60 TRANSFER TO S 61 S 64 THROUGH S64,FOR IN,INE11INE26.OR.INPUT(IN).E.$1$ WHENEVER IN*NEe26t TRANSFER TO S58 PRINT FORMAT T1,RUNNO VECTOR VALUES TlS$27H1THE NUMBER OF THIS RUN IS 16*$ PRINT FORMAT T2 VECTOR VALUES T2=$61H4THE INITIAL VALUES IN THE TIME LOG ARE (IN ORDER BY TIME) —'*$ PRINT FORMAT T3 VECTOR VALUES T3=$101HO TIME S A 1 K P J J-PRIME JC Y 2N*$ PRINT FORMAT T4 VECTOR VALUES T4$S1H *$ THROUGH S103 FOR TL=TLX (TIMELG(TL)-TL) TL.Eo-1 S103 PRINT FORMAT TIME3#0TIMELG(TL+l),,.TIMELG(TL+10) PRINT FORMAT T5 VECTOR VALUES T5SS106H4THE FIGURES BELOW GIVE REAL TIME (IN T LHOUSANDTHS OF AN HOUR) AND SIMULATED TIME FOR EACH PROGRAM SE 2GMENT.*S PRINT FORMAT T6 VECTOR VALUES T6'$42HO REAL SIMULAT 1ED*$ WHENEVER INPUT(45) G *196 OR INPUT(46 ) G145 *OR. NPUT(47) 1 *G *35.OR.INPUT(48).G *325O0R.INPUT(49)*G *120.OR.INPUT(50) 2.G775*OR.INPUT(51)*G *160*OR.INPUT(52).G 1368.OR.INPUT(53) 3.G *250.OR~INPUT(54)-G.112.OR.INPUT(55).G *440. 4 EXECUTE ERROR. FUNCTION RETURN ENTRY TO RESTAR. TIMELG(TLX+1)=TIMELG(TLX+1)+TIMELG(TLX+3) EXECUTE MOVE1. 177

TABLE XXVI (Concluded) 11-13-61 3 VECTOR VALUES INPUT(60)utOlO,1,ltOlt*lOltlfltOtOOO RUNNO a RUNNO +1 PUNCH FORMAT ALLRUNNO THROUGH S104,FOR IN =O01,IN*E.15 WHENEVER INPUT(IN+60)~NE~1*TRANSFER TO S104 S9 CARDNO=O DARtINPUT( IN+30) AREND= INPUT( IN+45) WORDNO =0 PUNCH FORMAT ALLRUNNOINPUT(IN) CARDNODAR AREND 5100 WHENEVER WORDNO *GEtAREND,TRANSFER TO S104 CARDCT a WORDNO WORDNO * WORDNO + DAR S101 WHENEVER CARDCT+3eGEe WORDNO END=WORDNO-1 OTHERWISE END=CARDCT+3 END OF CONDITIONAL CARDNO = CARDNO+1 TRANSFER TO PUT(IN) PUT 0) PUNCH FORMAT ALL RUNNO INPUT( IN),CARDNO I GPLOG(CARDCT).. 1 IGPLOG (END) TRANSFER TO S102 PUT(1) PUNCH FORMAT ALL RUNNOtINPUT(IN)tCARDNO.IMPLOG(CARDCT)^o. 1 IMPLOG(END) TRANSFER TO S102 PUT(2) PUNCH FORMAT ALLtRUNNOINPUT(IN),CARDNOJCR (CARDCT)*** 1 JCR (END) TRANSFER TO S102 PUT(3) PUNCH FORMAT ALLRUNNO.INPUT(IN),CARDNOMAT (CARDCTN)A 1 MAT (END) TRANSFER TO S102 PUT(4) PUNCH FORMAT ALLRUNNOINU(IPUTINCARDNOMCT (CARDCT)~.* 1 MCT (END) TRANSFER TO S102 PUT(5) PUNCH FORMAT ALLRUNNOINPUT(IN) CARDNOMISC (CARDCTf).o 1 MISC (END) TRANSFER TO S102 PUT(6) PUNCH FORMAT ALL*RUNNOINPUT(IN) CARDNOPERBUF(CARDCT)..* 1 PERBUF(END) TRANSFER TO S102 PUT(7) PUNCH FORMAT ALLRUNNOINPUINPUT(IN) CARDNOPURVuE(CARDCT) 1 PURVUE(END) TRANSFER TO S102 PUT(8) PUNCH FORMAT ALLRUNNO*INPUT(IN),CARDNO.QUEUE (CARDCT).~^ 1 QUEUE (END) TRANSFER TO S102 PUT(9) PUNCH FORMAT ALLRUNNOINPUT(IN)#CARDNOtSEQQ (CARDCT)e** 1 SEQQ (END) TRANSFER TO S102 PUT(10) PUNCH FORMAT ALLRUNNOINPUT(IN),CARDNOTIMELG(CARDCT)... 1 TIMELG(END) TRANSFER TO S102 S102 CARDCT=CARDCT+4 WHENEVER CARDCT&GE*WORDNOPTRANSFER TO S100 TRANSFER TO S101 Sl04 CONTINUE FUNCTION RETURN END OF FUNCTION 178

Enter Read in the run number card. S58 I Read in the first card of an array. S59 b63 Are the array name and run number correct Suspend operation of the and is the card number zero? simulation program and tiea\nd__ real time._^ ~. return control to the YES system. Set the word counter equal to zero. Set the card counter equal to zero. NO s64 NO s6o $~ ave all the ' I this the end of the arrays been YES \ array? \ entered? NO YES S61 l Read in and store either 4 words Print the run number, the or the rest of the words in initial time-log entries, this row of the array, whichbeginning simulation ever is the lesser. time, and real time. 1 _____S62 1 _eNO YE Are any of thehe run number, array nmme, YES jIs this the end rays too large for and card number correct? ) of the row? the allotted stor- YES t? NO NO Suspend operation of the simulation program and return conlci It trol to the system. Figure 63. START subroutine-entry to START. 179

Enter Move the time-log entry. Increase the run number by one and punch the run number card. S99 _ Set the card counter equal to zero. Set the word counter equal to zero. Punch the first card of the array Slo4 NO SO100 YES Is this the end of the array? NO [YES Sl1 NO YES Exit s this the e 0 Punch either 4 words or the rest of the Is this the end of words in this row of the array, ~ ^ the row? whichever is the lesser. Figure 64. START subroutine —entry to RESTAR. 180

TABLE XXVII TIMELG SUBROUTINE *COMPILE MADPUNCH OBJECT TIMLGOO0 EXTERNAL FUNCTION 537 ENTRY TO FINDJC. 538 NORMAL MODE IS INTEGER EQUIVALENCE(INPUT(30)*DIG) (INPUT(31) DMP) (INPUT(32) I,DJC),(INPUT(33),DMA),(INPUT(34),DMC)h(INPUT(36),DPBQ) 2.(INMPUT(37)NPT(37)DPUR) NPUT(38DQ)(INPUT(48)MAEND)(IN 3 PUT(51),PBQEND),(INPUT(53),QEND),(INPUT(54),CQEND),( 4 MISC(O),LASTL),(MISC(1).LASTK),(MISC(2),COMPLT),(MISC 5 (3).CXTIME),(MISC(4),ALPHAII)(MISC(5),TLX),(MISC(6),NEWP)t( 6 MISC(7),NEWL),(MISC(8),NEWR),(MISC(9),NEWJ),(MISC(10),NEWPR 7 ),(MISC(11).Q),(MISC(12)JC)~(MISC(13).QBUMP),(MISC(14), 8 GAMMAI),(MISC(15) PHII),(MISC(16) PII),(MISC(17) K), 9 (MISC(18),PUR1),(INPUT(47),JCEND) EQUIVALENCE (MISC(19),PBQU),(MISC(20),BACKLG),(MISC(21),STA 1 NBY)t(MISC(22),INPROG),(MISC(23)eCOMP),(MISC(24),ASTRSK) PROGRAM COMMON IGPLOG,IMPLOGJCRMATMCTMISCPERBUFPURVUE 1,QUEUESEQQTIMELG.INPUT, INFIN TLJL* RCQMAXPBQMAX.QMAX T 2 IME PUR OLDTL OLDTLX JXMP TIME4 RUNNO, RUNNUM DIMENSION IGOG95IMPLO9IMPLOG(144 )JCR(34 )MAT(324) 1 MCT(119)TINPUT(74),PERBUF(159),PURVUE(367),QUEUE(249)t 2 SEQQ(111).TIMELG(439) MISC(74),TIME3(9) JCNUM = JC SO TL=TLX S1 WHENEVER TIMELG(TL+2)*GE.2eOR*TIMELG(TL+8)*NE.JCNUM OLDTL=TL 541 TL=TIMELG(TL) 542 TRANSFER TO S1 543 END OF CONDITIONAL 544 FUNCTION RETURN 545 ENTRY TO FINDMC. JCNUM = -1 TRANSFER TO SO ENTRY TO MOVE1. 546 S4 TL=TIMELG(TLX) 547 WHENEVER TIMELG(TL+1) GETIMELG(TLX+1) PRINT FORMAT TIME3~TIMELG(TLX). ETIMELG(TLX+1O) RUNNO TRANSFER TO S3 END OF CONDITIONAL OLDTLX=TLX 549 TLXtTL 550 S2 OLDTL=TL 551 TL=TIMELG(TL) 552 WHENEVER TLENE.-1*AND*TIMELG(TL+1) LE~TIMELG(OLDTLX+1), 1 TRANSFER TO S 2 TIMELG (OLDTLX)TL 554 PRINT FORMAT TIME3~TIMELG(OLDTLX)ee TIMELG(OLDTLX+10) RUNNO TIMELG(OLDTL )OLDTLX 555 S3 FUNCTION RETURN ENTRY TO MOVET. 557 TIMELG(OLDTL)=TIMELG(TL) 558 ENTRY TO PUTT. 562 S5 TIMELG(TL)=TLX 559 TLX=TL 560 TRANSFER TO S4 561 ENTRY TO FINDAV. 564 TL=TIMELG(0) 565 WHENEVER TL.NE.-1, TRANSFER TO S051 566 EXECUTE ERROR* 567 181

TABLE XXVII (Concluded) S051 TIMELG(O)=TIMELG(TL) 568 FUNCTION RETURN 569 ENTRY TO ELIM1. 570 NEWTLX=TIMELG(TLX) 571 TIMELG(TLX) TIMELG(O) 572 TIMELG(O) TLX 573 TLX=NEWTLX 574 FUNCTION RETURN 575 END OF FUNCTION 576 182

(f) FINDAV - An available space, to be used by the IGP subroutime, is found in the log. If there is no such space, the operation of the simulation program is suspended and control is returned to the sytem. (g) ELIM1 - The first item in the log is returned to the available list. A.2.4. THE MAIN2 ROUTINE The MAIN2 routine (Table XXVIII) is the main program for the second core load. This routine prints simulation time and real time, examines the first entry in the time log, and then performs one of the following actions (Figure 10): (a) enters the JPMAJ subroutine (b) enters the MPMIN subroutine (c) enters the IGP routine (d) prints simulation time and real time and returns control to the first core load (to MAIN1). A. 2.5. THE ALERT SUBROUTINE This code (Table XXIX) has three entries. ALERTJ (Figure 65) is entered to alert a job computer. ALERTM (Figure 66) is entered to alert the master computer. ALERTF executes a pseudo alert to the master computer. When the simulation user has taken the option of eliminating the repetition of the joint 1-joint 4 loop by the master computer (Section A.i.1), the MC is notified of the need to re-enter the loop by the use of the ALERTF code. A. 2.6. THE DIST SUBROUTINE The DIST subroutine (Figure 67, Table XXX) performs the functions described in Section A. 1.2 and consists of five main sections and two subroutines. The main sections of the DIST subroutine consist of a switch section (SWITCH) and a section for each of the four distributions (CODE O,...,CODE 3). The SWITCH section determines from the code digit, F, which of the CODE sections is being called upon to supply a stochastic value, and transfers control to the appropriate CODE section. Sections CODE 0 and CODE 1 simply perform the functions indicated in Table XXI. 183

TABLE XXVIII MAIN2 ROUTINE *COMPILE MADPUNCH OBJECT MAIN2000 NORMAL MODE IS INTEGER EQUIVALENCE(INPUT(30) DIG) (INPUT( 31) DMP) )(INPUT(32) 1,DJC) (INPUT(33) DMA),(INPUT(34) DMC) (INPUT(36) DPBQ) 2,(INPUT(37),DPUR),(INPUT(38),DQ),(INPUT(48),MAEND),(IN 3 PUT(51)tPBQEND),(INPUT(53),QEND),(INPUT(54),CQEND),( 4 MISC(O),LASTL),(MISC(1),LASTK),(MISC(2)tCOMPLT),(MISC 5 (3),CXTIME),(MISC(4),ALPHAI),(MISC(5),TLX),(MISC(6) NEWP),( 6 MISC(7),NEWL),(MISC(8),NEWR),(MISC(9),NEWJ),(MISC(10),NEWPR 7 ),(MISC(11)Q),(MISC(12),JC).(MISC(13),QBUMP),(MISC(14)t 8 GAMMAI),(MISC(15),PHII),(MISC(16) PII),(MISC(17) K), 9 (MISC(18),PUR1),(INPUT(47) JCEND) EQUIVALENCE (MISC(19),PBQU).(MISC(20).BACKLG)I(MISC(21)oSTA 1 NBY),(MISC(22),INPROG),(MISC(23),COMP),(MISC(24),ASTRSK) PROGRAM COMMON IGPLOG,IMPLOGJCRMATMCTMISCPERBUF.PURVUE 1,QUEUESEQQETIMELG, I IPUTINFINTLJLRCQMAXPBQMAXQMAXSP 2 AREPUROLDTL,OLDTLXJXMPTIME3,RUNNORUNNUM DIMENSION IGPLOG(195),IMPLOG(144),JCR(34),MAT(324), 1 MCT(119),INPUT(74) PERBUF(159),PURVUE(367),QUEUE(249), 2 SEQQ(111),TIMELG(439),MISC(74),TIME3(9) VECTOR VALUES P1 = $S10,12HBEGIN TIME =1I6,I12,I40*$ VECTOR VALUES P2 = $S3,19HINTERMEDIATE TIME =1I6,112,I40*$ PRINT FORMAT TIME3 PRINT FORMAT P1,TIME.(O),TIMELG(TLX+1) PUNCH FORMAT PlTIMEi(O),TIMELG(TLX+1),2 REWIND TAPE 2 BEGIN TRANSFER TO DO(TIMELG (TLX+2)) DO(O) EXECUTE JPMAJ. TRANSFER TO BEGIN DO(1) EXECUTE MPMIN* TRANSFER TO BEGIN DO(2) EXECUTE IGPs TRANSFER TO BEGIN DO(4) PRINT FORMAT P2,TIME.(O)tTIMELG(TLX+1) PUNCH FORMAT P2,TIMEe(O)*TIMELG(TLX+1),2 EXECUTE SEQPGMe D0(5) TRANSFER TO DO(4) END OF PROGRAM 184

TABLE XXIX ALERT SUBROUTINE *COMPILE MADPUNCH OBJECT ALERTOOO EXTERNAL FUNCTION 505 ENTRY TO ALERTJ. 506 NORMAL MODE IS INTEGER EQUIVALENCE( INPUT ( 30) DI G),( INPUT 31 ) DMP) ) ( INPUT ( 32 ) 1,DJC),(INPUTf33 )DMA) (INPUT(34),DMC),(INPUT(36) DPBQ) 2,(INPUT(37),DPUR),(INPUT(38)tDQ),(INPUT(48) MAEND)O(IN 3 PUT(51),PBQEND),(INPUT(53),QEND),(INPUT(54)*CQEND)*( 4 MISC(0),LASTL),(SC1LASTK MISC(2(1)LASTK)T(MISC2)C(MISC 5 (3),CXTIME),(MISC(4),ALPHAI)h(MISC(5),TLX)*(MISC(6),NEWP)t( 6 MISC(7),NEWL),(MISC(8),NEWR),(MISC(9),NEWJ),(MISC(10O)NEWPR 7 ),(MISC(11),Q),(MISC(12) JC) (MISC(13) QBUMP),(MISC(14) 8 GAMMAI),(MISC(15),PHII),(MISC(16) tPII),(MISC(17))K), 9 (MISC(18),PUR1),(INPUT(47)#JCEND) EQUIVALENCE (MISC(19),PBQU),(MISC(20),BACKLG),(MISC(21),STA 1 NBY),(MISC(22),INPROG) (MISC(23),COMP),(MISC(24) ASTRSK) PROGRAM COMMON IGPLOG,IMPLOG,JCR,MATMCTMISC PERBUFsPURVUE 1,QUEUESEQQTIMELG. I IPUT INFIN TL,JLRCQMAXPBQMAXQMAXT 2 IMEPUROLDTLOLDTLXJXMP TIME3,RUNNORUNNUM DIMENSION IGPLOG(195),IMPLOG(144),JCR(34).MAT(324), 1 MCT(119),INPUT(74) PERBUF(159) PURVUE(367) QUEUE(249), 2 SEQQ(111),TIMELG(439),MISC(74),TIME3(9) EXECUTE FINDJC. 507 TALERT=TIMELG(TLX+1) 508 WHENEVER TIMELG(TL+71)E*23 TIMELG(TL+1)"TALERT OR WHENEVER TIMELG(TL+9)*GE#0 TRANSFER TO S50 OTHERWISE 512 TINT=TALERT-INFIN+DI ST (PURVUE( TIMELG(TL+5)-l)*DPUR+1)) WHENEVER TINT *G.0 TINT=INFIN OTHERWISE TINT = TINT + INFIN END OF CONDITIONAL WHENEVER TINTeG *TIMELG(TL+1), TRANSFER TO S50 514 JCR (JCDJC+2 )TIMELG( TL+6 )JCR(JC*DJC+3)=TIMELG(TL+1)-TINT 516 TIMELG(TL+1)=TINT 517 END OF CONDITIONAL 518 TIMELG(TL+7)=24 519 EXECUTE MOVET. 520 FUNCTION RETURN 521 ENTRY TO ALERTM. 522 EXECUTE FINDMC. WHENEVER TIMELG(TL+3)ENE.O0 FUNCTION RETURN 525 TALERT=TIMELG(TLX+1) 527 WHENEVER TIMELG(TL+6).E.8 TIMELG(TL+7) 11 530 TIMELG(TL+1)=TALERT 529 EXECUTE MOVET. 531 OTHERWISE S50 TIMELG(TL+3)=TALERT 534 END OF CONDITIONAL 533 FUNCTION RETURN 535 ENTRY TO ALERTF, EXECUTE FINDMC. WHENEVER TIMELG(TL+6)^EolAND.TIMELG(TL+1).E.INFIN EXECUTE NOTE*(6,07#0#0) 185

11-13-61 2 TABLE XXIX (Concluded) TIMELG(TL+1)=TIMELG(TLX+1) EXECUTE MOVET* END OF CONDITIONAL FUNCTION RETURN END OF FUNCTION 536 C.C. 0064 186

Enter Find the Job computer entry S in the time log. Set a equal to the time of the alert. Exit Is the Job computer waiting t e b t NO for an alert? Is the Job computer in a major Joint? YES YES Compute ti, the time of possible interrupt. Change the time in the time log entry to the time of the alert. Does ti come before the end of this (major) Joint? YES Save the restart information., ~*""" ~ '~~~~-~" - Change the time in the time log { entry to ti. Set J' equaltto 24. Move the time log entry to its new position. Exit Figure 65. ALERT subroutine-entry to ALERTJ. 187

Enter Find the master computer entry in the time log. Has the MC Hbeen alerted by an- _it other job computer? YES NO / ~ ~^~ \ ^ Set a equal to the Is the MC waiting for an NO Set a equal to the alert? YES. Set J' equal to 11. Change the time in the time-log entry to the time of the alert. Move the time-log entry to its new position. i Exit Figure 66. ALERT subroutine-entry to ALERTM. 188

TABLE XXX DIST SUBROUTINE * ASSEMBLE.PUNCH OBJECT DIST 000 ORG 0 PGM PZE LAST 1 PZE XXX-3 BCD IDIST PZE SWITCH ORG 0 REL ERROR BCD 1ERROR SWITCH CLA Cl SUB 1,4 PAX 0.2 CLA 0.2 TNZ *+3 CODEO CLA -1,2 TRA 2,4 TMI ERROR 1 PAX 0,1 TXL CODE1,1,1 TXL CODE2t1,2 TXL CODE3,1.3 ERROR1 TSX ERROR 4 Ct OCT 300000100000 CODE1 TSX RANGEN 1 LDQ UNIRAN MPY MLLION SUB -1.2 TMI BRANCH LDO UNIRAN MPY -16.2 ADD -17 2 TRA 2 4 BRANCH LDQ UNIRAN MPY -2 2 ADD -15.2 TRA 2 4 MLLION DEC 1000000B35 CODE2 TSX RANGEN 1 ARS 3 LXA NORMt1 CAS CUTOFF TRA *+3 TRA CHOP TRA CHOP CAS NORM TRA *+4 TRA *+3 ALS 1 TXI *-4,1,512 SXD SPARE91 TSX FXPTLG,1 ARS 6 SUB SPARE DVH INVLN2 MPY -2 2 LLS 7 CAS -12 CHOP CLA -1 2 189

TABLE XXX (Continued) 11-13-61 2 TRA 2.4 TRA 2 4 CUTOFF OCT 1000000 NORM OCT 100000000000 INVLN2 DEC -1.442695041B1 SPARE PZE 0 CODE3 SXD XXX-1,4 LXA COUNTS4 CLS MEAN STO XXX-2 TSX RANGENt1 ARS 6 ADD XXX-2 TIX *-4D4,1 DVH SQRT2 TQP POSMQ CLS LIMIT TLQ OUTRNG INRNG MPY -12 LLS 4 SHIFT ADD -2.2 TPL *+2 COUNT PXD 6,0 LXD XXX-194 TRA 2.4 LIMIT OCT 100000000000 MEAN OCT 060000000000 POSMQ CLA LIMIT TLQ INRNG OUTRNG CLM XXX-2 ORA -1t2 ALS 2 TRA SHIFT RANGEN CLA UNIRAN ALS 9 ADD UNIRAN ADD ONE STO UNIRAN TRA 11 ONE OCT 1 UNIRAN EQU81576 FXPTLG ADD HLFSQ2 STO XXX-1 SUB SQRT2 DVH XXX-1 STQ XXX-1 MPR XXX-1 STO XXX-2 ARS 2 STO XXX-3 ARS 3 SUB XXX-3 ADD XXX-2 ARS 4 SUB A STO XXX-2 CLS B DVH XXX-2 190

TABLE XXX (Concluded) STQ XXX-3 11-13-61 3 CLA C ADO XXX-2 ADD XXX-3 STO XXX-2 LDQ XXX-1 MR XXX-2 SUB HALF TRA 1 1 HLFSQ2 DEC 107106781187B1 SQRT2 DEC l1414213562374B1 A DEC 25963855429B2 B DEC.26455155161B4 C DEC 2.12610617798B2 HALF OCT 40000000000 XXX SYN 0 LAST SYN * CC.C 0134 191

CODE 2 a2 SWITCH & CODE 0 ~ENTER ( (UN IRAN )-ACC> F — a, ACC RACC:O ERROR RETURN, CODEO > 1 _RESULT NACC. IS P E X _____/I Tr^ACC:I12 )(Icg(ACCI-i) —ACC. P-ACC. 1P20 I9 e ( UNIRAN) I (ACC. 2) ACC I - EXIT (ACC,:4 0, ERROR RETURN - CODE 3 EXIT CODE 1 (13 ~ 1"6 — i - 3 - 3 S r PRESCALE S UNIRAN-r I TO ZERO MEAN r 10r IO_-ACC UNIRAN -ACC (ACC): P1 (r. P2 +P3)) —ACC )P1-"EXITCCS) EXrI~FI 6 — s SCALETO ( ~ 4 ~>, TT- ' IUNIT VARIANCE l(r- P4 + P5) -ACCl ( IMQI Pi4 3 i 4 _ACCl EXvIT I(ACC* P 1)-ACC IACC + P 2)-ACCl ( ACC: 0 ) — -— AC I EXIT EXIT Figure 67. DIST subroutine.

CODE 2 uses the direct method of generation (Ref. 8) to obtain a value of a random variable, ti, having an exponential density distribution, p(t) = l/P2e-t/P2. Namely, the computation ti = -P2 logerj is performed, where 1/P2 is the mean value of the random variable t per unit time and rj is a value of a random variable, r, uniformly distributed on the unit interval. The parameter Pi provides a truncation to the exponential distribution. However, the limitations of the program impose a truncation20 at 11. P2, which therefore takes priority over P1. When either truncation occurs, the accumulator contains P1 upon leaving DIST. The CODE 3 section makes use of the central limit theorem to generate a value of a random variable, ti, having a normal density distribution, p(t1 e- (Pl.t-P2) 2/2(P1)2 N2fP1 where Pi is the standard deviation of t and P2 is the mean of t. Six values of a random variable, uniformly distributed on the unit interval, are summed, shifted, and scaled to represent the value of the normal deviate, ti, in the range ~4P1+P2. In case ti falls outside this range, the value of ti is taken to the nearest truncation point (either ti = P2+4P1 or ti = P2 -4P1). Another truncation is imposed so that negative values of ti will not occur. For a negative deviate the value of ti is set to zero. 20This truncation would occur only.0015- of the time. 193

The choice of surrming six values of a uniform random variable was felt, to achieve a suitable balance between the required computing speed and accuracy of generation in these experiments. A chi-squared goodness-of-fit test of the distribution of more than 3000 variates generated in. this way showed no statistically significant deviation from the normal distributiono Two subroutines, RANGEN and FXPTLG, were coded for use by the DISTD subroutine. Subroutine RANGEN uses the technique described in Refo 9 to generate pseudo-random numbers. Successive entries to this subroutine produce successive values in the accumulator and in. location UTJNIRAN according to the formula xi+ = [(29+1)xi + 1] (mod 235) Results of the tests for the randomness of this generator are described in Refs, 9 and 10. Subroutine FXPTLG uses a rational approximation,21 namely, log2X Z + (DZ2-A) - D - 1/2 where 2X - V2 2X +N12 and A = 0025963855429 B = 0.26455155161 C = 2.12610617798 D = 0.1953125 to compute the logarithm to the base 2 of a normalized (1/2 ( x < 1) prescaled number. The absolute error in this approximation is less than ~ 3 x 10-8. The value of the computed logarithm is in the accumulator when it leaves this subroutine, 21Adapted from the SHARE No. 665 write-up of the IBLOG 3 subroutine for the 709. 194

A. 2.7o THE IGP SUBROUTINE This routine has two entries (Figure 68, Table XXXI). The IGP entry is used whenever an IGP item appears in the time log, signaling a request for a job or a sequence of jobs. The SETIGP entry is used whenever a job is completed. This section of the code checks to see if the completed job was a part of a sequence and, if so, if another event in the sequence can now be started. A. 2.8. THE JPMAJ SUBROUTINE This subroutine (Figure 69, Table XXXII), starts the next major joint of a job program. The entry JPMAJ is entered from the MAIN2 routine when a time-log entry with s = 2 occurs at the top of the time log. The entry BEGJOB is used by the MPMIN subroutine, joint 19, when starting a new job program. A. 2.9. THE MPMIN SUBROUTINE This routine (Table XXXIII) is entered by the MAIN2 program whenever there is a time-log entry calling for the performance of a master program joint. One section of the code (Figure 70) is common to all joints (Figure 71-89). It should be noted that a flow chart ending in "return" means a return to the common section of code, whereas "exit" means that control is transferred back to MAIN2. The following joints are too short to warrant a flow chart: Joint Number Next Joint 8 8 16 23 17 18 18 19 23 23 27 16 28 (next major joint of the job program) A. 2.10. THE NOTE SUBROUTINE The function of this routine (Table XXXIV) is to punch the program progress cards and to keep track of the total number of jobs in each stage of processing (Section A.1.4). The three-digit code configurations listed in Table XXIII are input to this routine and indicate which job totals are to be updated. If the job type is given as zero, then these totals are not changed, as this is the situation in which the master program is, so to speak, entering or leaving the system. 195

TABLE XXXI IGP SUBROTTTINE $COMPILE MAD, PUNCH OBJECT. PRINT OBJECT IGP 000 EXTERNAL FUNCTION 398 ENTRY TO IGP. 399 NORMAL MODE IS INTEGER EQUIVALENCE ( INPUT( 30 ) DIG) ( INPUT (31) DMP) ( INPUT (32) 1,DJC),(INPUT(33) DMA) (INPUT(34) DMC), (INPUT(36),DPBQ) 2,(INPUT(37),DPUR),(INPUT(38),DQ),(INPUT(48)oMAEND),(IN 3 PUT(51) PBQEND),(INPUT(53) QEND),(INPUT(54),CQEND),( 4 MISC(0),LASTL),(MISC(1),LASTK),(MISC(2),COMPLT),(MISC 5 (3) CXTIME) (MISC(4) ALPHAI) (MISC(5)TLX), (MISC(6) NEWP) ( 6 MISC(7),NEWL),(MISC(8),NEWR),(MISC(9),NEWJ) (MISC(1O),NEWPR 7 ),(MISC(11),Q),(MISC(12),JC),(MISC( 13),QBUMP),(MISC(14) 8 GAMMAI),(MISC(15),PHII).(MISC(16) PII),(MISC(17).K), 9 (MISC(18),PUR1),(INPUT(47),JCEND) EQUIVALENCE (MISC(19),PBQU),(MISC(20),BACKLG),1MISC(21),STA 1 NBY),(MISC(22),INPROG),(MISC(23)~COMP)P(MISC(24),ASTRSK) PROGRAM COMMON IGPLOG,IMPLOG,JCRMATMCTMISCPERBUFPURVUE 1,QUEUE,SEQQTIMELG INPUT,INFINTL,J,LRCQMAXPBQMAXQMAXT 2 IME,PUR,OLDTLOLDTLXJXMPTIME3,RUNNORUNNUM DIMENSION IGPLOG(195),IMPLOG(144),JCR(34),MAT(324) 1 MCT(119),INPUT(74),PERBUF(159),PURVUE(367) QUEUE(249) 2 SEQQ(I11),TIMELG(439),MISC(74),TIME3(9) R = TIMELG (TLX + 5) 400 WHENEVER R.LE.19 401 ALPHAI = 0 PUR=(R-1)*DPUR+4 406 PERBUF(PBQEND+1)=0 403 S6 PERBUF(PBQEND)aR 402 EXECUTE NOTE*(0O,1ALASTKPPERBUF(PBQEND)) EXECUTE ALERTF. TIME = TIMELG(TLX+1)-INFIN + DIST.(PURVUE(PUR)) WHENEVER TIME.G6O TIMELG TLX+1) INFIN OTHERWISE TIMELG(TLX+1)=TIME + INFIN END OF CONDITIONAL EXECUTE MOVEl. 408 TRANSFER TO BETA END OF CONDITIONAL ALPHAI = 1 S7 THROUGH S7,FOR IG=ODIGIGPLOG(I,+1).E.R.AND.IGPLOG(IG).E.-1 FIG=IG 412 N = IGPLOG(FIG + 5) TIME=TIMELG(TLX+1) 414 E = TIMELG(TLX+3) WHENEVER E *.E 1 S8 TOME = TIME -INFIN+DIST.(IGPLOG(IG+2)) L=LASTL 419 LASTL=LASTL+1 418 SEQQ(CQEND) = -L CQ = CQEND CQEND = CQEND + 1 FIGEND = FIG + (N+1)*DIG THROUGH S9, FOR IG=FIG+DIG+DIG, DIG, IG.E~FIGEND SEQQ(CQEND)=IGPLOG(IG) 424 S9 CQEND=CQEND+1 425 WHENEVER CQEND *G.CQMAXEXECUTE ERROR. OTHERWISE 427 SlQ l=TTMFI G(TI X+4) 428 196

TABLE XXXI (Continued) EXECUTE ELIM1i 429 11-13-61 2 Sll THROUGH S11,FOR CQ=O01,SEQQ(CQ).Ei-L SEQQ(CQ-1 +E)=SEQQ(CQ-1+E)-1 WHENEVER SEQQ(CQ-1+E)ENE*0 TRANSFER TO ALPHA(ALPHAI) END OF CONDITIONAL CQ1 = CQ S1 CQ1 = CQ1 +1 WHENEVER CQ1.NEECQEND WHENEVER SEQQ(CQ1)*Es0,TRANSFER TO SI WHENEVER SEQQ(CQ1) *GOTRANSFER TO S2 THROUGH HERE# FOR CQ:CQ1.lCQEND *E*CQ+N HERE SEQQ(CQ)=SEQQ(CQ+N) END OF CONDITIONAL 435 CQEND = CQ S2 IG = FIG +1+E*DIG WHENEVER IGPLOG( IG).EO 437 PERBUF(PBQEND)=IGPLOG( IG+1) 438 PERBUF(PBQEND+1)=L 439 PERBUF(PBQEND+2 ) R 440 PERBUF(PBQEND +3)=E EXECUTE NOTE.(Ot0OlLASTKPERBUF(PBQEND)) EXECUTE ALERTF. BETA PERBUF(PBQEND+ )=LASTK LASTK a LASTK+1 PBQEND=PBQEND+DPBQ 442 WHENEVER PBQEND *G.PBQMAXEXECUTE ERROR. OTHERWISE 444 S14 TUME = TIME - INFIN + DIST,(IGPLOG(IG+1)) WHENEVER TUME.G.O TUME = INFIN OTHERWISE TUME - TUME + INFIN END OF CONDITIONAL IG1=IG+DIG-5 S162 WHENEVER IGPLOG(IG+4)*NE.0 S15 EXECUTE FINDAVi 452 TIMELG(TL+1) = TUME TIMELG(TL+2 =2 TIMELG(TL+3)IGPLOG( IG+4) 455 TIMELG(TL+4)=L 456 TIMELG(TL+5)=R 457 EXECUTE PUTT 458 END OF CONDITIONAL 434 IG= IG+1 460 WHENEVER IG*NEoIG1,TRANSFER TO S162 END OF CONDITIONAL 410 TRANSFER TO ALPHA(ALPHAI) ENTRY TO SETIGP. 465 WHENEVER L*EO0,FUNCTION RETURN S16 THROUGH S16,FOR FIG = 0ODIGIGPLOG(FIG+1).E.R.AND.IGPLOG(FIG 1 ).E.-1 TIME = TIMELG(TLX+1) ALPHAI =2 IG2 = J * DIG + FIG + 5 FIGEND = IG2 + DIG - 5 N = IGPLOG(FIG+5) S163 E = IGPLOG(IG2) IG2 = IG2 + 1 197

TABLE XXXI (Concluded) 11-13-61 3 WHENEVER E.*NE*OvTRANSFER TO Sll ALPHA(2) WHENEVER IG2iNE*FIGENDOTRANSFER TO S163 ALPHA(1) WHENEVER E*EE1 WHENEVER TOME G.&O TIMELG(TLX+1 )INFIN OTHERWISE TIMELG(TLX+1) a TOME + INFIN END OF CONDITIONAL EXECUTE MOVEl1 417 END OF CONDITIONAL ALPHA (O) FUNCTION RETURN END OF FUNCTION 474 C.C Q0129

Enter ( IGP) Enter (SETIGP) Set switch a = ao Is this time-log entry related Set switch a = a Wasthis completed ob Enter the job request into to a sequence of jobs? Locate the sequence in the part of a sequence? the peripheral buffer L IGPLOGtable Y queue. YES -____ c - S16 8 _ Move the time-log entry to Set up an entry in the YES Is tnis a request to Locate.the item in the the time of the next SEQQ table. start a sequence? SEQQtable. request for this job. NO Set switch a e a S 163 - I BETAX 1, S 10 Examine one of the lists Assign the job number k. Eliminate the entry of possible events subsequent k=k+1. from the time log. to this completed iob.,/ ~ ~* ~x \ >~ Sl __11 __ YES ( Is there such an event? ) Has the peripheral buffer YES thNOan event C queue been overloaded? NO a YES Can this event be started? NO V queue been overloaqdedq? y ~ (Have all the precedent events YES 1 S 1 been completed?) Suspend operation of the If this is the last event NO o0 simulation program and in the sequence, eliminate Arethereanymorepossible \o l |return control to the system. the entry in the SEQQ table events? | 0 NO YES S2 Enter the job request into YES Is this next event a job the peripheral buffer queue. ~ request (as opposed to a time interval,)? MJe th t o ey YE wasMove the time-log entryt of a new S 14 1 NO to the time of the next sequence? Find the events consequent to request for this sequence. N the event under consideration and insert entries into the time log, as specified by the time interval, for the start of such events. Figure 68. GP subroutine.X Figure 68. IGP subroutine.

TABLE XXXII JPMAJ SUBROUTINE *COMPILE MADPUNCH OBJECT JPMAJOO0 EXTERNAL FUNCTION 475 ENTRY TO JPNAJ. 476 NORMAL MODE IS INTEGER EQUIVALENCE (INPUT(30) )DIG)( INPUT(31) DMP) ( INPUT( 32) 1,DJC),(INPUT(33) DMA) (INPUT(34) DMC) (INPUT(36) DPBQ) 2,(INPUT(37) DPUR) (INPUT(38) DQ), INPUT(48) MAEND) (IN 3 PUT(51),PBQEND),(INPUT(53),QEND),INPUT(54)CQOEND)9( 4 MISC(O),LASTL),(MISC(1),LASTK) (MISC(2) COMPLT) (MISC 5 (3),CXTIME),(MISC(4),ALPHAl),(MISC(5),TLX),(MISC(6),NEWP)( 6 MISC(7),NEWL),(MISC(8),NEWR)t(MISC(9)*NEWJ)t(MISC(10) NEWPR 7 ),(MISC(11),Q),(MISC(12),JC),MISC(13),QBUMP),(MISC(14), 8 GAMMAI),(MISC(15)tPHII)t(MISC(16)oPIl),(MISC(17),K). 9 (MISC(18),PUR1),(INPUT(47)EJCEND) EQUIVALENCE (MISC(19),PBQU),(MISC(20),BACKLG),4MISC(21)STA 1 NBY),(MISC(22),INPROG) (MISC(23),COMP) ('MISC(24) ASTRSK) PROGRAM COMMON IGPLOGIMPLOGJCRMATMCTMISCPERBUF.PURYUE 1,QUEUESEQQTIMELG INPUTINFIN.TLJLRCQMAXPBQMAXQMAX*T 2 IME,PUROLDTL OLDTLXJX.MP TIME3 RUNNORUNNUM DIMENSION IGPLOG(195)IMPLOG(144),JCR(34),MAT(324), 1 MCT(119),INPUT(74),PERBUF(159),PURVUE(367),QUEUE(249), 2 SEQQ(111),TIMELG(439),MISC(74).TIME3(9) DISCON YzTIMELG(TLX+9) 623 WHENEVER YeLEeOEOR^YTER30.TRANSFER TO S25 524 THROUGH S24. FOR MA~O0DMAMAT(MA+1)E1loiAND*MA(MT(MA+3)E*OAN 625 1 DHMAT(MA)*E.Y MAT(MA+1 )0 S25 TIMELG(TLX+9)~0 522 TIME=TIMELG(TLX+1) 478 PUR (TIMELG(TLX+5)-1)*DPUR+1 479 TOME = TIME - INFIN + DIST.(PURVUE(PUR+6)) WHENEVER TOME.6.0 TIMELG(TLX+1)nINFIN OTHERWISE TIMELG(TLX+1)TOME + INFIN END OF CONDITIONAL 5181 WHENEVER TIMELG(TLX+6).E*TIMELG(TLX+10) 498 TIMELG(TLX+7)~20 OTHERWISE 500 TIMELG(TLX+7)"28 END OF CONDITIONAL 502 ENTRY TO BEGJOB 481 WHENEVER TIMELG(TLX+3)^E*O TRANSFER TO S21 481 WHENEVER TIMELG(TLX+3)eGeTIME S19 TINT a TIMELG(TLX+3)-INFIN+DISTe(PURVUE(PUR)) OTHERWISE TINT"TIME-INFIN+DIST (PURVUE(PUR)) END OF CONDITIONAL WHENEVER TINT.G.O TINTWINFIN OTHERWISE TINT a TINT + INFIN END OF CONDITIONAL WHENEVER TINT.G.TIMELG(TLX+I), TRANSFER TO S21 463 S20 JCJ a TIMELG(TLX+8) TIMELG(TLX+7)s24 485 JCR (JCJDJC+2) TIMELG ( TLX+6) JCR(JCJ*DJC+3)- TIMELG(TLX+1)- TINT TIMELG(TLX+1)~TINT 488 200

TABLE XXXII (Concluded) S21 TIMELG(TLX+2)=1 489 11-13-61 2 TIMELG(TLX+9)=-1 490 TIMELG(TLX+6)TIMELG( TLX+6)+1 491 EXECUTE MOVE1~ 492 FUNCTION RETURN END OF FUNCTION 492 CeC. 0065 ro 0 i..a ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Q~

Enter (JPMAJ) DISCON Disconnect the Job computer from its subordinate module. S22 Compute the length of the next major Joint. S181 Willt this be the last i __ t maJor Joint? IB YES the time-log entry to ts FIgu 6 Pnew position. Compute ti, the time of possible interrupt. ~1~.-~~~~~~~ F~ ~E x i t Is ti later than the end of this next major Joint? _ 20 Set J 'a 24. Store the restart ionormation. ~ Chang the time in the time-log entry to ti. Figure 69. JPMAJ subroutine. 202

TABLE XXXIII MPMIN SUBROUTINE *COMPILE MADPUNCH OBJECT MPMINOO0 EXTERNAL FUNCTION 125 ENTRY TO MPMIN. 126 NORMAL MODE IS INTEGER EQUIVALENCE(INPUT(30),DIG),(INPUT(31),DMP),(INPUT(32) I,DJC),(INPUT(33),DMA),(INPUT(34)gDMC),(INPUT(36),DPBQ) 2,(INPUT(37),DPUR),(INPUT(38),DQ),(INPUT(48),MAEND)9(IN 3 PUT(51),PBQEND),(INPUT(53),QEND),(INPUT(54)tCQEND),( 4 MISC(O),LASTL)(MISC( LASTK)(MISC(2)COMPLT)(MISC 5 (3),CXTIME),(MISC(4),ALPHAI )(MISC(5),TLX) (MISC(6),NEWP),( 6 MISC(7),NEWL)I(MISC(8),NEWR),(MISC(9),NEWJ)~(MISC(10),NEWPR 7 ),(MISC(11),Q),(MISC(12),JC),(MISC(13),QBUMP),(MISC(14), 8 GAMMAI),(MISC(15),PHII),(MISC(16),PII),(MISC(17),K), 9 (MISC(18),PUR1),(INPUT(47),JCEND) EQUIVALENCE (MISC(19),PBQU) (MISC(20),BACKLG),(MISC(21),STA 1 NBY),(MISC(22),INPROG),(MISC(23),COMP),(MISC(24),ASTRSK) PROGRAM COMMON IGPLOG,IMPLOGJCR,MATMCTMISCPERBUFPURVUE 1,QUEUESEQQTIMELG,INPUINPUTINFINTLJL,R,CQMAXPBQMAXQMAXT 2 IMEPUROLDTLOLDTLX,JXMPTIME3,RUNNORUNNUM DIMENSION IGPLOG(195),IMPLOG(144),JCR(34),MAT(324), 1 MCT(119),INPUT(74),PERBUF(159),PURVUE(367)tQUEUE(249), 2 SEQQ(111)tTIMELG(439),MISC(74)TTIME3(9) DIMENSION QTEMP(9) WHENEVER TIMELG(TLX+7)*.E. 127 JX=O 128 J=TIMELG(TLX+6) 129 OTHERWISE 130 JX=1 131 J=TIMELG(TLX+7) 132 END OF CONDITIONAL 133 WHENEVER TIMELG(TLX+3).LE.TIMELG(TLX+1).AND*IMPLOG((J-1) 1 *DMP+1).NE.O.AND.TIMELG(TLX+3).NE*O JX=1 J=11 138 END OF CONDITIONAL 142 DISCON Y=TIMELG(TLX+9) WHENEVER Y.LE.O.ORY.ER30.TRANSFER TO S25 S24 THROUGH 524, FOR MA=ODMAMAT(MA+1).E.1AND.MAT(MA+3).E.O.AN 625 1 DoMAT(MA),E.Y 625 MAT(MA+1)=0 626 S25 TIMELG(TLX+9)=0 TIME = TIMELG(TLX+1)-INFIN+CXTIME WHENEVER TIME.G.O TIMELG(TLX+1)=INFIN OTHERWISE TIMELG(TLX+1)=TIME + INFIN END OF CONDITIONAL S26 MP=(J-1)*DMP 146 Y=IMPLOG(MP) 147 WHENEVER Y~E*0.OR.Y.E.30,TRANSFER TO 527 MA=O 151 S281 WHENEVER MAT(MA+l)eNE.OeOReMAT(MA+3).NE.O.OR.MAT(MA).NE.Y 152 MA=MA+DMA 153 WHENEVER MA.NE.MAEND, TRANSFER TO S281 154 S29 TL=TIMELG(TLX) 5291 WHENEVER TIMELG(TL+9).NE.Y TL=TIMELG(TL) 157 TRANSFER TO S291 158 END OF CONDITIONAL 159 203

TABLE XXXIII (Continued) TIMELG(TLX+1)=TIMELG(TL+l) 160 11-13-61 2 EXECUTE MOVElI 161 FUNCTION RETURN 162 END OF CONDITIONAL 163 S292 MAT(MA+1) 1 164 S30 THROUGH S30, FOR MCCODMCMCT(MC)*E*Y 165 TIME = TIMELG(TLX+1)-INFIN + DIST*(MCT(MC+1)) WHENEVER TIME G, 0 TIMELG(TLX+1)=INFIN OTHERWISE TIMELG(TLX+1)=TIME + INFIN END OF CONDITIONAL S27 TIMELG TLX+9)=Y TRANSFER TO JOINT(J) 169 SETJ(0) TIMELG (TLX+6 NEXTJ 170 TRANSFER TO NEXT 171 SETJ(1) TIMELG(TLX+7)=NEXTJ 172 TRANSFER TO NEXT 173 RESETJ TIMELG(TLX+7)"0 174 TRANSFER TO SETJO) 175 REUSEJ TIMELG(TLX+7)=0 176 NEXT TIME = TIMELG(TLX+1)-INFIN + DIST.(IMPLOG(MP+2)) WHENEVER TIME *GaO TIMELGCTLX+l )INFIN OTHERWISE TIMELG(TLX+1)-TIME + INFIN END OF CONDITIONAL EXECUTE MOVEl 178 S221 FUNCTION RETURN 179 JOINT(1) WHENEVER PBQEND.NE*0 180 ALPHAI 1 181 NEWP=PERBUF () 182 NEWL=PERBUF( ) 183 NEWR=PERBUF(2) 184 NEWJ=PERBUF(3) 185 K = PERBUF(4) EXECUTE NOTE.(1.0#29K#NEWP) PBQEND=PBQEND-DPBQ 186 THROUGH S31. FOR PBQOO,1,PBQOE.PBQEND 187 S31 PERBUF (PBQ)PERBUF(PBQ+DPBQ) 188 NEXTJ=2 189 OTHERWISE 190 NEXTJ=4 191 END OF CONDITIONAL 192 TRANSFER TO SETJ(JX) 193 JOINT(2) NEWPR=PURVUE((NEWP-1)*DPUR) 194 NEXTJ=3 195 TRANSFER TO SETJ(JX) 196 JOINT( 3) QQEND-DQ QEND=QEND+DQ 199 WHENEVER QENDaGOQMAX 200 EXECUTE ERROR. 201 END OF CONDITIONAL 202 S34 WHENEVER Q.L.O0 TRANSFER TO 535 203 S32 WHENEVER QUEUE(Q)QG.NEWPR 204 THROUGH S33 FOR Q=101.Q1*E*EDQ 205 S33 QUEUE (Q+DQ+Q ) QUEUE(0+Q1) 206 Q=Q-DQ 207 204

TABLE XXXIII (Continued) TRANSFE* TO S34 208 11-13-61 3 END OF CONDITIONAL 209 S35 Q=Q+DQ 210 QUEUE (Q) =NEWPR 211 QUEUE(Q+1 )=K QUEUE(Q+2 )NEWP 213 QUEUE(Q+3 )0 214 QUEUE (Q+4)0 215 QUEUE(0+5) NEWL 216 QUEUE( Q+6 ) =NEWR 217 QUEUE (Q+7) 63 218 QUEUE (Q+8 ) NEWJ 219 PUR=(NEWP-1 )*DPUR+10 QUEUE ( Q+9 ) 3D! ST. (PURVUE ( PUR )! 221 EXECUTE NOTE.(2.O 3 KNEWP) NEXTJ 1 TRANSFER TO SETJ(JX) ALPHA(2) NEXTJ = 29 TRANSFER TO SETJ(JX) 223 JOINT(4) WHENEVER COMPLT*E*O, TRANSFER TO ALPHA(ALPHAI) 224 ALPHAI=1 225 Q=7 226 536 WHENEVER QUEUE(Q) NEe1023 227 Q=Q+DQ 228 TRANSFER TO 536 229 END OF CONDITIONAL 230 COMPLTTCOMPLT-1 231 K=QUEUE (Q-6) 232 MA=3 233 S37 WHENEVER MAT(MA)*E.KMAT(MA)=-1 234 MA~MA+OMA 235 WHENEVER MA*L*MAEND# TRANSFER TO S37 236 NEXTJ=5 237 TRANSFER TO SETJ(JX) 238 JOINT(5) L=QUEUE(Q-2) 239 R=QUEUE (Q-1) 240 J=QUEUE( Q+) 241 EXECUTE SETIGP. 242 EXECUTE NOTE*(80O0O0K#QUEUUEQ-5)) NEXTJ=6 243 TRANSFER TO SETJ(JX) 244 JO I NT (6) QENDQEND-DQ 245 THROUGH S38t FOR Q=Q-7#1 Q#EQEND 246 S38 QUEUE (Q) QUEUE(Q+DQ) 247 TRANSFER TO JOINT(4) ALPHA () Q=7 249 ALPHAI=2 250 S40 WHENEVER Q.GeQEND, TRANSFER TO ALPHA(2) 251 WHENEVER QUEUE(Q)*NE,63 252 GAMMA(1) O=Q+DQ 253 TRANSFER TO S40 254 END OF CONDITIONAL 255 EXECUTE ONEMOD(. YES1INOI) 256 YES1 EXECUTE SETONE. 257 EXECUTE NOTE.(330.5.QUEUE(Q-6),QUEUE(Q-5)) JOINT(10) JC=0 S200 WHENEVER JCR(JC)*NE.O CJCJCDJC 205

TABLE XXXIII (Continued) 11-13-61 4 WHENEVER JC.NE.JCEND,TRANSFER TO S200 11-13-61 4 QBUMP=QEND+7 S48 QBUMP=QBUMP-DQ WHENEVER QBUMP.E.*QTRANSFER TO GAMMA(1) WHENEVER QUEUE(QBUMP).GE* 161TRANSFER TO 548 JC=QUEUE ( QBUMP) QUEUE(Q) =JC+16 PII=2 NEXTJ=7 EXECUTE NOTE,(5,1,6,QUEUE(Q-6)*QEUE(Q-5)) OTHERWI SE WHENEVER QUEUE(Q).E.255 EXECUTE NOTE.(506tQUEUE(Q-6)*QUEUE(Q-5)) END OF CONDITIONAL QUEUE ( Q ) =JC/DJC+16 JC=JC+1 GAAMMA I 1 S52 NEXTJ=12 END OF CONDITIONAL TRANSFER TO SETJ(JX) 271 NO1 OUT=O 272 THROUGH N02, FOR QBUMP=QEND-DQ+7#-DQtQBUMP.E.Q 273 JC=QUEUE( QBUMP) 274 WHENEVER JC*Eo2550OR.JC.L~ 16.AND.OUT*E.O EXECUTE TWOMOD.(YES(OUT) N02) 276 YES(O) WHENEVER JC.E*255, TRANSFER TO YES(1) 278 QSAVE=QBUMP 278 OUT=1 279 END OF CONDITIONAL 279 N02 CONTINUE 280 WHENEVER OUT *E.O# TRANSFER TO GAMMA(1) 281 QBUMP=QSAVE 281 JCQUEUE ( QBUMP) S49 Pl=l 282 NEXTJ=7 283 EXECUTE NOTE.(3,1,4,QUEUE(Q-6)tQUEUE(Q-5)) TRANSFER TO SETJ(JX) 284 YES(I) QUEUE(QBUMP)=63 285 EXECUTE NOTE.(5,0,3KQUUEUE(QBUMP-5)) S51 ALPHAI=1 286 EXECUTE UPSET. 287 WHENEVER JC*.E255 EXECUTE NOTE.(31lo59QUEUE(Q-6),QUEUE(Q-5)) OTHERWISE EXECUTE NOTE(4,1]5,QUUEUE(Q-6)tQUEUE(Q-5)) END OF CONDITIONAL TRANSFER TO JOINT(10) JOINT(7) EXECUTE ALERTJ. 289 QCHECK=QBUMP-7 QTEMP (O) =QUEUE (QCHECK)-1 THROUGH S5510,FOR COUNT =l1,1COUNT*Es10 S510 QTEMP(COUNT)=QUEUE(QCHECK+COUNT) S511 QCHECK=QCHECK-DQ WHENEVER QUEUE(QCHECK).L*QTEMP(0)OOR.(QUEUE(QCHECK).E.QTEMP( 1 0).AND.QUEUE(QCHECK+1).LQTEMP(1)) 2 *OR.QCHECK.L.O THROUGH 5512,FOR COUNT=Ot,1COUNT. E10 5512 QUEUE(QCHECK+DQ+COUNT)=QTEMP (COUNT) 206

TABLE XXXIII (Continued) QBUMP=QCHECK+DQ+7 1-13-61 5 WHENEVER QBUMP LE Q QQ+DQ NEXTJ=8 290 TRANSFER TO SETJ(JX) 291 OTHERWISE THROUGH S513#FOR COUNT=Ol.tCOUNT.E*10 S513 QUEUE( QCHECK+DQ+COUNT ) QUEUE( QCHECK+COUNT ) TRANSFER TO S511 END OF CONDITIONAL JOINT(8) NEXTJ=8 292 TRANSFER TO SETJ(JX) 293 JOINT(9) WHENEVER QUEUE(QBUMP) E*1023,TRANSFER TO S51 294 WHENEVER QUEUE(QBUMP *NE*255*TRANSFER TO NO1 TRANSFER TO YES(1) 2)5 JOINT(1 ) PHI I 296 GAMMAI 2 297 GAMMA(2) THROUGH ERASE(O), FOR JC~1DJC9JC*G.JCEND 298 TRANSFER TO ERASE(JCR(JC)) 299 ERASE ) JCR(JC)=0 300 TRANSFER TO S52 301 ERASE(2) PHII=2 302 JCR(JC)=O 303 JCR(JC-1)=0 304 TRANSFER TO GAMMA(2) 305 ERASE(O) CONTINUE 306 NEXTJ=15 307 TRANSFER TO SETJ(JX) 308 JOINT(12) TL=TIMELG(TLX) 309 CXMTIM=TIMELG(TLX+1) 310 553 WHENEVER CXMTIM.G*TIMELGlTL+1) 311 TIMELG(TL+1l)CXMTIM 312 TL=TIMELG(TL) 313 TRANSFER TO S53 314 END OF CONDITIONAL 315 NEXTJ=13 316 TRANSFER TO SETJ(JX) 317 JOINT(13) CJ CJC-1)/DJC 318 EXECUTE ALERTJ. 319 NEXTJ"14 320 TRANSFER TO SETJ(JX) 321 JOINT(14) JCR(JC*DJC)=1 322 TRANSFER TO GAMMA(GAMMAI) 323 JOINT(15) TIMELG(TLX+3)=0 324 TRANSFER TO PHI(PHIl) 325 PHI(l) TRANSFER TO REUSEJ 326 PHI(2) TRANSFER TO PI(PII) 327 PI(1) NEXTJ=9 328 TRANSFER TO RESETJ 329 PI(2) NEXTJ=10 330 TRANSFER TO RESETJ 331 JOINT(20) EXECUTE NOTE,(7.08.tTIMELG(TLX+4)~TIMELG(TLX+5)) TIMELG(TLX+7)=21 J=21 TRANSFER TO S26 JOINT(21) JCJ=TIMELG(TLX+8) 332 S54 THROUGH S54t FOR QJ=7,DQQUEUE(QJ).E.JCJ 333 QUEUE(QJ)=1023 334 JCR(JCJ*DJC+4)=1 335 207

TABLE XXXIII (Continued) 11-13-61 6 COMPLTCCOMPLT+1 336 EXECUTE ALERTF. 555 THROUGH S55 FOR QJ=7,DQtQJ.G.QEND*OR*QUEUE(QJ).E: 255 337 WHENEVER QJ *GQEND 338 R(JR CJCJDJC)= 339 JOINT(16) NEXTJ"23 S56 OTHERWISE 341 OUEUE(QJ) =JCJ+16 342 JCR(JCJ*DJC+1) =1 343 EXECUTE NOTE (5 06,QUEUE(QJ-6 ) QUEUE('QJ-5 ) ) 559 NEXTJ=22 344 END OF CONDITIONAL 345 TRANSFER TO SETJ(1) 346 JOINT 22) EXECUTE ALERTM. 347 TRANSFER TO JOINT (23) 348 JOINT(23) NEXTJ=23 349 TRANSFER TO SETJ(1) 350 JOINT(24) TIMELG(TLX+3)=O 351 TRANSFER TO RHO(JCR((TIMELG(TLX+8))*DJC+4)) RHO(1) NEXTJ=17 TRANSFER TO SETJ(1) 354 RhO(2) NEXTJ"25 355 WHENEVER TIMELG(TLX+10)wE*TIMELG(TLX+6)1 1*ANDeJCR(3+(TIMELG(TLX+8))*DJC) E.O EXECUTE NOTE.(7 O 8TIMELG(TLX+4 )TIMELG(TLX+5)) OTHERWISE EXECUTE NOTE.7.096TTIMELG(TLX+4) TIMELG(TLX+5)) END OF CONDITIONAL TRANSFER TO SETJ(1) 356 JOINT(25) JCJ=(TIMELG(TLX+8))*DJC 357 JCR(JCJ+4) 1 358 JCR(JCJ+1 )2 359 TLEFTJJCR ( JCJ+3) 360 FIRSTJJCR ( JCJ+2) 361 JCJ-JCJ/DJC 362 S58 THROUGH S58, FOR QJz7tDQoQUEUE(QJ).E.JCJ 364 WHENEVER TIMELG(TLX+1O ) EFIRSTJeAND.TLEFTJ.E.O 363 QUEUE(QJ) 1023 365 COMPLTaCOMPLT+1 366 TRANSFER TO S59 367 END OF CONDITIONAL 368 QUEUE (QJ-4) FIRSTJ QUEUE (QJ-3 ) TLEFTJ QUEUE ( OJ ) 255 NEXTJ=26 372 EXECUTE NOTE* (6*0t5,QUEUE(QJ-6) QUEUE(J-5 ) TRANSFER TO SETJ(1) 373 JOINT(26) EXECUTE ALERTMe 374 NEXTJ=27 375 TRANSFER TO SETJ(1) 376 JOINT(27) NEXTJ 16 TRANSFER TO SETJ(I) 378 JOINT(17) NEXTJ=18 TRANSFER TO SETJ(1) 380 JOINT(18) NEXTJ-19 TRANSFER TO SETJ(1) 382 JOINT(19) JCJ=TIMELG(TLX+8) S57 THROUGH S57gFOR QJ=7tDQO QUEUE(QJ).E.JCJ+16 384 208

TABLE XXXIII (Concluded) 11-13-61 7 QUEUE(QJ) JCJ 385 JCJ=JCJ*DJC 386 TIMELG(TLX+4)=QUEUE(QJ-6) 387 JCR(JCJ+4)=2 388 TIMELG(TLX+5 )QUEUE(QJ-5) 389 TIMELG(TLX+6)= QUEUE(QJ-4) EXECUTE NOTE ( 6 O 7 QUEUE ( QJ-6 ) QUEUE ( QJ-5 ) ) PUR=TIMELG(TLX+5) -1)*DPUR+1 393 WHENEVER QUEUE (QJ-4) NE 0 TIME = TIMELG(TLX+1)+QUEUE(QJ-3)-INFIN+DIST.(PURVUE(PUR+24)) END OF CONDITIONAL WHENEVER TIME.G.O TIMELG(TLX+1)= INFIN OTHERWI SE TIMELG(TLX+1)=TIME + INFIN END OF CONDITIONAL TINELG(TLX+10)=QUEUE(QJ+2) 392 WHENEVER TIMELG(TLX+6).E*TIMELG(TLX+10) TIMELG(TLX+7)=20 OTHERWISE TIMELG (TLX+7) 28 0 END OF CONDITIONAL 'I EXECUTE BEGJOB. 394 TRANSFER TO S221 394 JOINT(28) TIMELG(TLX+2)=0 TRANSFER TO REUSEJ 396 JOINT(29) WHENEVER PBQEND.EeO*AND*COMPLTE.0O EXECUTE NOTE*(7,0,6,0,0) TIMELG(TLX+1)=INFIN TIELG( TLX+6)}1 EXECUTE MOVE1* FUNCTION RETURN END OF CONDITIONAL J=l TIMELG(TLX+6)=1 TRANSFER TO S26 END OF FUNCTION 397 C-C. 0386

Eater Determine the next Joint to be performed. Determine if next Joint is in a main routine or a subroutine. DISCON Disconnect subordinate module. Add in switching time. 826 Determine the new subordinate module. S281 Is the module availablet? S29 82 Search the time log to find Mark the module busy. the time t when such a Add in access time. module would be available. Move this time-log entry back to time t. 827 Mark the CM as connected to the subordinate module. xit ecute the joint function and 8D,tR, n RE13B Mark the next Joint rarber in the tim log. Add In Joint function time. Exit Figure 70. MPMIN subroutines-common section. 210

Begin Joint 1. Are there any Job requests in~ the PB queue? Set switch a = al. Take the first Job out of the Set next Joint queue. Set next Joint - 2. Return Return Figure 71. MPMIN subroutine. Begin Joint 2. Find the new Job's priority in the PURVUE table. Set next Joint = 3. Return Figure 72. MPMIN subroutine. 211

Begin Joint 3. Is there any room in the program queueN for a new Job? YES Suspend operation of the simulation program and return control to the system. Examine the program queue from the bottcm up. Does the new Job request rank higher than the lowest Job on the queue? Z YES NO S33.... Move the Job on the queue down one notch and examine the next job. s35 Insert the new Job into the program queue and mark it as being in the backlog. Set next joint 1. Return Figure 73. MPMIN subroutine. 212

Begin joint 6. Begin Joint 4. Remove the completed Job from the program queue. Are there any completed Jobs on the program queue? YES Set switch a cal. S36 I Search the queue from the top down to find a complete Job. l S37 Release the Job's modules to the available pool. Set next Joint = 5. Return Figure 74. MPMIN subroutine. 213

T ^^^ ___^ Set next joint, i, ^ ~ 1".29 or 1. Return Set switch ~ Select the first Mark the job in the program ~j~~( Is there such a job? ) Begin Joint 14 Mark the job computer busy. \ queue. _____ YES NO~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~r Select the next IS ^ this job in the \ Begin Joint 10 (^ iob in the queue. backlogJ YES YES I S 200 S48 NO 54 N Enter the subroutine ONEMOD Assign the required I s there a job Is there a lower to ask if there are enough modules to the job. computer free? ranking job in \ available modules to assign this ] Mark the job as being ~~ \prop ress? YES~~~E job to stand-by I instand-by. YES ~ No1~^~~~~~~~~~~ ~ ~~Mark the job as almost ar the job in N01j_________ in progress. stand-by as almost Set switch y = in progress. ~ro~~ Search the queue from the bottom I a I H up for a job (with the needed modules) in stand-by or, failing S 52 that, in execution phase. Z. Set next ioiSnt nt t YES(O) YES (1) _____ S51 J I Retrn Is there such a iob ___ Demote the job from Set switch a vaI Return instand-by? J stand-by to backlog. \/ Reassign the old o \ Y job's modules to NO ^ ~ ^ \ NO_____________ YES the new job or to Is there such a job in \ ( Was this job interrupted the available pool. execution phase? just as it was completed? S49 \ YES Set switch I - r B Set next joint. 7.Begin Joint 9 Return Figure 75. MPMIN subroutine.

Begin Joint 5. Enter the ICIP subroutine at entry SETIGP to institute sequence processing. Set next Joint = 6. Return Figure 76. MPMIN subroutine. Begin Joint 7. Alert the job computer. Increase the priority of the job to be interrupted. S510 _ Remove the record of the job from the program queue. Examine the queue starting at a point just higher (in rank) than the newly removed job. S511 Should the job be reinserted at this point? YES NO S512 S513 Insert the job back into the Move to the next higherqueue. ranking job. Set next joint = 8. Return Figure 77. MPMIN subroutine. 215

Begin Joint 11. Set switch, a 01. Set switch r = r2. Set JC = 0. 'JC JC + 1. /Did the JCth Job couter alert the master corputer?./ in response to \ a MC alert) ERASE(2) J ERASE(1) ERAE(O) Set switch ~=. Erase the alert signal. Are there any more Job Erase the alert signal.ters to be Mark the Job computer checked? free. chece Set next Joint * 12..,O I Set next Joint - 15. Return Figure 78. MPMin subroutine. Return 216

Begin Joint 12. Move all entrieb in the time log up to the point at which the CX memory will have been loaded. Set next Joint = 13. Return Figure 79. MPMIN subroutine. Begin Joint 13. Alert the Job computer. Set next Joint = 14. Return Figure 80. MPMIN subroutine. 217

Bl:in joint 1 1. Clear thf Irt l n pi oie ths ti —l te trt.i Return et next Joint 9. 8et next Joint 10. Return Return Figure 81. NPMIN subroutine. Begin Joint 19. Mark the Job "in progress." Set up the time-log entry for the new Job, and enter the JPMAJ subroutine at entry BE~'OB to move the time-log entry to its proper position. Set switch p pa. Exit Figure 82. MPMIN subroutine. 218

Begin Joint 20. Set next Joint = 21. (Punch output card noting Job's completion.) S26 Figure 83. MPMIN subroutine. Begin joint 21. Mark the job as completed. Set switch p = pi. S55 / Is there a Job in the queue which is Mark that job as almost In Mark the job computer free. progress. Set next joint = 23. Set next joint ' 22. Return Return Figure 84. MPMIN subroutine. 219

Begin Joint 22. Alert the mrater ccputer. Set next Joint - 23. Return Figure 85. MPMIN subroutine. Begin Joint 24. Clear the alert signal from the time-log entry. 2 Set next Joint J 17. Set nex t Jont 25. \ I RetReturn Figure 86. MPMIN subroutine. 220

Begin joint 25. Set switch p = pi. Save the number of the interrupted Joint and the amount of time left in that Joint. s58 Was this interrupted Job Just ~ completed? J NO YES AlertX Mark the Job as completed. Mark the Job in the program queue as in the stand-by list. Set next oint 22. Set next Joint = 26. Ietur nReturn Return Figure 87. MPMIN subroutine. Begin joint 26. Alert the master computer. Set next joint = 27. Return Figure 88. MPMIN subroutine. 221

Begin Joint 29. Is there any work for the master computer? Move the entry for the master computer to the bottom of the See next Joint = 1. time log. Exit Figure 89. MPMIN subroutine. 222

TABLE XXXIV NOTE SUBROUTINE *COMPILE MAD.PUNCH OBJECT NOTE 000 EXTERNAL FUNCTION(CODEA CODEB COOEC KPRINTPPRINT) ENTRY TO NOTE. NORMAL MODE IS INTEGER EQUIVALENCE (IMPUT(30) DIG) ( INPUT(31 )DMP) (INPUT(32) 1,DJC) (INPUT(33) DMA),(INPUT(34),DMC) (INPUT(36,DPBQ) 2,( INPUT(37) DPUR) ( INPUT(38),DQ) t(INPUT(48) MAEND) ( IN 3 PUT(51),PBQEND),(INPUT(53),QEND, (INPUT(54) CQEND) ( 4 MISC(O )LASTL),(MISC(1) LASTK),(MISC(2) COMPLT) 4MISC 5 (3).CXTIME)4M{ISC(4),ALPHAI)t(MISC(5)tTLX) (MISC(6),NEWP) ( 6 MISC(7).NEWL)*(MISC(8),NEWR)t(MISC(9),NEWJ) (MISC(10)tNEWPR 7 ),(MISC(11),Q) (MISC(12) JC)t(MISC(13) QBUMP) (MISC(14), 8 GAMMAI) (MISC( 15) PHII) (MISC(16) PII)(MISC(17) K) 9 (MISC(18),PUR1),(INPUT(f47)JCEND) EQUIVALENCE (MISC(19) PBQU) (MISC(20) BACKLG).(MISC(21 )STA 1 NBY),(MISC(22),INPROG),MISC(23),COMP) (MISC(24),ASTRSK) PROGRAM COMMON IGPLOG,IMPLOGJCRMATtMCTMISC~PERBUFPURVUE 1,QUUEUESEQQtTIMELG INPUTtINFINtTL JLRCQMAXPBOMAXQMAXt 2 IME PUR OLDTL OLDTLXtJXtMP TIME3 RUNNORUNNUM DIMENSION IGPLOG(195) IMPLOG(144) JCR(34) MAT(324), 1 MCT(119) INPUT(74) PERBUF(159) PURVUE(367) QUEUE(249) 2 SEQQ(111 )TIMELG(439) MISC(74) TIME3(9) WHENEVER PPRINT *E.0 TRANSFER TO DOTOO(O) C=CODEC TRANSFER TO DO(CODEA) DO (0) TRANSFER TO DOTOO(C) DO(1) PBQU a PBQU-1 TRANSFER TO DOTOO(C) DO(2) ASTRSK = ASTRSK -1 TRANSFER TO DOTOO(C) DO (3) BACKLG BACKLG -1 TRANSFER TO DOTOO(C) DO(4) ASTRSK x ASTRSK -1 TRANSFER TO DOTOO(C) DO(5) STANBY = STANBY-I TRANSFER TO DOTOO(C) DO(6) ASTRSK = ASTRSK -1 TRANSFER TO DOTOO(C) DO (7) INPROG a INPROG-1 TRANSFER TO DOTOO(C) DO(8) COMP = COMP-1 TRANSFER TO DOTOO(C) DOTOO(1) PBQU a PBQU+1 TRANSFER TO DOTO0(O) DOTOO(2) ASTRSK = ASTRSK +1 TRANSFER TO DOTOO(O) DOTOO(3) BACKLG = BACKLG+1 TRANSFER TO DOTOO(O) DOTOO(4) ASTRSK = ASTRSK +1 TRANSFER TO DOTOO(O) DOTOO(5) STANBY = STANBY+1 TRANSFER TO DOTOO(O) DOTOO(6) ASTRSK = ASTRSK +1 TRANSFER TO DOTOO(O) DOTOO(7) INPROG = INPROG+1 TRANSFER TO DOTOO(O) DOTOO(8) COMP = COMP+1 DOTOO(O) PUNCH FORMAT OUTPUT*RUNNUMCODEAECODEBCODECTIMELG(TLX+1), 1 KPRINTPPRINTPBQUtBACKLCGSTANBY INPROGCOMPASTRSK 225

TABLE XXXIV (Concluded) 11-13-61 2 VECTOR VALUES OUTPUT = $I6~14ll.ll,17I6I4,S9.6(14),S7,l 1 H1*$ FUNCTION RETURN END OF FUNCTION C-CI 0063 4:

A. 2.11. THE ONEMD SUBROUTINE This section of the program (Table XXXV) is used by the MPMIN subroutine to see if a job program can be assigned to the stand-by list. There are, therefore, two exits to the routine, "no" and "yes." There are also two entries. Entry ONEMOD is used first. This checks the job's requirements against the list of available modules. Entry TWOMOD is used only after a prior entry to ONEMOD with a negative exit, TWOMOD compares the job's requirements with both the modules available and the modules assigned to a particular lower-ranking job k. This routine assumes that the modules listed both in the MAT table and in the PURVUE table are in numerical order. In the flow charts in Figure 90, "MA" represents the number of a module in the MAT table, and "PUR," a module in the PURVUE table. A. 2.12. THE SETMD SUBROUTINE This code (Table XXXVI), Figure 91), is used by the MPMIN subroutine to assign a job program to the stand-by list. Entry SETONE is used when the job's required modules are all obtainable from the list of available modules in the MAT table, Entry UPSET is used when it is necessary to demote a job k from standy-by to backlog, to obtain eough modules for the new job. "MA" and "PUR" are used as in Section A.2.11o 225

ONEMD SUBROUTINE *COMPILE MADtPUNCH OBJECT ONEMD000 EXTERNAL FUNCTION (YEStO) 577 ENTRY TO ONEMOD. 578 NORMAL MIODE IS INTEGER EQUIVALENCE( I NPUTi 30) DIG) s( INPUT 31 ) DMP ) ( INPUT(32) 1,DJC )(INPUT(33) DMA) ( NPUT(34 )DMC) ( tPUT(36 )DPBQ) 2 (IINPUT(37) DPUR) (INPLUT(38) DQ),(INPUT(48)tMAEND) t N 3 PUT(51 ),PBQEND),( INPUT( 53 ) OENDt (,INPUT ( 54) CQEND)! ( 4 MISC(O),LASTL) (MISC(1),LASTK) 4,MISC(2 ) CO4PLT) (MISC 5 (3) CXTIME) (MISC(4) ALPHA) (MISC5) TLX) 4MISC(6) NEWP) (4 6 MISC(7) NEWL) 4MISC(8) NEWR) (MISC(9)tNEWJ) (MISC(10) NEWPR 7 ) t(MISC(11) tQ) NM ISC(12) JC) (MISC(13) tQBUMP),(MISC(14) t 8 6AMMAI)!(MISC(15),PHI I),(MISC(16) PI:) t(MISC(17) #K). 9 (MISC(18)PUR1),(INPUT(47) JCEND) EQUIVALENCE (MISC(19) PBQU) (MISC(20) BACKLGt),(MISC(21),STA 1 NBY) (MISC(22) INPROG),(MISC(23)tCOMP) (MISC(24) ASTRSK) PROGRAM COMMON IGPLOGtIMPLOGJCRMATMCTMISCPERBUF PURVUE 1,QUEUE SEQQtTIMELGt INPUT INFIN TL,JtL RCQMAX PBQMAX.tQtAXT 2 IME PUR OLDTLPOLDTLXoJXMP tTIME3-RUNNOtRUMNUM DIMENSION IGPLOG(195) tIMPLOG(144) JCR(34) MAT(324 ) 1 MCT(119 ) INPUT(74) PERBUF (159 ) PURWE( 367) QUEUE (249) 2 SEQQ(111) TIMELG(439) MISC(74).TIME3(9) ro STATEMENT LABEL YESNO 577 I) DELTAI 1 579 PUR" (QUEUE (Q-5 )-) *DPUR+13 580 PUR l1PUR 581 WHENEVER PURVUE(PUR).E9 999 TRANSFER TO YES TRANSFER TO S41 582 ENTRY TO TWOMOD4 583 DELTAIt2 584 PUR~PUR1 K~QUEUE( QBUMP-6 ) 58-5 S41 MA~O 58 S42 WHENEVER MAT(MA)*G.PURVUE(PUR) t TRANSFER TO NO 587 WHENEVER MAT(MA) L*PURVUE(PUR) 588 DELTA(1) MA~MA+DMA 589 WHENEVER MAENE*MAEND# TRANSFER TO S42 590 TRANSFER TO NO 591 END OF CONDITIONAL 592 S43 WHENEVER MAT(MA+3)*NE,-1t TRANSFER TO DELTA(DELTAI) 593 S44 WHENEVER MAT(MA+21)NE.O9 TRANSFER TO DELTA(1) 594 PUR=PUR+1 595 WHENEVER PURVUE(PUR)*E.999 TRANSFER TO YES 596 TRANSFER TO DELTA(1) 597 DELTA(2) WHENEVER MAT(MA+3)^E*Ko TRANSFER TO S44 598 TRANSFER TO DELTA(I) 599 END OF FUNCTION 600 C.-C. 0047

Enter (ONEMOD) Set switch8 5= 1. ~/~~\ A~ NO ________~~ Are there any modules required for this job? )Exit(yes) YES er ~~ Set switch 5 = 52. Enter (TWOMOD) it (no) s41 Pick up the first entry in NO the MAT table. Is MA anavailab dYES Is there such a module? S42 Is MA greater than PUR? lINO | Get the next module YES O. listed in the MAT table. Is MA less than PUR? ~ 2 NO s43 Is MA an available module? YES YES NO S44 '~(Is MA assigned to Job k? Is MA in operating condition? J YES Find the next module required by v Is there such a module? the Job program. NO Exit (yes) Figure 90. ONEMD subroutine. 227

TABLE XXXVI SETMD SUBROUTINE *COMPILE MADPUNCH OBJECT SETMDOOO EXTERNAL FUNCTION 601 ENTRY TO SETONE. 602 NORMAL MODE IS INTEGER EQUIVALENCE ( INPUT(30 DIG) INPUT (31 ) DMP) NPUT (32) 1 *DJC),INPUT(33) DMA) (INPUT(34) DMC) (INPUT{36) DPBQ) 2.( INPUT 37) DPUR) (INPUT(38) DQ) (INPUT(48) tMAEND ( IN 3 PUT(51) PBQEND) (INPUT(53),QEND) (INPUT(54) CQEND) ( 4 MISC(O) LASTL) (MISC(1) LASTK) (MISC(2)tCOMPLT)t(MISC S (3) CXTIME)-(MISC(4)tALPHAI),(MISC(5) TLX) (MISC(6) NEWP) ( 6 MISC(7) NEWL) (MISC(8),NEWR) (MISC(9) NEWJ) (MISC(10),NEWPR 7 ),(MISC(11),Q),(MISC(12)tJCl)(MISC(13) QBUMP), (MISC(14)9 8 GAMMAI).(MISC(15),PHII),(MISC(16) PII),(MISC(17)tK)t 9 (MISC(18) PURl),(INPUTt47),JCEND) EQUIVALENCE (MISC(19),PBQU),(MISC(20).BACKLG),(MISC(21),STA 1 NBY)~(MISC(22),INPROG)0 (MISC(23),COMP)*tMISC(24)oASTRSK) PROGRAM COMMON IGPLOG IMPLOG.JCR MATMCT MISC PERBUF PURVUE 1 *QUEUESEQQTIMELG INPUT,INFINTLJLtRCQMAXPBQMAXQMAXT 2 IMEPUROLDTLtOLDTLXtJXMP TIME3,RUNNOtRUNNUM DIMENSION IGPLOG(195),IMPLOG(144),JCR(34),MAT(324)t ro 1 MCT(119) INPUT(74) PERBUF(159) PURVUE(367) QUEUE(249) ro 2 SEQQ(111).TIMELG(439).MISC(74),TIME3(9) 00 DELTAI=3 603 TRANSFER TO S45 604 ENTRY TO UPSET. 605 DELTAI=4 606 S45 NEWK=QUEUE(Q-6) 607 QUEUE(Q) =255 608 MA=O 609 TRANSFER TO DELTA(DELTAI) 610 DELTA(4) WHENEVER MAT(MA+3)*,EK,MAT(MA+3)=-1 611 DELTA(3) WHENEVER MAT(MA)*LePURVUE(PUR1) 612 S46 MA=MA+DMA 613 WHENEVER MA *E.MAENDFUNCTION RETURN TRANSFER TO DELTA(DELTAI) 614 END OF CONDITIONAL 615 WHENEVER MAT(MA+3)eNE-l1OR.MAT(MA+2).NE.0, TRANSFER TO S46 616 MAT(MA+3)=NEWK 617 PUR1=PURI+1 618 TRANSFER TO S46 END OF FUNCTION 620 C.C. 0041

Enter (SETONE) Enter UPSET) Set switch 8 - 83. Set switch 8 - 84. S 45^t Mark the job as in standby. Pick up the first entry in the MAT table. If this module was assigned to job k, mark it now as available. \y^ YES __o__YES operating? the MAT table. AsIs there suchnew ob. Find the next module required by (ls MA less than PUR? 9 E YESu Is MA both available aod~ y Fet ~the next module listed In t operating? J y the MAT ta/le. iYES / Assign the module to the new Job. Find the next module required by the Job program. Figure 91. SETMD subroutine. 229

APPENDIX B EXAMPLE OF A SIMULATION RUN B. l. Introduction This appendix describes a typical simulation run, assuming a polymorphic system with seven job computers. It serves as an example of the capability of the AN/FSQ-27 simulation, and of the considerations involved in setting up an experiment. This run includes simulation of shared module queueing as well as master computer activity. B. 2. Description of Simulation Parameters Bo 2.1. MASTER PROGRAM The master program functions are already defined in the simulation program (Sections 3.3.8 and 3.3.9). Associated with the execution of each function, there is, in general, a subordinate module connection (minor joint) to be simulated. In the simulation, one is free to specify the subordinate module to be used and the time duration of the connection for each joint. Table XXXVII gives the modules and time durations which are specified for the master program on this run. Note that joints 8 and 23 are ones in which the MC or JC is disconnected and waiting for an alert; the time indicated for them has no significance except that it must be long in order that the CM does not go on to the next joint before receiving the alert. Also, it should be pointed out that in this run no priorities are assigned to incoming jobs, and hence no interrupting occurs. As a result, certain joints listed in Table XXXVII, such as 9, 16, and 27, are never executed and their time durations has no effect upon results. B.2.2. JOB PROGRAMS AND ARRIVALS In this run, arrivals of requests for processing occur at random, which with an exponential distribution on the time between arrivals, given by f(t)dt = ~-e't dt (120 231

TABLE XXXVII MASTER PROGRAM DESCRIPTION Module Time Joint Code Function ( se) Code (___sec) 1-PB 20 Get input job 1,000 2-MT 40 Get purview data 140,000 3-MD 10 Backlog entry 30,000 4-MD 10 Scan standby 55,000 5-PB 20 Output report 1,000 6-MD 10 Scan standby 260,000 7-CX 30 Alert 0 8-0 0 Wait 34,359,738,367 9-MD 10 Bump job 240,000 10-MD 10 Check JC status 1,000 11-MD 10 Respond to alert 2,000 12-CXM 50 Load memory 0 13-CX 30 Alert JC 0 14-MD 10 Alert response 240,000 15-CX 30 Remove alert 0 16-PB 20 JC interrupt report 1,000 17-MT 40 Load program 200,000 18-MD 10 Mark job in progress 1,000 19-0 0 Start job 0 20-0 0 End job 0 21-MD 10 Complete job 26,000 22-CX 30 Alert MC 0 23-0 0 Wait 34,359,738 367 24-CX 30 Remove alert 0 25-MD 10 Enter alert 1,000 26-CX 30 Alert MC of interrupt 0 27-MT 40 Dump job 40,000 28-PB 20 Input/output 1,000 232

with X = 5 per minute. Since one type of job request is considered, the statistical properties involved in representing job execution are the same for all requests. No priorities are assigned, and only a JC is required to accomplish processing of any job. Job execution is represented by 1000 minor joints for input/output (joint 28), each having the same duration and separated by a time interval of random duration for computation. Major joints have a distribution as shown in Figure 92. It can be seen from Figure 92 that most of the input/output connections during job execution occur at intervals approximately equal to the service time for the shared module (the PB). Hence, there is considerable queueing for the shared module. Bo 2.3. EQUIPMENT PARAMETERS The simulation program allows arbitrary specification of the distribution on access time for drums, tapes, and the central exchange memory unit (Section A.1.2). (The time for loading the CXM is considered to be its access time in the simulation.) One may also specify the constant switching time at the central exchange. In this run these parameters are all given the constant values listed in Table XXXVIII, which, along with Table XXXVII summarizes the description of the run. TABLE XXXVIII SUMMARY DESCRIPTION OF THE RUN Modules 1 MC, 7 JC, 1 MD, 1 MT, 1 PB, 1 CX, 1 CXM Mean arrival rate 5 per minute Major joint duration Distribution of Figure 92 Mean =.024 sec Variance =.0461 sec2 Number of major joints 1000/job Minor joint duration 9.58 msec Initial conditions All queues empty, MC on joint 1, JC's on joint 23 CX time 80 sec Tape access time 2.8 sec Drum access time 8.5 msec CX memory access time 2,0 msec 233

497.5 a) C.0025 0 1.000 0.995 -ir 0.0025 0 -0 8 10 2000 400 Time in milliseconds Figure 92. Probability distribution of major joint durations. L_.3 ~ ~2

Note that the total time duration for each master program joint of Table XXXVII includes, in addition to the value listed there (the computation time for each joint), the CX switching time and appropriate access time from Table XXXVIII. For example, the total duration of the input/output connection of the PB is 1000+80+8500 = 9580 isec, Bo 3 Results of the Run B. 3o. GENERAL The run simulates 1287 seconds of system operation, with 116 problem request arrivals. From this number, the first 100 arrivals constitute the sample space on which results are based. The IBM-704 computer time required for the run is 85 minutes. This result compares well with the predicted running time, whose calculation is summarized in Table XXXIX, It is clear that the majority of the running time results from the simulated competition for the shared module, i.e., attempted minor joints. Running time would be appreciably reduced if the number of joints per job program were smaller, and shared module queueing omitted (see Table XX, Section 5). TABLE XXXIX CALCULATION OF PREDICTED RUN TIME Type of Est. Number Approximate Simulation Joint in the Run Time Per Joint Runnin Master program 25,600 20 msec 512 sec Job program minor joints 115,000 10 msec 1150 sec Job program major joints 115,000 9 msec 1035 sec Attempted minor joints 287,500 12 msec 3450 sec Total estimated running time = 6147 sec or 102,4 min, 235

B.3.2. JOB ARRIVALS The actual arrival time for the first 100 arrivals is compared in Figure 93 with the theoretical result for the exponential distribution, Eqo (120)o This distribution appears reasonably accurate for such a small sample, Table XL compares the mean and variance of the arrival interval with the theoretically expected values. TABLE XL COMPARISON OF ARRIVAL TIME DISTRIBUTION Parameter of Sample Theoretical Distribution Value Value Mean 11.21 sec 12.0 sec Variance 92.1 sec2 144.0 sec2 To demonstrate that there is no strong relationship between successive values of the arrival interval, a scatter diagram was made of the uniform random numbers which generate the intervals between job request arrivals, This is shown in Figure 94. Since the points are scattered rather evenly in the unit square, one concludes that successive arrival intervals are independent, as expected. Note, however, that successive arrival intervals are not generated from successive numbers of the random number generator in the simulation program. This is true because the arrival history is generated as the simulation proceeds, and in the interval between successive arrivals a great many random numbers are taken to generate major joint durations. Figure 94 provides a check on the long-term correlation properties of the random number generator. B.3.3. JOB EXECUTION TIME Because the recorded output of the simulation does not include values of the major joint durations, it is not possible to check their distribution against Figure 92. However, job execution time, defined as the time interval between joints 19 and 20 of the master program, will consist of the sum of time durations for 1000 major joints, 1000 minor joints (joint 28), and all waiting time for the shared module. Excluding the waiting time, job execution time should therefore have an average value of 33.58 seconds, and a variance of 46.1 sec2. 236

20 8 - I I I I I I 19 - 18 (I, Actual distribution -1 — 6Theoretical exponen5- 5 tial distribution 0 13 U. --!O 12 o I2 0 90 z9 C)7 6 cc L j~ 5 4 Z L.. 3 ~~~2 ~~~~~~~~0 5 90 15 20 25 30 35 40 45 50 ARR I VAL INTERVAL IN SECONDS Figure 93. Comparison of distribution on arrival intervals. 237

1.0 00 II o ~~~~~PC 0 0 0 0 w 0~~~~~~~~~~~~~~~~~ 0 000 G 0 0 0 z 0 ~~~~0 00 0 0 R) 0 0 0~~~~~~0 z ~~0 0 4 CPO 0~~~~~~~~ I~~~l 00~~~~ 0 0 0 a~~ 0 Z 0 0 00 0 0~~~~~~ 0ao~~~~~~~~~ 0 oo o 0 Q Q 0 goo 00 0 0 S o VALUE OF PRECEDING RANDOM NUMBEo ^~Q o o oO ^ - o ^ooo w 0 0 ^ 0 0 Figure 94. Scatter diagram of 100 numbers generating arrival intervals. ~~s ~ 0 - o~~~~~ o VA LU E OF PRECEDING RAN DOM N UMBE R Figure 94. Scatter diagram of 100,^u-Juuim numbers generating the exponential arrival intervals.

The values obtained from the data are 55.13 seconds for the mean value, and 160.7 sec2 for the variance. Assuming the major joint distribution, Figure 92, for the run the average JC waiting time per request for the shared module is 19.6 msec, and the variance of the waiting time per request is 0.1146 sec2. Since JC waiting time is not useful in advancing job processing, the shared-module queueing reduces the effective use of JC job processing time. In this run, avg. use of JC job processing time = (358) x 100 = 63 33.58 + 19.6 where 33,58 sec is the job execution time exclusive of waiting time, and 19,6 sec is the average total JC waiting time per job, The output of the simulation does not at present provide information for calcula-tion of shared module utilization factor, Table XLI summarizes the results for job execution time, Figure 95 compares the distribution of job execution times with the theoretical normal distribution having the same mean and variance. Since job execution time is the sum of a large number of random variables, it is expected (according to the Central Limit theorem) to have a normal distribution, The comparison indicates that the sample is not large enough to assure a good fit, but the discrepancy does not seem unreasonable for this small sample. TABLE XLI RESULTS FOR JOB EXECUTION TIME Sample Mean Execution Variance of Source Time (sec) Execution Time (sec2) First 100 jobs 53513 160o7 First 20 48.02 19o 0 Second 20 61.68 78,9 Third 20 48.20 123.6 Fourth 20 54.90 124o 2 Fifth 20 52.92 213.2 First 40 54.85 16308 Middle 40 51.54 Last 40 53o90 165o53 239

ACTUAL DISTRIBUTION - - - THEORETICAL NORMAL DISTRIBUTION 0 2~ — 0.08 LL 0 z 0 0.06 I ^IU~~~~~~~L ro 0.04 L.L 'L 0.02 -1.0 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1.0 x - m/aFigure 95. Comparison of distribution of job execution time with normal distribution.

B 3, 4. THROUGHPUT TIME Throughput time for a job is the sum of the job execution time, master program processing time, and total waiting time in the system queues. The value for average throughput time obtained from the data is 66.4 seconds. Hence, master program processing time and waiting time on the average amount to 13.3 seconds. The minimum value for MP processing time is the sum of the total durations for MP joints 1, 2, 3, 1, 4, 12, 13, 17, 18, 21, 4, and 5, or about 602 seconds. Hence, average waiting time in the system queue is about 7 seconds Bo35.5 AVERAGE NUMBER OF JOBS IN THE SYSTEM, AND STATE PROBABILITIES Calculations were made of the average number of jobs in the system, average number of jobs in progress, and the probabilities of a given number of jobs in the system in the sample run. The average number of jobs waiting in the system queues is the difference of the total number in the system and the number in progress. These figures are shown in Tables XLII and XLIIIo TABLE XLII RESULTS FOR THE NUMBER OF JOBS IN PROGRESS AND IN THE SYSTEM Quant ity Mean Variance Number in the system 5o79 5 38 Number in progress 5.3 Number in the queues 0.4 241

TABLE XLIII STATE PROBABILITIES OBTAINED FROM DATA n Pn 0 0 1.0346 2.0587 3.1135 4.0859 5.1577 6.1291 7.1437 8.1558 9.o850 10.0375 At no time are there more than 10 jobs in the system simultaneously, nor is the system ever completely empty. It is therefore evident that the state probabilities are not very accurate. B,4. Conclusions The length of run taken in this example is sufficiently long to yield accurate results in measurements of mean values, but not in measurements of state probabilities or distributions. This is consistent with what has been shown in Section 5 regarding statistical accuracy of results, The basic aspect of system operation represented in this run involves the interaction of multiple queue processes, namely, the queueing of jobs at the system input and the queueing of computers actively engaged in job processing for use of a shared subordinate module. This is a more complex problem to treat analytically than those considered in Section 4. Recall that in Section 4 a discussion was given of queueing for a shared module when seven job computers were continuously busy processing job requests. That discussion is not applicable to this run since, here, all job computers are not continuously busy because of the random nature of arrivals at the system input. Furthermore, the number of JC's that are busy depends on the sharedmodule queueing process, since waiting time for use of the shared module affects the service'time distribution for the job. 242

This run is therefore an example of simulation of a complex system for which not even a crude analytical model is presently available, Because of the length of run, only steady-state mean value measures of performance are accurate, Among those that may be calculated are mean number of jobs in the system and mean waiting time for use of the shared module. From the latter it is possible to calculate average use of available JC time, but the present simulation output does not provide information on utilization factor for the shared module. The simulation program runs rather slowly in a situation such as the one described in this appendix, However, runs indicate that increased speed may be obtained when system activity is simplified, eg., by omitting competition for the shared module. 243

APPENDIX C AUXILIARY PROGRAMS This appendix describes briefly several programs written for the IBM704 computer to perform numerical calculations of the solutions of queueing problems. The programs were written in the MAD (Michigan Algorithm Decoder) language, using subroutines available on the library tape at The University of Michigan Computing Center. A listing is given of the MAD statements, and a description of input card format and printed output format is provided. Clo Transient Solutions for the Exponential Model This program solves the time-dependent equations of detailed balance for the multiple-channel system with exponential arrival- and service-time distributions. The numerical solution of these equations is accomplished by the Runge-Kutta fourth-order method, available as a library subroutine, The following equivalents exist between the notation used in the program and the notation used in writing the equations in Section 4: Y( J)- PJ-1 F(J) J-1 The quantity X is equivalent to time, or normalized time, depending on how the equations are written (see Section 4.2). In the program, the equations are written in the form F(J) = A(J,1) ~ Y(J-1) + A(J,2) ~ Y(J) + A(J,3) ~ Y(J+l) (121) where ~ A(J, 1),A(J,2),A(J,3) are the coefficients determined from the transition probabilities. For example, the equation P7 = 7pP - (7p+7) P7 + 7P8 245

which is scaled to the service time for a single channel, would appear in the program as F(8) = 7p ~ Y(7) - (7p+7) ~ Y(8) + 7 Y(0) with A(8,1) = 7P A(8,2) = -(7p+7) A(8,3) - 7 The input data to the program are as follows: N = integer number of equations to be solved (1 + maximum allowed state) X = initial value of time from which calculation is to begin XFIN = final value of time for which calculations are to be made H = step size in X for the numerical calculation A(1,1)...A(N, 3) = values of the coefficient. The card format for the input data is described in Table XLIV. Each line in the table corresponds to one card. All quantities to be specified are decimal numbers, except N, which is an integer whose maximum allowed value is 65. The value of N must be justified to the right of its field when punched on the card. Decimal numbers may be located anywhere in their proper fields, provided the decimal point is punched. If the decimal point is not specified, the program will presume its location to be between the gth and 10th digits from the right side of the field. As indicated in Table XLIV, initial conditions are punched 4 to a card until N of them have been specified. Coefficients are punched 3 to a card, giving a total of N coefficient cards. The printed output of the program includes the values of PO, Pa,.. PN-1 and PN_- for every value of X. The maximum state of the system (N-l) is printed at the beginning of the output for each solution, along with the coefficients, for convenience of checking and identification. Table XLV describes the format of the output. 246

The time required to perform a complete solution depends, of course, on the number of equations to be solved and the desired number of solution points. It has been observed that the program computes 72 points per minute in the solution of 21 equations, which indicates its speed. The MAD statements which constitute the program are given in Table XLVI. TABLE XLIV MAKEUP OF INPUT DECK FOR ONE SOLUTION Card Column Number 1 18 19 36 37 53 -54 72 N X XFIN H Y(1) Y(2) Y(3) Y(4) Y(5) Y(6) Y(7) Y(8) A(l,l) A(1,2) A(1,3) A(2,1) A(2,2) A(2,3) A(N,1) A(N,2) A(N,3) l 247

TABLE XLV PRINTED OUTPUT FORMAT ighest state is [N-i], coefficients are [A(,l) ] [A(1,2)] [A(1,3) ] [A(N,l) ] [A(N,2) ] [A(N,3)] Results [X] [Po] [pi] [P2] [P3] [P4] [Ps] [PN-2] [PN-_] [ N-l] [x + H] [Po] [Pi] [P2] [P3] [P4] [Ps] *. [PN_2] [PN-1] [N-1 [xfin] [Po] [Pi] [P3] [[P4] [P5 ] * [Ps N [N-2] [PN-i] [N-1] 248

TABLE XLVI P] = [U] P] PROGRAM INTEGER NtJ DIMENSION Y(66), Q(66), A(198, D(1)),F(66) VECTOR VALUES NOTE = $ 528,23HPRESENT VALUE OF MEAN = F18.3*1 15H tMEAN SQUARE = F18.3*$ VECTOR VALUES INTIAL a $ I18,3F18.9*S VECTOR VALUES INCOND = $ 4F18.9*$ VECTOR VALUES COEFF = $ 3F18.9 *$ VECTOR VALUES D(1) ~ 2,1t3 VECTOR VALUES RMRKA = S17HlHIGHEST STATE IS 13,19H# COEFFICIE INTS ARE //*$ VECTOR VALUES HEAD - $ 8H4RESULTS //*$ VECTOR VALUES RMRKB = $ (S33,3F18.6)$* VECTOR VALUES RMRKC = $ lHOF18.3,5E18*5/1519,5E18.5)$* EXECUTE SETRKD. (NY(1),F(1)1tQXtH) START READ FORMAT INTIALt N,X*XFINtH READ FORMAT INCOND, Y(1)..*Y(N) no READ FORMAT COEFF, A(1t1).**A(N*3) ~- PRINT FORMAT RMRKAt N-1 PRINT FORMAT RMRKBt A(1ltle..A(N,3) PRINT FORMAT HEAD PRINT FORMAT RMRKC. Xt Y(1)**.Y(N) RKCOMP S = RKDEQ. (0) WHENEVER SeE. (2.0) TRANSFER TO NEXTPT THROUGH LOOP. FOR J= ltlJ*G*N LOOP F(J) = A(Jo1) * Y(J-1) + A(J92) * Y(J)+ A(J*3) * Y(J+1) TRANSFER TO RKCOMP NEXTPT PRINT FORMAT RMRKC.X#Y(1).o*Y(N)tF(N) WHENEVER X*GE-XFINTTRANSFER TO START TRANSFER TO RKCOMP END OF PROGRAM C-C* 0030

C.2. First-Passage Time Distribution The program which computes transient solutions for the exponential model will also compute the distribution on first-passage time to a given state. The necessary modification of the equations of detailed balance has been discussed in Section 4.5. The output of the program gives both the probability-density function of the first-passage time P(to,n = x) = PN-(X) and the probability-distribution function P(to,n < x ) = PN-l(X) An addition to the program has been made to provide a calculation of the mean and mean square of the first-passage time via the triangular rule. Otherwise the description given in C.1 applies to this program. C.3. Computation of Roots A program has also been written to compute the roots of the characteristic equation describing the transient solution in the exponential model (see Section 4.3.1.3). The program makes use of a library routine for computing the roots of a polynomial, which is assumed to have the form aoxN + aixN-l +...+ aNlx + aN (122) The input to the program is as follows: A(O) = real part of ao A(l) = imaginary part of ao A(2) = real part of a1 A(2N+l) = imaginary part of aN 250

The card format for the input is described in Table XLVII. The value of N for each solution is given on the first card of the deck; the largest allowed value is 49. The real and imaginary parts of each coefficient are punched on the same card, These are decimal numbers and may be located anywhere in the proper field if the decimal point is also punched. Otherwise, the program will assume the decimal point to be between the 9th and 10th digits from the left of the field. The output of the program is a listing of the real and imaginary parts of the roots. In general, roots of multiplicity greater than 2 cannot be found. TABLE XLVII INPUT FORMAT FOR ROOT COMPUTATION Card Column 1 53 18119 36 8 N A(O) A(1) A(2) A(3) 0 ~ ~ 0 A(2N) A(2N+1) The MAD statements are listed in Table XLVIII. Co4o Transient Solution for Erlang 2 Service Time The program that computes the transient state probability solutions with Erlang 'Type Two service-time distribution is more complex 'than that for the exponential distribution. The state of the system is described by two subscripts: n, the total number in the system, and s, the number of units in the last phase.22 However, the Runge-Kutta routine allows only 22The definition of s is somewhat different here from that in Section 4.2o 251

TABLE XLVIII ROOT COMPUTATION PROGRAM INTE6ER N DIMENSION A(100) R(100) VECTOR VALUES INPUT a S I3/t2F18*9)$* VECTOR VALUES DATA$S4H1N ~I5,33H * COEFFICIENTS A(0) TO A(N) 1ARE /S11,4HREAL*S14t4HIMAG /(1H s2E18.6)*S VECTOR VALUES RMRK a $ 6HOROOTS//*S VECTOR VALUES OUTPUT = $ 1H E2E18.6*$ VECTOR VALUES ERR1 s S8H ERROR 2*S VECTOR VALUES ERR2 a $8H ERROR 3$* VECTOR VALUES ERR3 a S8H ERROR 4*$ START READ FORMAT INPUT. No A(Ol**A(f2*N+1) PRINT FORMAT DATA, No A(O)...*A(2*N+1) PRINT FORMAT RMRK M t ZER2# (N.A#R) WHENEVER M-E. 1.0 PRINT FORMAT OUTPUtT R(O)#.R(2*N-1) TRANSFER TO START OR WHENEVER M.E. 2.0 PRINT FORMAT ERR1 TRANSFER TO START OR WHENEVER M.E. 3.0 I~X ~ PRINT FORMAT ERR2 \n TRANSFER TO START OTHERWISE PRINT FORMAT ERR3 TRANSFER TO START END OF CONDITIONAL END OF PROGRAM C.C. 0028

single subscripts. It was therefore necessary to write the equations of detailed balance in the program so that the state probabilities P(ns) could be referred to with single subscripts. The equations of detailed balance have the form: P(n,s) = anP(n-l,s) + bnsP(n,s-l) + cnsP(n,s) + dnsP(n+,s+l) (123) Implementing these equations in the program involved setting P(n,s) = Y(I), then P(n-l,s) = Y(I-n) n< M P(n-l,s) = Y(I-M-1) n > M P(n,s-l) = Y(I-1) P(n+l,s+l) = Y(I+n+2) n< M P(n+l,s+l) = Y(I+M+2) n > M and the equations were therefore written as F(I) = A(I,l)Y(I-J) + A(I,2)Y(I-1) + A(I,3)Y(I) + A(I,4)Y(I+L) (124) where: J = n for n < M J = M+i for n > M L = n+2 for n< M L = M+2 for n > M and A(I,1) = ans A(I,2) - bns 253

A(I,3) = cns A(I,4) = dns are the coefficients determined by the transition probabilities, In the program, the following quantities are used: N = total number of equations to be solved NMAX = maximum allowed state of the system M = number of service channels K = n, total number in the system. I, J, and L are used in the program as described above. The number equations to be solved N = M(M+l) + (NMAX-M)(M+l) 2 The format of the program input is described in Table XLIX. The limit TABLE XLIX INPUT FORMAT FOR TRANSIENT SOLUTIONS WITH ERLANG 2 SERVICE TIME Card Column 1 617 12113 18 19 36 37 54 55 72 N M NMAX X XFIN H Y(O) Y(l) Y(2) Y(3) Y(4) A(0,1) A(0,2) A(O,3) A(0,4) A(l,l) A(l,2) A(1,3) A(1,4) A(N-l,l) A(N-1,2) A(N-1,3) A(N-1,4) 254

TABLE L ] = [U] P] (ERLANG 2) PROGRAM INTEGER I.J.KL END.DELtM NMAX N DIMENSION Y(140) Q(140),F(140) P(20) DIMENSION A(560.D(1)) VECTOR VALUES D(l) a 2 4.4 VECTOR VALUES INTIAL = $ 3I6o3F18i9*S VECTOR VALUES INCOND a $ 4F18.9*S VECTOR VALUES NOTEA = $13H1SOLUTION OF 13,8H EQS OF 13,40H CH 1ANNEL QUEUEING SYSTEM WITH MAX STATE 13///S36,12HCOEFFICIENTS 1*S VECTOR VALUES NOTEB = $ SS54E18.5*$ VECTOR VALUES DATA z $SHOF18.3,5E18.5/(S195E18.5)*$ VECTOR VALUES HEAD a $8H4RESULTS*S EXECUTE SETRKD. (NNYtFQ.X.H) START READ FORMAT INTIAL, NoNMAX#M*X.XFIN#H READ FORMAT INCONDo Y(O)4.*Y(N-1) THROUGH STOP 1 FOR I =01 I.G.N -1 STOP1 READ FORMAT INCONDP A(I,1)-*-A(I,4) PRINT FORMAT NOTEANoMNMAX THROUGH STOP2tFOR I=Olt1,I.GN-1 STOP2 PRINT FORMAT NOTEB. A(Il1)*.A(I,4) PRINT FORMAT HEAD S-2*0 TRANSFER TO FIRST RKCOMP SRKDEQ. (0) FIRST END~O THROUGH LOOPsFOR KO,1.K*.GNMAX P(K)sO. WHENEVER K*G^M J=M+1 DEL END END = END + M + 1 OTHERWISE DEL=END ENDEND+K+ 1 JK L-K+2 END OF CONDITIONAL THROUGH LOOPsFOR IDEL19I.*E.END WHENEVER S.E.2.O0 TRANSFER TO NEXTPT F( I )=A( l)*Y(I-J)+A(I 2)*Y( I- +A(3)*Y( I )+A( I 4)*Y(I+L TRANSFER TO LOOP NEXTPT P(K) = P(K) + Y(I) LOOP CONTINUE WHENEVER S*.E*20tTRANSFER TO PROB TRANSFER TO RKCOMP PROB PRINT FORMAT DATAtX*P(O)..*P(NMAX) WHENEVER X^GE*XFINtTRANSFER TO START TRANSFER TO RKCOMP END OF PROGRAM 256

where J = n for n M J = M+1 for n > M JP = n for n M JP = M for n > M and the equations are therefore written F(I) A(I,l)Y(I-J-1) + A(I,2)Y(I-J) + A(I,3)Y(I) + A(I,4)Y(I+JP) + A(I,5)Y(I+JP+1) + A(I,6)Y(I+JP+2) (126) with A(I,1) corresponding to ans, A(I,2) to bns, etc. The definitions of N, NMAX, M, X, XFIN, and H are the same as in Co4. The input format is described in Table LI and the output format is the same as in Ca.3 MAD statements are listed in Table LII. 257

TABLE LI INPUT FORMAT FOR TRANSIENT SOLUTIONS FOR HYPER- EXPONENTIAL SERVICE TIME!I1 - - -* - Card Column 1 617 12113 18119 6736 37 54155 72 N NMAX M X XFIN H Card Column ____1 1_ 12 24 1 36i 486 6o0 72i Y(O) Y(l) Y(2) Y(3) (4) Y(5) Y(6) A(O,1) A(O,2) A(O,3) A(O,4) A(O,5) A(0,6) A(N-1,1) A(N-1,2) A(N-1,3) A(N-1,4) A(N-1,5) A(N-1,6) 258

TABLE LII P] = [U] P] (HYPER-EXPONENTIAL) PROGRAM INTEGER I,JoKJP,ENDtDELPM#NMAXN DIMENSION Y(140),Q(140) PF(140),P(20) DIMENSION A(840,D(1)) VECTOR VALUES D(1) 2 2.6,6 VECTOR VALUES INTIAL $S 316,3F18.9*$ VECTOR VALUES INCOND ' S6F12.9*S VECTOR VALUES NOTEA = $13H1SOLUTION OF I3,8H EQS OF 13*40H CH 1ANNEL QUEUEING SYSTEM WITH MAX STATE I3///S36,12HCOEFFICIENTS 1*$ VECTOR VALUES NOTEB S $S5,6E18.5*$ VECTOR VALUES DATA $1HOF18.35,E18.5/(S19,5E18.5)*$ VECTOR VALUES HEAD $S8H4RESULTS*S EXECUTE SETRKD. (NY#F,QXH) START READ FORMAT INTIAL, N,NMAX*M#X*XFINH READ FORMAT INCOND, Y(O)*..Y(N-1) THROUGH STOP1,FOR I =01,1tIG.N -1 STOP1 READ FORMAT INCONDs A(It1)&**A(I,6) PRINT FORMAT NOTEAN.MNMAX THROUGH STOP2,FOR I=019,I.G.N-1 STOP2 PRINT FORMAT NOTEB. A(I1t)1^ (A(I#6) PRINT FORMAT HEAD S=2.0 TRANSFER TO FIRST RKCOMP S=RKDEQ (O) FIRST END=O THROUGH LOOP,FOR K=OlK*GINMAX P(K)=0. WHENEVER K.G*M J=M+1 DEL=END END = END + M + 1 JP=M OTHERWISE DEL=END END=END+K+1 J=K JP=K END OF CONDITIONAL THROUGH LOOPFOR I=DELIl*lE.END WHENEVER S.E.2.0, TRANSFER TO NEXTPT F( I )A( I1 )*Y(I-J-1)+A( I 2)*Y( I-J)+A(I3)*Y( I +A( I 4)*Y(I+JP) 1+A(I,5)*Y(I+JP+1)+A( 16)*Y(I+JP+2) TRANSFER TO LOOP NEXTPT P(K) = P(K) + Y(I) LOOP CONTINUE WHENEVER S.E*2*0,TRANSFER TO PROB TRANSFER TO RKCOMP PROB PRINT FORMAT DATAXPP(O)**.P(NMAX) WHENEVER X.GE.XFINTRANSFER TO START TRANSFER TO RKCOMP END OF PROGRAM 259

DISTRIBUTION LIST (One copy unless otherwise noted) Rome Air Development Center Chief, Bureau of Ships Air Research and Development Command Main Navy Building United States Air Force Washington 25, D.Co Griffiss Air Force Base, Alabama Attn: Code 312 Attn: Project Engineer Attn: RAAP Office of the Chief Signal Officer Attn: RAALD Department of the Army Attn: ROZMSTT Washington 25, D, C Attn: RAIS, Mr. Malloy Attn: SIGRD (For Flight Lt. Tanner) AFPR Rome Air Development Center Lockland Branch Air Research and Development Command General Electric Company United States Air Force P. 0o Box 91 Griffiss Air Force Base, Alabama Cincinnati 15, Ohio Attn: RAOL, Captain Norton Chief AU Air Force Section Maxwell Air Force Base, Alabama Maag, Germany Attn: AUL P. 0. Box 810 ASD A.P.O. 80 Wright-Patterson Air Force Base New York, New York Ohio Attn: ASAPRD AFSC Andrews Air Force Base Chief Washington 25, D. C Naval Research Laboratory Attn: SCSE Washington 25, D.Co Attn: Code 2021 ASTIA 10 Arlington Hall Station Air Force Field Representative Arlington 12, Virginia Naval Research Laboratory Attn: TIPCA Washington 25, D. C Attn: Code 1010 Commanding Officer USASRDL Fort Monmouth, New Jersey Attn: SIGRA/SL-ADT 261

UNIVERSITY OF MICHIGAN 3 9015 02651 8335