Lecture Notes in Computer Science Edited by G. Goos and J. Hartmanis
35 W. Everling
Exercises in
Computer SystemsAna...
124 downloads
1741 Views
7MB Size
Report
This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
Report copyright / DMCA form
Lecture Notes in Computer Science Edited by G. Goos and J. Hartmanis
35 W. Everling
Exercises in
Computer SystemsAnalysis Corrected Reprint of the First Edition
Springer-Verlag Berlin.Heidelberg. New York 1975
Editorial Board" P. Brinch Hansen • D. Gries C. Moler • G. SeegmLiller • N. Wirth Author Prof. Dr, W. Everling institut fiJr Angewandte Mathematik und Informatik der Universit~it Bonn Wegelerstral]e 10 53 Bonn/BRD
Formerly published 1972 as Lecture Notes in Economies and Mathematical Systems, VoL 65 ISBN 3-540-05795-1 1. Auflage Springer-Verlag Berlin Heidelberg New York ISBN 0-387-05795-1 1st edition Springer-Verlag New York Heidelberg Berlin
Library 0£ Congress Cataloging in Publication Data
Everling, Wolfgang. Exercises in computer systems analysis. (Lecture notes in computer science ; 55) Bibliography: p. Includes index. 1. Electronic data processing. 2. System analysis. 3. Queving theo?y. I. Title. II. ties. T57.5.E84 1975 001.6'4 75-29431
So-
AMS Subject Classifications (1970): 6 8 A 0 5 CR Subject Classifications (1974): 4,0, 4.6, 4.9
ISBN 3-540-07401-5 Korrigierter Nachdruck der 1. Auflage Sprioger-Verlag Berlin Heidelberg New York ISBN 0-387-07401-5 Corrected Reprint of the 1 st edition Springer-Verlag New York Heidelberg Berlin This work is subject to copyright. All rights are reserved, whether the whole or part of the material is concerned, specifically those of translation, reprinting, re-use of illustrations, broadcasting, reproduction by photocopying machine or similar means, and storage in data banks. Under § 54 of the German Copyright Law where copies are made for other than private use, a fee is payable to the publisher, the amount of the fee to be determined by agreement with the publisher. © by Springer-Verlag BerLin • Heidelberg 1972, 1975 Printed in Germany Qffsetdruck: Julius Beltz, Hemsbach/Bergstr.
INTRODUCTION
Planning for, and installation of, a Data Processing System is a complex process. At a certain stage, decisions are required concerning the type and number of components which will form the Computer System. A certain variety of components is offered for choice, such as terminals for data entry and display, long distance communication lines, data storage units, data processing units and their interconnections. Also, operating procedures have to be choserL Let this set of decisions be called -
Sy st e m s
D e s i g n.
Its major criteria are
whether the system can adequately handle the expected workload, whether it can be expected to have adequate reliability and availability,
-
whether its cost is optimal and in an appropriate relation to the service produced.
An essential part of the design process is the
Systems
Analy
sis,
- the subject of
this course. It can be understood as the set of considerations and computations which establish whether a supposed system satisfies the design criteria. The results of Systems Analysis serve within the design process either by immediate backward computation, or in some form of triM-and-error procedure until the criteria are satisfied. The methods of Systems Analysis are largely determined by the random nature of many design d a t a : Volume and transmission times of 'long-distance data', record lengths, and locations in direct access storage, execution times of programs depending on conditions determined by the data,
- all these are variable and can at best be predicted statistically. Hence
probability theory plays a key role in Systems Analysis. Asynchronous operation, with the consequences of possible interference and queuing, is an essential technique in modern computer systems, - either enforced by the fact that data are presented to the system at unpredictable times, or as a result of hardware and program structures. Hence the considerable share which queuing theory takes within this course. The methods discussed in this course are briefly presented and referenced in the text. More space, however, is devoted to exercises and their solutions, - stressing the application of the methods. A Case Study has been chosen as a starting point. It provides numerical values for
IV the exercises ; it gives a motivation for the particular selection of methods for this course ; and, by the order in which the analysis could proceed for this case study, it also determined the order in which the methods are presented. The course can be studied with two different aims : The reader who is mainly interested in the applications of Systems Analysis will concentrate his attention on the exercises related to the Case Study (which are quoted by topic and number in the table of contents ) and will find some convenience in the numerical tables collected as appendix C med computations, he will find formulae and procedures in appendices
. Also, for programB and
E.
A reader with this aim should be familiar with the basic notions of calculus, probabilities
and statistics. Also, some familiarity with the available components and programming concepts is assumed. The other view would be at the theoretical reasoning that leads to the formulae and tables. Here, the reader may gain a deeper understanding of their applicability and a basis for further analysis of problems not discussed in this course. The mathematical notions referenced in this context are surveyed in appendix D
The notes are based on lectures given by the author at the
IBM
European Systems Research
Institute in Geneva, Switzerland. My sincerest thanks go to the Institute, its direction, faculty and students, for their encouragement and critical discussions.
Geneva December 1971
Wolfgang Everling
TABLE
OF
CONTENTS
The Case Study
Section 1 : Communications network design
6
Chapter 1 : Some statistical analysis of design data
7
Some estimates from random samples (8). Worst ease estimates of worldoad (10). A probability m o d e l for the arrival of requests (16). Some properties of the POISSON process (18). Chapter 2 : Line service times and utilization
24
Line service times (25). Expected line utilization (26). The effect of errors on service times and utilization (30). A message length for m i n i m a l overhead (82). Chapter 3 : First concepts and relations of Queuing Theory
35
Relations of first order for the single-server queue (36). A sufficient condition for convergence (38). Simulation of a single-server queue (39). Confidence intervals for the averages of queuing variables (41). Distributions of queuing variables (43). Chapter 4 : A first result on the single-server queue
46
The expected remaining service t i m e (47). The POLLACZEK-KHINTCHINE formula (47). An approximation for the distribution of wait times (50). Further results on the remaining service times (82). Chapter 6 : A general result on the single-server queue
56
Chapter 6 : T e r m i n a l systems with polling
62
C y c l i c polling of terminals (62). The probability assumptions (64). The expected cycle t i m e (65). An approximation for the variance of cycle times (66). The expected wait t i m e (68). An improved approximation for the conditional c y c l e t i m e (70). The arrival pattern for conversational use of terminals (73). Generaltzed terminal load and polling lists (74). A rough approximation for T w (77). Chapter 7 : Some results on queues with priority disciplines General notions of priority disciplines (78). The probability assumptions (79). Non-preemptive discipline (80). The p r e e m p t - r e s u m e discipline (85).
78
Table of contents, cont'd. Chapter
8 : Some applications of Markov processes
88
Queuing processes with Markov property (89). Markov queuing processes with constant intensities (91). The limit probabilities (96). The wait time distribution (99), Section 2 : Computer center analysis Chapter
9 : C o r e buffer requirements
102 104
The probability assumptions (105). Expectation and moments of the buffer allocation (106), Probabilities to exhaust the buffer pool (107). Chapter 10 : Service times of direct-access storage devices
112
Probability assumptions (lla). Expectation and moments of the seek time distribution (114). Alternating access to an index and data (117). Chapter 11 : Q u e u i n g for data accesses
118
Queues with finite population (119). The probability assumptions (120). Relations between utilization and queuing variables (121). The relation between utilization and return rate (129), The throughput ratio for given utilization (131). Chapter 12 : F i n a l remarks on the computer center analysis
133
Waiting for the CPU as server (135). Waiting for a task as server (t39). Message response times (142). Conclusions (143). Section 3 : Further results of Queuing Theory Chapter 13 : Imbedded Markov chains of some queuing processes
145 146
The transition probabilities (149). Limit probabilities of the imbedded chain(150) Examples for the rate of convergence (153), Lag correlations in the chain (157), Chapter 14 : L i m i t utilization and wait time distributions
159
Limit probabilities at a random time (159). Some evidence about wait time distributions (160). Wait time distributions (163). Appendices : A - Remarks concerning the notation (167). B - Collected formulae of Queuing Theory (168). C - Tables for some formulae of Queuing Theory (170). D - Mathematical reference material (176). E - Computing procedures (182).
T a b l e of contents,
cont'd.
Application-oriented exercises, Subject
Exercise nr.
Distribution of message lengths
1 , 2
Worst case arrival rates
3
Distribution of line service times
8 , 9
28
Line service times affected by errors
13
, 14
33
Times waited for a line, first result
19
, 21
48,50
Times waited for a line, with cyclic polling
27
, 30
Times waited for a line, with output priority
37
Times waited for a terminal
47
Core buffer requirements for teleprocessing
49,
50 , 51 , 52
108
Seek times of direct access storage devices
54
55
114-115
Times waited for a data channel
56
57
122-124
Times waited for a direct access storage device
58
59
124
Utilization of the Central processing unit
60
61 , 62
134
Times waited for the CPU
63
64
137
Times waited for a program
65
66
140
CPU
page II
, 4
, 6
12,20
, 31
67,70,73 81
, 48
96
REFERENCES Books : Bodewig, E.
Matrix Calculus
Brunk,
An Introduction to M a t h e m a t i c a l Statistics,
H.D~
Cox, D . R . ,
Lewis, P.A.
North Holland Publishing Co.
The statistical analysis of series of events,
Martin, J.
Design of Real T i m e Computer Systems,
Parzen, Saaty, Takacz,
E. Th. L. L.
Widder, D.V.
Blaisdell Publ.
Co,
Methuen
1959 1963 1968
Prentice Hall
1967
Stochastic Processes,
Holden Day Inc.
1962
Elements of Queuing Theory
McGraw - Hill
1961
Introduction to the Theory of Queues,
Oxford Univ. Press
1962
The Laplace Transform
Princeton Univ. Press
1946
(several other equivalent references might replace
Bodewig, Brunk,
Parzen,
and Widder).
R E F E R E N C E S , cont'd.
Other publications : Chang, W.
Single server queuing processes in computing systems, IBM Systems Journal no. 1
Cooper, R.B.
and
Murray, G.
1970
Queues served in c y c l i c order
The Bet1 System Technical Journal no. 3 Kendall, D.G.
1969
Stochastic processes occurring in the theory of queues and their analysis by the method of the imbedded Markov chain Annals of Math. Statist.
Khintchine, A.Y.
24
1953
M a t h e m a t i c a l theory of a stationary queue (in Russian) Mat. Sbornik
no. 4
1932
Konheim, A.L.
Service in a loop system
(to appear in
Journal of ACM)
Leibowitz, A.
An approximate method for treating a cIass of multiqueue problems IBM Journal of Research and Development
Lindley, D.V.
1961
The theory of queues with a single server Proc. Cambridge Philos. Soc.
Mack, C.
1970
and
Murphy, T . ,
Webb, N.L.
48
1952
The efficiency of N machines unidirection-
ally patrolled by one operative when walking t i m e and repair times are constark "
2
Jour. Royal Statist. Soc. B19 no. 1
1957
A further paper adressing variable repair times continues the previous reference in the same issue.
Mises, R.v.
and
Pollaczek, F.
Geiringer, H.
Zeitsehr. f. angew. Math. und Mechanik
Uber eine Aufgabe der Wahrscheinlichkeitsrechnung
I-II
Mathematisehe Zeitschrift Spitzer, F.
1930
The Wiener-Hopf equation whose kernel is a probability density Duke M a t h e m a t i c a l Journal
Syski, R.
1967
Determination of waiting times in the simple delay system A T E Journal
Takacz, L.
1929
2
13
1957
On certain sojourn t i m e problems in the theory of stochastic processes Acta Math. Acad. Sci. Hungar.
1957
THE
The of
DUMMY
CASE
STUDY
Company, with headquarters at Geneva, is running five offices in the cities
FRA, KOP, LON, MIL, PAR; an extension to at least three more, viz. AMS, MAD, VIE,
is planned for the next year. The company's activities require fast response to customer calls and therefore frequent and fast reference to a common data base. The currently used technique of communicating with headquarter personnel through the public telex and telephone starts to create unbearable waittimes and errors. The"president, Mr. L. O. Okahead,
eagerly grasped the idea of a Communications Based
Computer System to which terminals in all offices are connected. He established a study group in order to define the functions of the system, and to specify the expected amount of data to be transmitted and processed. As result of their work, the study group presented the following descriptions and statistics :
Data base : T w o types of data have to be referenced, viz.
CUSTOMER
and
ITEM
descriptions. Cur-
rently there exist written files which contain 47,000
CUSTOMER
records consisting of
20
characters identifying key and vary-
ing data length ( 150 characters m i n i m u m , 380 characters average ) 18,000
ITEM
records consisting of
10
characters identifying key and
racters data. This file has a yearIy growth of
180
cha-
8 %.
Terminal operation in the offices : References to the data base are caused by customers arriving at, or calling, the office. These are first routed to the next free terminal operator. While answering the customer, the operator keys in and transmits some data base references as the customer's request requires. Also, he receives some response from the computer center. There are four types of customer's requests, with different requirements for data base references and response time. They are listed in the following table.
Types of customer's requests CR1
ITEM inquiry
asking for information about a particular item, terminal input : identification of response via terminal : part of
CR2
ORDER
ITEM and question asked, ITEM description.
ordering some operations with several terminal input : identification of
ITEMs,
CUSTOMER, several
ITEMs
and operations, response via terminal : one short acknowledgement. CR3
NEW customer
presenting a new customer's description, terminal input : a
CUSTOMER record of
150 characters,
response via terminal : one short acknowledgement. CR4
D E L E T Ecustomer
causing deletion of a
CUSTOMER record,
terminal input : identification of
CUSTOMER,
response via terminal : one short acknowledgement.
Message formats : Some experience with the current telex operation suggests the formats of 24 characters for
identification of
CUSTOMER,
36 characters for
identification of
ITEM and question or operation,
48 - 72 characters for 24 characters for
the response with part of an
ITEM description,
one short acknowledgement.
Duration of terminal use : The time it takes to enter a message at a terminal is determined by the message format and by the average key-in rate of
3
characters per second. An experiment which simulated the
terminal keyboard by a typewriter showed that the total time for a customer's request is 3
times the key-in time for inquiries,
1.6 times the key-in time for the other three request types. In this experiment, no delay by telecommunications and processing was considered.
3 Workload of the offices : During the month of June 19xx which had 20 working days, the number of customer's requests was observed at each office, viz. GE
25,000
FRA
32,800
KOP
15,800
LON
31,700
MIL
21,600
PAR
28,200
A year earlier,
requests
requests
all these values were about
have the same load as
MIL , while
Some more detail was observed at least active day had a load of hour of a day,
20 %
MAD
GE
1490
1055
ITEMS
470
NEW
210
DELETE
are estimated equivalent to
6%
4 - 6
in
24 %
7 - 10
in
50 %
Ii
15
in
15
16 - 20
in although
KOP.
The most active and the
requests, respectively. During the peak The distribution of the request
in an order was
in
tions in proportion
VIE
is estimated to
orders
1 -3
distributions,
and
AMS
inquiries
7,500
These
less. The location
during the same month. and
16,820
Finally, the number of
9 %
of the day's workload was handled.
types was
-
:
of the orders
%
5 %
observed
of the orders in
GE
only,
are supposed to hold for all other l o c a -
with their request numbers.
Message processing in the computer center : The different types of customer's requests require different processing by the computer center, which can be described roughly by five types of processing, PRO
PR4 :
PRO
applies to atl incoming requests and consists in logging the request as entered
and in a first anatysis of request type and format. PR1
locates and reads a record from the
ITEM
file as identified by the request
then sends part of this record as a response to the terminal. PR2
locates and reads a record from the
CUSTOMER
file as identified by the
request, then locates and reads several records from the by the sequel of the request. Each its place. Finally, the
ITEM
CUSTOMER
ITEM
file as specified
record is updated and written back into
record is also updated and stored, and a short
acknowledgement is sent to the terminal. PR3
writes a new record into the
CUSTOMER
file and sends a short acknowled-
g e m e n t to the terminal. PR4
locates and reads a record from the
CUSTOMER
file as identified by the
request, flags it for later detetion and writes it back into its place. A short a c knowledgement is sent to the terminal.
A p p l i c a t i o n - d e p e n d e n t processing times : The capacity of the computer center will be devoted partially to the control of the c o m m u nications network and the data base. The time which the central processing unit will spend on these functions depends mainly on the choice of general programs and access methods. It is therefore only the processing times dependent on the particular application which have been estimated with reference to one certain type of central processing unit. The estimates are, in milliseconds, for the types of processing PRO
30, of which the last
PR1
10 before reading, 10 overlapping the read, 20 after the read
PR2
15 before the 10 before each
10
CUSTOMER ITEM
ITEM
80 before writing back the
PR2, PR3 and PR4
read, 28 overlapping it
read, 10 overlapping it, 10 after it and
before writing back the
PR8 and PR4
may overlap the logging
record
CUSTOMER
record,
t 0 before the first data base reference 5 to finally form the short acknowledgement.
All times quoted are subject to a random variation of
+_ 40 %.
This completes the results c o l l e c t e d by the study group. As a minor item, they noted that of the currently rences. Further remaining
18,000 5,400
10,800
ITEM records a certain subset of
1,800
ITEM records are adressed by a further
ITEM records are adressed by only
observations were y e t made for the
CUSTOMER
absorbs 40 %
50 %
of ali r e f e -
of all references. The
10 % of all references. No similar
file.
After a presentation of the above descriptions and statistics by the study group, the president decided that a Systems Design should be based on these data, and set forth the further requirements that -
the offices planned to date and the growth' p r e d i c t a b l e for the next three years should be accounted for
-
a calling customer should g e t switched to an operator within at most one out of
-
10
20 seconds except for
calls
also, the t i m e from the last key stroke for a message to printing the first c h a r a c ter of a response, if any, should not exceed the preceding k e y - i n t i m e except for the same small fraction as above.
He understood that every effort would be made during the Systems Design to o p t i m i z e the cost of the system and to assure a satisfactory a v a i l a b i l i t y .
Section COMMUNICATIONS
1 NETWORK
DESIGN
As a guidance through this section the phases of Communications Network Design are stated below in the form of an operational instruction, with references to the chapters discussing the a p p l i c a b l e methods of analysis. Note that chapters 3 and 5 are of more general nature.
GET DATA
about
Locations, i . e .
Terminal use, i . e . Line use,
i.e.
their geographical situation
frequency and duration, per location
message frequency and length, per location
ESTIMATE
worst-ease frequencies, distributions of duration and length
SELECT
Terminal type, implying time characteristics, e . g .
COMPUTE
Terminal workload per location
chapter
1
transmission rates
required number of terminals per location for l i m i t e d wait t i m e
chapter
8
chapter
2
If necessary, review the selection and repeat the analysis. Else SELECT
Line type, implying time characteristics, error rates, line control procedures
COMPUTE
Line workload including error overhead, per terminal Bounds on terminal number and workload per line, for l i m i t e d wait t i m e
chapters
4, 6, 7
association of all terminals with lines, observing the above bounds and minimizing the total line cost. If necessary, review the selection and repeat the analysis. END
Methods for minimizing the total line cost are not discussed in this course. They have to solve a finite combinatorial problem, the data for which are the geographical description of the locations, the a p p l i c a b l e line cost tariff, and the restrictions from the wait t i m e l i m i t . T r i a l - a n d - e r r o r methods of stepwise changes in the network have been used successfully for programmed computation.
Chapter
1 :
Some statistical analysis of design dat a
The majority of the Systems Design Data as e x e m p l i f i e d by the Case Study, are statistics of variables, the individual values of which are unpredictable. An assumption basic to all systems analysis is that these variables can at least be described by probability laws, and hence are random variables in the sense of Probability Theory. As a consequence,
those design data are themselves random variables and can only give
estimates for the assumed probability taws. The problems arise, which are the best estimates derivable from the design data,
and
which confidence one may have in them. The systems designer has a further typical problem. He usually has to plan for the worst case or rather for a case such that a worse case will not occur with more than a specified few percent probability. This poses the problem of e s t i m a t i n g those values of certain design data which have a specified - usually high - probability of not being exceeded. Satisfying solutions to these problems exist only if certain general properties of the probability laws under study are known. A survey of the case study data shows in fact onIy a smati n u m ber of typical statistical situations, with simple general properties. The first situation, which is the simplest in its statistical consequences, generates a sequence of random variables independent of each other, viz. the type of request presented to some terminal operator, the number of ITEM
references in an order
Of a similar nature are the random variables which are a function of one or more independent random variables, viz. the duration of a terminal use or of an application processing, both functions of r e quest type and possibly the number of items. The second situation is that of a sequence of random variables which might have some correlation to the neighbours in the sequence, viz. the particular
ITEM
record to be accessed, correlated if a customer states them
in, say, alphabetic order the length of a message to be transmitted, correlated if a long message has an i n creased probability to be followed by another long one. Such situations either require a more detailed analysis than presented in the case study; or the possible correlation is neglected, reducing the situation to the first type. A third situation is the t i m e - d e p e n d e n t trend, with random deviations from it. Examples are the data file sizes, growing linearly or exponentially with time, and showing unimportant deviations from this trend the daily numbers of requests, with a similar trend, and with significant deviations which appear as a m u l t i p l i c a d v e factor to the trend value. Correlation between neighbouring deviations may exist but is neglected unless analysed closer. Thus, the deviations from the trend create another situation of the first type.
Some estimates from random samples. Observed values
v
= ( ~?1' ~2 . . . . . ~)N )
of
N
random variables
v 1, v 2
. . . . .
vN ,
all with the same probability distribution Fv(X)
=
Prob ( vn = x ),
and mutually independent, - constitute a random sample. ( For this and some of the following concepts, any textbook on Probabilities and Statistics, e.g.
Brunk1, may serve as refe-
rence. ) A random sample can be described by an empiric distribution function F~?(x) which, for each
x, equals the fraction of observed values
pression
(9 n ~ x ) is understood to have the value
9n 1
relation does not hold, then a formal expression for 1 Fg(x)
-
N
not exceeding
x. If the relation ex-
if the relation is true, and F~7(x)
0
if the
is
N 7 n = 1 (~n ~= x)
The empiric distribution gives the same information as the list
9
of observed values. It is
helpful only because it permits a general statement about estimates from random samples :
The v a l u e of
F9(x)
at any particular
x, and all m o m e n t s about constant c,
O3
E( (9 - c) k )
=
, p (x - c) k dFg(x )
;
k = 0,1,2 ....
-(30
are 'best a v a i l a b l e ' estimates for the corresponding values and m o m e n t s of the u n known distribution Hence,
Fv(X).
the e m p i r i c distribution gives the closest picture of
Fv(X) that can be derived from
the observed values. T h e closeness increases with increasing s a m p l e size
N.
the e m p i r i c m o m e n t s are of course written as the sums which in fact they
For computations, are, viz.
1
E( Especially, foi
(7
k = 1
- c) k )
=
E(¢) E(v)
t i m a t e the v a r i a n c e
V(v)
N =
~
n ~ 1 (vn
N
-
c)k
c = 0 , the ~ample average
and
estimates the m e a n
-
1
N
N
n=l
n
k = 2
and
Fv(X). For
of of
Fv(X). However,
g(v)
c = E(v),
E( (g -E(v))
2
)
would es-
is usually not a v a i l a b l e to c o m p u t e
this estimate. The sample v a r i a n c e E( (¢ - v--)2 )
has the e x p e c t a t i o n s a m p l e average
V
=
V(¢)
(1 - l/N) V(v) ,
1 N
-
N n~l
- slightly less than
(on - v)2 V(v)
because the use of the
somewhat outbalances the observed variations. Therefore, t v(v)
/(1-*/N)
is preferable as e s t i m a t e of
-
N
N - 1 n~l= (°n" v)2
V(v).
The term 'best a v a i l a b l e ' estimates is used in ~ i s context for the more precise term ' c o n sistent unbiased' estimates of e . g .
Brunk1. In fact,
the r a n d o m variables of interest in sys-
tems analysis h a v e by necessity f i n i t e values and variance, The case study data are,
as happens frequently in practice,
as required for ' c o n s i s t e n c y ' . an i n c o m p l e t e presentation of the
underlying observations. The e m p i r i c distribution or e q u i v a l e n t i n f o r m a t i o n is given only for
10 the request type, the number of items in an order, and the access probabilities of certain ITEM
subsets.
The average and a range are given for the daily request number and for the a p p l i c a t i o n - d e pendent processing times. Averages only, some of them based on not more than one or two observations, are stated for file sizes, the ratio the ratio
terminal use duration / key-in t i m e ,
and
peak hour load / daily load.
Confidence intervals for estimates. Any estimate is a random result and a c c e p t a b l e only with l i m i t e d confidence. For a general discussion of this confidence concept, the reader is referred to, say, Brunk 1. In the context of this case study, it is assumed that the study group took care to assure a sufficient confidence in their results. Only the confidence in estimates of arrival rates will be discussed l a ter in this chapter.
Worst case estimates of workload. A computer system usually requires more or more expensive components as the workload i n creases. The designer will therefore plan for the lowest assumed workload which still gives him a probability of at least
p
that it is not exceeded. If the workload has a distribution
Fv(X), the worst case value to some given Fvl(p)
=
rain
~ x
p
can be denoted as ;
Fv(X) = p it is a l s o called the lowest
100 p - t h percentile point of
Fv(X).
The inverse function
is defined by the above equation in a form adapted to the fact that
Fv(X)
F;l(p)
is a probability.
distribution. If an empirical distribution
F~(x)
estimates for the percentiles of
is given as an estimate of
N
p ~
0
is one of the observed values
observation estimates the
F~?(x) , - i t is a stepwise in-1 its percentile F~ (p) for x = ~?n'
Fv(x ). Due to the nature of
creasing function, with steps at the observed values any
Fv(X), its percentiles serve as
~n" Specifically, the m - t h largest vaiue out of
100 p - t h percentile if
11
m
z--N If the largest v a I u e
9ma x
such that
m-I
{
p
~
IN
was observed only once,
it is a p e r c e n t i l e e s t i m a t e for
all p
I 1 - _
p
•
~
1
;
N
in other words,
the probability that a further observation
observed so far, is e s t i m a t e d as
w i l l r e a c h or e x c e e d the m a x i m u m
t/N.
Note that for i n d e p e n d e n t random variabies
v, v 1 . . . . .
vn
with continuous distribution
of any shape,
Fv(X)
1 Prob(v
~
max(v 1. . . . .
vN )
)
= N+I
Then,
a m a x i m a l observed v a l u e would e s t i m a t e the p e r c e n t i l e with p = 1 - i / ( N + 1) .
Another situation frequently arises in which only the m e a n and the v a r i a n c e of known or e s t i m a t e d .
E f f i c i e n t p e r c e n t i l e e s t i m a t i o n then requires an assumption about the g e -
neral functional form of
Fv(X). Appendix
D
terial to distributions useful for this purpose. show the p a r t i c u l a r i m p o r t a n c e of
Exercises 1
contain s o m e r e f e r e n c e m a -
Examples arise in l a t e r chapters,
which w i l l
N o r m a l and G a m m a distributions.
Plot the e m p i r i c distributions of the request type and of the n u m b e r of T h e s e Case Study D a t a appear on p a g e
F r o m the two distributions referred t o
of the input message l e n g t h in characters, request.
, pages 176 ff.,
.
rences in an order. 2
Fv(X) are
3 .
in e x e r c i s e
1
A - every
CUSTOMER
B - within e a c h request, as fit c o m p l e t e l y into a buffer of
120
find the e m p i r i c distribution
and the a v e r a g e n u m b e r of messages g e n e r a t e d per
S o m e message formats are Case Study D a t a on p a g e
assumptions :
ITEM r e f e -
and
ITEM
as m a n y
2
. Consider the f o l l o w i n g
r e f e r e n c e is a s e p a r a t e message ; CUSTOMER
and
ITEM
references
characters are c o l l e c t e d into one message ;
C - all data for e a c h request are c o l l e c t e d into one m e s s a g e . Also find the e m p i r i c l e n g t h distribution for output messages,
and for B and output together.
For e a c h distribution c o m p u t e the first three m o m e n t s ( see p a g e
9
, with c = 0 ), and V(9).
12 3
Assume a trend and deviations ha(t)
=
e
ct
v(t)
for the number of requests arriving at the computer center on day
t.
The deviations
on different days are considered as independent, but all with the same distribution varying with
t . Estimate, for a date
t
which is
3
v(t)
Fv(X) not
years later than the Case Study, the
expected value and the 95-th percentile of na(t ). 4
Which worst case daily number of input and output messages results from exercise 3
combined with the cases
A - C
of exercise
2 ?
How many of these arrive in the peak
hour ?
Solutions. In the first example, a numbering of the request types, say, 1 through
4 is used.
A table is formed which lists the type values, the number of observaHons with at most this type, and this number divided by the total N. 1
16,820
0.673
2
24,320
0.973
3
24,790
0.992
4
25,000
1
This table describes the empiric distribution completely. In the second example, only the values of the empiric distribution for some ITEM numbers are reported, viz. 3
0.06
6
0.30
10
0.80
15
0.95
2O
1
Values for the other approximated by linear interpolation.
ITEM
numbers could be
13
2
The computations which lead to the empiric distributions and the average numbers
of messages per request are presented on the next page in a tabular form. They are carried out in relative frequencies per request, i.e.
all numbers of observations are divided by the
total number of requests. Thus, all results remain in a convenient range. A first step computes the frequencies with which the customer request
( C R ) types 1, 3, and 4
and the different possible item numbers within type 2 occurred. Then, for the different cases input, A - C
and
Output, the multiplicity with which each occurrence generates messages
of a certain length is noted• E.g. ces generates i.e.
108
1
message of
in case
24 + 36 + 36
characters, and finally
only the lengths
48, 72
B, a request of type
1
=
96
message of
2
with
2
messages of
characters,
36
9
item referen3 x 36,
characters. For output, occurrence of
with equal frequency is assumed as a simple approximation.
Total frequencies ( p e r request ) are found for each possible message length by collecting occurrence frequencies multiplied by the multiplicity applicable for this length. E.g. for Input case B, the length of
108
characters has the total frequency
.024 ( 1 + 1 ) + . 0 3 7 5 ( 1 + 2 + 2 + 2 ) + . 0 0 9 ( 3 + 3 + 3 + 4 + 4 ) + . 0 0 3 (4-+ 5 + 5+ 5+ 6 ) The multiplicities used here are not all shown in the table, nor are all computations. The sum of the total frequencies taken over all possible message lengths
gives the total
number of messages divided by the number of requests, in other words the average number of messages generated per request. Finally, a division of all total frequencies by their sum leads to frequencies relative to the number of messages• These values in the last column of the table determine the empiric distributions of message lengths. For the computation of moments xm
which was observed
the factor
nm / N
nm
E( 07 ~ c) k )
times contributes a summand
•
243
+
.907
" 363
Input case A +
.005
• 1503
9
, note that a value
n m (x m - c) k / N , and that
is the relative frequency of occurrence of
moment of the message length for • 088
as defined on page
x m.
Thus, e.g.
the
3 rd
is computed (with c = 0, k = 3 ) as :
61. 727
.
A further table on the overnext page gives the complete results of a programmed computation. The sample standard deviations, defined as the square root of the sample variance, are added for comparison with the averages (with which they have common dimension) .
14 T y p e CR
1
f r e q u e n c y . 672
3
4
.019
.008
.3
items
1
frequency
• 006
2
3
4
each
5
.024
6
I
each
FormatIm u l t i p l i c i t y Input,
8
17
9
• 0375 e a c h
total
case A 1
24 36
1
for e a c h request
equals the a b o v e i t e m s n u m b e r
150 a v e r a g e number of m e s s a g e s / r e q u e s t : Input,
.308
• 088
3.198
• 907
.019
• 005
3.525
case B
24 36
008
.005
761
437
006
003
ere
114
065
1
60 72
1
96
1
1
1
108
1 1
1
1
1
1
294
•
1
1
1
2
2
539
.310
019
.011
150 a v e r a g e number of m e s s a g e s / r e q u e s t : Input,
frequency relative
169
1. 741
case C • 008
24 36
1
150 24 + 3 6 m
occurs
for
m
items,
• 672
same as
.019
total
with above frequencies 1,000
Output .328
24 48
.5
• 336
72
.5
• 336
same as
total
I. 000
15 Moments of empiric message length distributions
Average
Case
2ndmoment
3rd moment
Sample variance,
standard deviation
Input, A
35.6
1347
61,727
B
72.1
6334
621,875
1142
33.8
C
125.4
38,943
16,558,246
23,226
152.4
48.2
2705
167,105
Output
Now, consider the combined messages for
82.4
9.1
382.4
Input case B
19.6
and
Output. The total frequencies
for each possible message length are found by addition, leading to for the length 24,
to
.336
other values remain as for
simply for the length 48, and to
Input
.008 + .328
=
.336
.450 for the length 72. The
B. The new sum of total values is
1. 741 + 1. 000 = 2.741.
Frequencies relative to the combined number of messages can again be found by a division, and moments can be computed from them. However, it is simpler to use the fact that each of these values i s . a linear combination of the corresponding values from
Input B, with the
weight factor
1 / 2.741.
1. 741 / 2. 741,
and from Output, with the weight factor
the frequencies are for length
The moments are
24
36
48
60
72
96
108
150
• 123
.278
.123
.002
.164
.107
.197
.007
Average I 2rid moment
13 rd m o m e n t
i
I
I
63.3
Thus
5010
:
:
455,960
The sample variance is not a linear combination of the above values. It is found from the general relation v(¢) and has the value
3 equals tions of
Let
t
=
E(¢2)
_ -v2
997,1 . Its square root, the sample standard deviation,
=
0
averaged over
v
can hence be estimated from observa-
The total daily request number, including 20
days. This estimates
ed from the Iargest of
31.6 .
denote the date of the case study observations. For this date, na(0 )
v(0). Expectation and 95-th percentile of na(0 ).
is
20
E(v).
The
daily values observed at
1490 / 1280 -fold, of the mean value. For the mean
AMS,MAD and VIE
95-th percentile GE
F j I ( . 95)
was
10410
is estimat-
as a certain multiple, viz. the
10410
this multiple is
12409 .
16 The constant a value of
c
is estimated from the observation that one year earlier,
9 %
less, i . e .
of
.91 . Then,
the factor
three years later its value will be
e
ct
• 91-3
had
= 1.33
A worst case assumption for the total daily request number is therefore 12409 • 1.33 a value which is 4
58 %
=
16467
,
higher than the observed average.
Average numbers of messages per request were found in exercise 2 . Multiplied
with the worst case request number of exercise 3 , they produce the following numbers : From :
arise messages daily :
in the peak hour :
Input, A
58,046
11,609
B
28,700
5740
C
16,467
3293
Output
16,467
3293
Input B and Output
45,164
9033
It is on this peak hour, worst case workload that later exercises will be based. It should be noted that this approach neglects another effect which possibly increases the future workload significantly, and is sometimes referenced as the 'turnpike effect' :
A good highway attracts
traffic. Similarly, an efficient Data Processing System may attract an unforeseen workload. The case study gives no statistical basis for estimating such an effect.
A probability model for the arrival of requests. The hourly number of requests is still a very summarizing description of how the requests are placed in time. It only states the number tively long t i m e interval from
0
to
Na(0, T)
of requests expected m arrive in a
rela-
T, say.
For an analysis of the expected utilization of system components,
this information is suffici-
ent. However, as the discussion in later chapters will show, for an analysis of wait times and response times,
a more detailed description is required. In the case study, where no further
information is reported, assumptions.
this detailed description must take the form of some plausible
17 A plausible probability model for the arrivals of customer requests is provided by the famous POISSON process : Let arrivals ~ [ 0
!
/
!
X | to
denote the n u m b e r of arri-
vals in a t i m e interval ~
I
na(t 0 , t l )
I
For every i n t e r v a l v t1
I
t'- t "F
to <
(t0, t l ]
t
~<
t 1.
this is a r a n -
dom v a r i a b l e with integer values
j = 0,1,.
and with probabilities na(t O, tt)
=
2 Pa, j(t0' tl)
Since in
=
Prob(
na(t 0, tl) = j
) .
(0, T) , say, one can choose an infinity of intervals, accordingly an infinity of ran-
dom variables is considered here. Now assume that the
na
in any n o n - o v e r l a p p i n g intervals are i n d e p e n d e n t r a n d o m variables;
this is a plausible assumption if the arrivals are caused by i n d e p e n d e n t customers. -
the probabilities
Pa, j
depend only on the duration
t I - t O of the i n t e r -
val considered; this is a plausible assumption for a t i m e period
(0, T) , say, over which the
customers as a whole have a constant interest to p l a c e requests,
e.g.
-
the probabilities
babilities, viz. Pa, j (t0' tl)
Pa, j
have more specifically the values of POISSON pro-
[ Ra (t l - t 0 ) ] j j ,
=
e
this is a plausible assumption if the requests during large n u m b e r
N
of customers,
for a peak hour.
- Ra ( t l - t 0 )
(to, t l )
with some constant
Ra;
are p l a c e d by several out of a
each customer h a v i n g i n d e p e n d e n t l y the same probability to
p l a c e or not to place his request. p
If each of the -
N
customers has the probability
Ra (t 1 -t 0) N
to arrive, the probabilities that e x a c t l y ,~ Pa, n(t0 ' t 1)
=
n
arrive are b i n o m i a l , viz.
N ) pn (1 - p)N-n (n
;
n = 0,1
These probabilities have the above POISSON p r o b a b i l i t i e s as l i m i t s for ed in exercise
.....
N
N~
5 , and are well approximated by these l i m i t s even for small
.
oo , as discussN.
Arrivals satisfying these three assumptions are said to form a POISSON process.(E.g.
Parzen 1)
18
S o m e properties of the POISSON processes T h r e e g e n e r a l properties of the POISSON processes w i l l find a p p l i c a t i o n in this course.
The
first of these concerns the statistical b e h a v i o u r for long intervals. POISSON probabilities with s o m e p a r a m e t e r are known (see appendix h a v e m e a n and v a r i a n c e e q u a l to this p a r a m e t e r . has POISSON probabilities with the p a r a m e t e r Na(0, T) Therefore,
the number
The n u m b e r
Ra T
D
, p a g e 178 )
na(0, T)
of arrivals
V( na(0, T) )
=
=
ha(0 , T) /
of arrivals per t i m e unit,
T
in (0, 7)
and h e n c e the e x p e c t a t i o n and v a r i a n c e
= v
to
Ra T . has the e x p e c t a -
tion E(v)
=
Na(0, T) / T
V(v)
=
V( na(0, T)
=
Ra
and the v a r i a n c e Ra /
T .
T
a b l e ' e s t i m a t e for the constant
Ra which is therefore c a t t e d the m e a n arrival rate or the Exercise
Hence,
=
This v a r i a n c e tends to zero as
intensity of the POISSON process.
increases.
) / T2
6
an observation of
v
is a 'best a v a i l -
discusses c o n f i d e n c e intervals for its e s t i m a -
tion. The second property concerns the t i m e i n i n t e r - a r r i v a l times
tervals b e t w e e n c o n s e c u t i v e arrivals, c a l l e d inter-arrival times
ta, k ;
k = 1,2 ....
These are easy to observe and lend t h e m 11
I
i
I
o
selves better to a statistical analysis than
I
T the numbers of arrivals in the infinity of possible t i m e intervals
Let
to
be the t i m e of an arrival.
greater than s o m e fixed v a l u e i.e.
The probability that the t i m e to the n e x t arrival is not
x = t1 -t o
equals the probability that
na(t0, tl)
is no_.!t 0,
it is i
Thus,
(t 0, tl) .
Pa, 0 (to' tl)
=
1
e" Ra x
the t i m e to the n e x t arrival is a r a n d o m v a r i a b l e Fa(X )
=
Prob(
ta ~
x
)
=
1
ta
with the probability distribution
-
e- R a x
,
19
an exponential distribution ( s e e also
appendix
D
, page 176 .) Furthermore, all inter-
arrival times are mutually independent since, due to the assumed" independence of the arrivals in non-overlapping intervals, the distribution of any
ta, k
is not influenced by where
the preceding inter-arrival times might happen to have piaeed its reference point AU interarrival times have the same expectation, exponential distribution these are found to be Ta
=
;
1/R a
Va
=
T a , and variance, (see
appendix
Ta2
D
t 0.
Va . From the above , page 177 )
1/ Ra2
=
Conversely, an arrival process which produces independent inter-arrival times with the same exponential distribution is always a POISSON process as defined before. ( The proof of this fact is given in a later chapter on Markov processes.) The most efficient method to test whether some observed process is a POISSON process is therefore to test whether its inter-arrival times have exponential distribution, and whether they are independent. Exercise
7
suggests some
applicable techniques. Another important application of this second property arises with the simulation of POISSON arrival processes. The simulation of systems in which POISSON arrivals occur requires a procedure to find consecutive arrival times by computation. There exist algorithms, known as 'random number generators', which produce number sequences tribution over the range
91 , 02 . . . .
with uniform dis-
(0,1), say, and mutual independence of the individual
in a statistical sense. The values
T a. ( - l o g ( g n ) )
Vn at least
then have the above exponential distri-
bution and can be added one after the other to compute arrival times of a POISSON process. This technique is used in an exercise of chapter
3.
A third property of the POISSON process will be used in some reasonings of queuing theory as discussed in later chapters of this course. It explains why ly
'random arrivals'
is often used as a
uniformly distributed arrival times
I I
I
I
I
'random arrival process'
synonym for the POISSON arrival process. Given that some fixed
|,t T
or short-
the
M-th
the
M -1
T
is the time of
arrival of a POISSON process, preceding arrivals in (0,T)
have the same probabilities (for numbers in
20
intervals,
and for i n t e r - a r r i v a l times) as if e a c h of the
M - 1
arrival t i m e s is an i n d e p e n -
dent r a n d o m v a r i a b l e with a probability distribution uniform o v e r the i n t e r v a l (0, T). A proof of this s t a t e m e n t is found in Parzen 1. This property permits to consider e a c h i n d i v i d u a l arrival t i m e as a ' r a n d o m l y ' chosen s a m p l ing point in the i n t e r v a l
(0, T).
Thus,
POISSON arrivals 'probe' the properties of other a c -
c o m p a n y i n g processes in a p a r t i c u l a r ' r a n d o m ' way. A first a p p l i c a t i o n of this reasoning arises in chapter
4.
As an e x a m p l e g i v i n g s o m e n u m e r i c a l e v i d e n c e , third property,
the s i m u l a t i o n of random arrivals with this
and their statistical analysis with respect to i n d e p e n d e n c e and distribution of
the i n t e r - a r r i v a l times,
is discussed in e x e r c i s e
7.
Exercises. 8
Show that the b i n o m i a l probabilities
Pa, n(t0, tl)
of page
POISSON probabilities as
N ~ m , if
Ra(tl-t0)
is fixed.
some of the
N = 10 and
N = 100,
and of the
Pa, n
with
e.g.
read t h e m from appropriate tables in 8
Given an arrival n u m b e r estimates the intensity
~a/T ber
fia
na(0, T).
the 95-th and the
For n u m e r i c a l e v i d e n c e , Pa, j , if
Ra(tl-t0)
compute = 2 , -or
Brunk t .
observed in the t i m e i n t e r v a l (0, T),
Ra . Find the values of 5-th p e r c e n t i l e ,
Ra
respectively,
The i n t e r v a l b e t w e e n these values can serve as a
e s t i m a t i o n of
the v a l u e
which m a k e the observed h u m of the
POISSON distribution for
90 %- c o n f i d e n c e i n t e r v a l for the
Ra.
Which i n t e r v a l applies if page
r~a
15 c o n v e r g e to the
5740
input messages were observed in a p e a k hour,
as quoted on
16 ?
7
(This exercise supposes the use of a computer. )
of a random v a r i a b l e uniformly distributed over t e r - a r r i v a l times, Obviously,
using
T = M
(0,M).
Compute
M - I
s a m p l e values
Sort t h e m in order to find
M
in-
as a further arrival t i m e .
the a v e r a g e i n t e r - a r r i v a l t i m e is
t-a
=
1. C o m p u t e the s a m p l e v a r i a n c e of the
^
t a.
As a test for i n d e p e n d e n c e ,
c o m p u t e s o m e of the s a m p l e covariances with lag
They should be small if c o m p a r e d with the s a m p l e v a r i a n c e .
n --1,2,..
As a test for e x p o n e n t i a l distri-
21 bution compute a chi-square statistic for the goodness of fit as described in Brunk 1. The probability to exceed this computed value should not be small.
Solutions. Write the binomial probabilities of page
5
N ( N - l ) - . • (N-n+l)
( n: If now
Np
the l i m i t
Np
N-n
(Np) n
)
=
-
N
Then
=
.2
=
for
2, i . e . N
=
N
N ( N - l ) - " (N-n+1)
N
Ra(tl-t0), and
(N -Np) n
N--~ m, the second factor above has
i;
e -Np, whereas the last factor has the l i m i t Ra(tl-t0)
Np
( 1 - --)
-
n'
is held fixed at the value
Consider p
Np n ) (1N
17 in the equivalent form
this holds for any n.
a t i m e interval with the expected arrival number of
10, and
p
=
.02
for
N
=
2.
100. Values of the binomial
and POISSON probabilities are = =
0 0.107
1
2
3
4
5
6
0.268
0.302
0.201
0.088
0. 026
0.006
, N = 100 1(1-.02) 100=
0.133
0.271
0.273
0.182
0.090
0. 035
0.011
0. 135
0.271
0.271
0.180
0.090
0. 036
0.012
=1 ~ 0 ~a,n ' N
for n , j ( t - . 2 ) 10
/
Pa, j
e-.2
=
The probability that 1-
Prob(
na(0, T)
is at least equal to
na(0'T)~< f i a -
1
)
=
1-
=
1-
fia
is
fia-1 ~ pa, j(0, T) j=0 ~a-1 (RaT)J e- RaT j__~ J'
and can also be read as the value of a G a m m a distribution as defined in appendix D page 1 7 7 ,
viz. as
Gammal~ a(RaT) . The
100 (1-p)-th percentile of
,
ha(0, T) is then d e -
fined by Gammafia (RAT)
=
p ,
or as the 100 p - t h percentile of the G a m m a distribution. Given
~a
and
and the variance large
fia
T , the G a m m a distribution fia/T 2 . Furthermore,
Gammafia (x T)
has the expectation
the table of page 177 in appendix D
the distribution is approximately normal and has its
ffa / T
shows that for
5-th (95-th) percentile at
22
ff 1. 645 - g ( 1 - (+) - ~ ) . T
This l o c a t e s the
Its upper bound is a
95 °~o w o r s t - c a s e l i m i t for the s a m e e s t i m a t e .
V"a
i n t e r v a l has the r e l a t i v e width of would be
5865
instead of
s m a l l e r counts
?
ffa
90-%
c o n f i d e n c e i n t e r v a l for the e s t i m a t e d
+ 1. 648 / ~ / 5 7 4 0 "
=
fia
=
5740 . But this difference is not very important.
ARRPROC
ed on page 182 of appendix
5740,
the
+ 2 . 2 % . Thus, a worst case rate
the r e l a t i v e i n t e r v a l width increases,
A procedure
With
Ra .
e.g.
g e n e r a t i n g and sorting
to
1000
Obviously, for
+ 16.45 %
for
fia = 100,
random arrival times is list-
E . S o m e values of their e m p i r i c distribution are i n d i c a t e d in
the figure on the next page. T h e unbiased e s t i m a t e of v a l u e is close to
~-2
V(ta)
viz. C°Vn -
where
Pa
( Pa )
n
1 M - n
Coy n e s t i m a t e s the c o v a r i a n c e
M-n m=l~ ( t a ' m - Pa) (ta, m+n - ta ) ^
Thus,
This
ta .
A
(last)
C o v ( t a , m ' ta, m+n)
with an index distance or ' l a g ' be assumed to depend only on
1. 039.
has the v a l u e
are defined by a sum of products of deviations from s a m p l e
are the averages of the first
v a r i a n c e s are zero.
9
as should be for an e x p o n e n t i a l distribution of the
S a m p l e c o v a r i a n c e s with lag averages,
as r e c o m m e n d e d on p a g e
n
M - n
,
=
1,2,...,
observations. (see Cox, Lewis 1.)
of two i n t e r - a r r i v a l t i m e s occurring
in the s e q u e n c e of observations,
n , but not on
n
m.
- i f this c o v a r i a n c e can
For m u t u a l l y i n d e p e n d e n t
ta
all c o -
considerable s a m p l e c o v a r i a n c e would m a k e the i n d e p e n d e n c e as-
sumption doubtful. N u m e r i c a l results w e r e found using the procedure For a lag of
n
=
t
the s a m p l e c o v a r i a n c e was the s a m p l e v a r i a n c e .
2
-.'029
3
.061
Fa(X )
-. 048
shown in appendix E, p a g e 182. 4
10
.035
20
-. 027
-. 035 t i m e s
These values do not i n d i c a t e significant dependencies.
For a c h i - s q u a r e test of the goodness of fit, distribution
STANAL2
=
1 - e -x
the
w e r e considered,
10 m - t h p e r c e n t i l e intervals of an assumed viz.
m-1 log ( I
-
) ~ I0
x
< --
iog(l
m - --) I0
,
m:
1 ..... i 0
.
23 The counts of observations failing into t[lese 100, 117, les
98,
87,
90, 107 ) .
10
.1" M
10 =
=
( 96,101, 99,105,
'chi-square distribution with
9
=
100.
The
chi-square statistic
100 Fv0(X)
=
G a m m a 4 . 5 < x / 2 ) , also
degrees of freedom'
(Brunkl). This distribution
has according to page 177 of appendix D
the expectation
V(v0)
6.54 which results from the above
=
located at
18. The observed value E(v0)
an even greater
v0
.58 ~
,
¢0
:
random variab-
(v m - 100 )2
m:l
is known to have approximately the distribution called the
g
They are themselves observations of 10
v m , each of which has the expectation
v0
intervals were
E(v0)
=
9
and the variance
and is not contradicting the assumption of
could arise with probability . 69
(see appendix D
9
is hence Fa(x )
since
, page 177 ) Fa(X) and its 10m-th percentiles are shown in a figure, together with values of the empiric distribution at the percentiles of Fa(X) .
There are in fact several other tests which could have been applied here (Brunkl). The particular choice of the covariances and the chi-square statistic was made because they have some relation to questions discussed later in this course. In fact, the covariances of mutually dependent random variables play a key role for the confidence in simulation results. For the Gamma distributions, there will be a variety of further applications.
24
Chapter
2 :
Line service times and utilization
Terminals and lines are the two major components of a communications network, The need for a n analysis to determine
the required number of these components was stated in the sur-
vey of Section
6
t
on page
For both components, the decision criteria are to utilize
their capacity as well as possible, at the same time avoiding undesirably long wait times. It is the line analysis which is discussed in this and some following chapters. The terminal analysis is deferred to chapter
8
because it requires a more complex mathematical model.
In this chapter, the capacity of a line and its utilization by transmission, line control, and error checking are considered. Wait situations form the topic of the following chapters. T e l e c o m m u n i c a t i o n lines have a transmission capacity which is determined by several factors, viz.
a line speed, usualty stated in bits per second, which is an upper l i m i t for the
transmission capacity; a time per character,
Tch , which is required to transmit the bits that constitute
a character, including some redundancy. The line speed gives a lower l i m i t for ever, it is frequently the hardware of a terminal which determines delays
Td
Tch ; how-
Tch;
caused by electrical signal propagation on the line and in switching
circuitry; control characters,
Nb
in number, which have to be transmitted with every con-
tiguous block of data. They serve the purposes of selecting an individual device attached to the line as receiver ('adressing') or sender ('polling'). providing a longitudinal redundancy check on a block of data. The relative effect of these extra characters on the line capacity depends on the possible size of data blocks, and thus on buffer sizes; error probabilities, usually stated as a rate
Re
of errors per character. Their ef-
fect on the line capacity depends on the amount of re-transmission required after an error. S o m e typical combinations of the above factors are given in the following table.
25
Factors of line capacity, combination
II
III
IV
bits/sec
200
600
2400
40,800
Tch
msec
67.5
15
4.0
0.2
Delay by propagation
msec
Line speed Character time
by line turnaround *)
0.01 per kilometer
msec
Control characters per block Buffer size
150
30
8
8
?
7
14
14
120-480
480-1920
any
3.10-4orless
3.10 -5
in characters
Error rate
per character
*) Line turnaround, i . e .
3'10
-5
switching the line from transmission in one direction to the other
direction, occurs for lines that are alternately used for transmissions in both directions, called 'half-duplex lines'. The delay stated arises twice for each of the actions polling, requesting, receive after requesting, adressing and send after adressing. Only the receive after polling follows the polling action immediately without further delay.
Line service times. Consider the time interval for which a line is devoted to the transmission of a contiguous block of data,
- viz. the messages of the previous chapter.
a service time
The interval's duration is called
t s . For this time, the line gives service to, or acts as a server for, the
message. Different messages represent units of work, or are items that require service. The line service time depends linearly on the number ts where
nch
=
nchTch
+
rich
Nb Tch
may vary from message to message while
constant at least for certain groups of messages, e.g.
of characters in the message, by +
Tch, Nb
Td , are constant, and
Td
is
all input messages from a particular
location. If, for a first discussion, "polling is not considered, and propagation delays are neglected,
Td
equals four line turnaround times for any message.
The simple relation between line service time and message length entails an equally simple relation between their respective probability distributions. With the abbreviation c
=
Nb Tch + T d
,
26
the distribution
Fs(X)
of the l i n e service t i m e follows from the distribution
Fch(X)
of the
message length as Fs(X)
=
Prob(
t s <.~ x
)
=
Prob(
nch Tch + c ~ x
)
=
Prob(
nch ~ (x - c ) / T c h
)
=
Fch( (x - c ) / T c h )
The m o m e n t s of this distribution are l i n e a r c o m b i n a t i o n s of the m o m e n t s of the definition
E( t k
s )
eo
=
xk
f
dVs(X)
Fch(X ). From
'
-(13
substitution of
Fch
and an appropriate v a r i a b l e of integration leads to
oo E(t?)
=
)k
,,/" ( x Tch + c
dFch(X)
-00
Therefore,
k E(ts )
Especially, the e x p e c t a t i o n length
Nch
Ts
k k em k-m ,k-m ~ (m) Tch E( nch ) . m=0 of the l i n e service t i m e is found from the expected message =
as Ts
The v a r i a n c e
Vs
=
Nch Tch + c .
of the l i n e service t i m e is found from the v a r i a n c e
V(nch)
of the m e s -
sage length as Vs
=
V(nch ) T 2
, i n d e p e n d e n t of c.
Some further examples for the use of the above general r e l a t i o n arise in exercises of this chapter. Expected Line Utilization. An i m p o r t a n t p a r a m e t e r of any system giving service to arriving items,
- as discussed on the
previous page - , is the effective use m a d e of the System's service capacity.
For a single
t e l e c o m m u n i c a t i o n line, an appropriate measure of use is the fraction of t i m e in some i n t e r val for which the l i n e is a c t u a l l y giving service.
This fraction is called the u t i l i z a t i o n of the
l i n e in (0, T). It is computed as the sum of all service times occurring in (0, T), divided by ~,
T:
~(0, T)
=
T)
m=_l
ts,
m
/
T.
If the service times and their n u m b e r are random variables, so is the u t i l i z a t i o n computed from them. Its probability distribution for finite
T
m a y be difficult to derive. However, as
ns---~ eo , the distribution permits a simple description under fairly general conditions.
2?
In fact
it can often be assumed that all service times
h a v e a c o m m o n probability distribution
Fs(X) ,
ts, m
are m u t u a l l y i n d e p e n d e n t
with the possible e x c e p t i o n of the first
and the last s e r v i c e t i m e s w h i c h m a y be truncated by the endpoints of the interval This e x c e p t i o n b e c o m e s i n s i g n i f i c a n t for large
T
T h e u t i l i z a t i o n m a y be e x t e n d e d by the factor
5-(0,
ns(0, T) T)
=
T
where
ts
~-S
and
8
ns/n s , and thus rewritten as
'
wording for this f a c t is that
other i m m e d i a t e l y . a b o v e expression,
with the properties
if. T h e consistency m e n t i o n e d there i m p l i e s that for any
I-t s
the probability of deviations
As a first c o n s e q u e n c e ,
(0, T).
n s.
is the a v e r a g e service t i m e c o m p u t e d from a random sample,
as discussed on pages
' -is
-
and
I
Ts > c
converges to
tends to z e r o as T s (in probabilities)
c •
0 ,
n s-4~ co. Another as
n s --~ co '.
consider a system which is fully u t i l i z e d by services f o l l o w i n g e a c h
Its u t i l i z a t i o n ,
for any interval,
is
E
=
1. T h e first factor in the
ns(0, T) / T , which can be interpreted as a rate of service,
ways r e c i p r o c a l to
~s . H e n c e ,
The v a l u e
Rs
=
it converges to
1/T s
1/T s (in probabilities)
as
ns ~
is then a l co.
is the largest service rate that can be a c h i e v e d in
the long run by a single server with the e x p e c t e d individual service t i m e A second c o n s e q u e n c e arises for systems in which the number p e n d e n t of the i n d i v i d u a l service times.
As an e x a m p l e ,
ns(0, T)
T
s
of services is i n d e -
a t e l e c o m m u n i c a t i o n l i n e is often
used such that the number of services is d e t e r m i n e d by an arrival process (see pages
16 if.)
i n d e p e n d e n t of the service times. With the a d d i t i o n a l assumption that the arrival rate
na(0, T) / T , and h e n c e the s e r v i c e
rate,
T-.-~ co, the u t i l i z a t i o n converges (in
c o n v e r g e to a v a l u e
Ra (in probabilities)
as
probabilities) to the v a l u e U Apparently, wise,
since
U
=
R
a
T
cannot e x c e e d
s
1, the arrival rate
Ra
must not e x c e e d
Rs. O t h e r -
it cannot be the arrival process which d e t e r m i n e s the service rate in the long run.
Exercise
9
shows a first a p p l i c a t i o n of this result.
The e s t i m a t i o n of
U
from the
K(0, T)
28
o b s e r v e d in an i n t e r v a l of f i n i t e l e n g t h
T
is t h e s u b j e c t of two further e x e r c i s e s
10,11.
Exercises. 8
For t h e l i n e / t e r m i n a l
l e n g t h distributions a p p l y i n g to
combination
II
(page
I n p u t B, Output,
26 ) and for e a c h of t h e m e s s a g e
and the c o m b i n a t i o n of b o t h
(page
15
),
c o m p u t e t h e v a l u e s of T s , Vs , E(t?), using t h e f o r m u l a e of p a g e 9
26
traffic of p a g e 10 page
8
find t h e m a x i m a l s e r v i c e r a t e
=
1/T s
for
16 ?
180 to a p p r o x i m a t e t h e v a r i a n c e of U
Rs
How m a n y l i n e s are at l e a s t r e q u i r e d to h a n d l e t h e p e a k hour
A s s u m e POISSON a r r i v a l s w i t h a r a t e
i n t e r v a l for
,
.
F r o m t h e results of e x e r c i s e
c o m b i n e d i n p u t and output.
Etts3)
w h e n e s t i m a t e d by
Ra.
u(0, T)
Use t h e f o r m u l a e of a p p e n d i x for l a r g e
T.
D
,
S p e c i f y a 90% c o n f i d e n c e
K .
11
[f on a l i n e as discussed in e x e r c i s e
9 , a u t i l i z a t i o n of
.64
is o b s e r v e d w i t h i n
o n e hour,
w h i c h is t h e e s t i m a t e d a r r i v a l r a t e and the 90% c o n f i d e n c e i n t e r v a l for
U ?
Solutions• F r o m the t a b l e on top of p a g e
T h e s e v a l u e s l e a d to
Tch
=
15 m s e c
Nb
=
7
Td
= c
25
. 0 1 5 sec
=
,
• 12
=
sec ,
T s, V s
of p a g e
are e x p l i c i t l y :
26 is s t r a i g h t f o r w a r d . 2
E(t s )
characters/sec.
four t u r n a r o u n d t i m e s .
15
; t h e i r use in t h e f o r m u l a e
T h e s e c o n d and third m o m e n t
2
=
Tc2h E(nch )
=
T c h E(nch)
3
E(t s )
67
. 2 2 5 sec.
M o m e n t s of m e s s a g e l e n g t h distributions a r e s t a t e d on p a g e for
some
II
characters
120 m s e c
=
r e a d for c o m b i n a t i o n
3
3
of s e r v i c e t i m e s
2
+
2 c T c h Neh 2 3 c Tch
T h e n u m e r i c a l results are c o l l e c t e d in t h e f o l l o w i n g t a b l e :
+
c
2 c2 E(nch) + 3 T c h Nch +
c
3
29
T a b l e of results for e x e r c i s e
8.
Ts
Nch characters Input
B
sec 2
sec
I, 31
• 256
Output
48.2
0.95
• 086
combined
63.3
1.17
• 225
The r e c i p r o c a l of the e x p e c t e d
above results),
is
Rs
=
1/T s
E(t~)
sec 2
sec 8
51
1.96
3.24
•29
0.98
1•10
48
1.61
2,46
see
72.1
9
E(ts2)
Vs
=
•
•
service t i m e
.85
Ts
services/sec,
or
=
1.17 sec , (the third of the
8068 services/hour•
largest service rate which a single l i n e can a c h i e v e in the long run. a c h i e v e the corresponding m u l t i p l e of this rate. hour (from page
16 ) requires at feast
T h e r e are several reasons,
3
Thus,
M u l t i p l e lines can
the p e a k hour rate of
!ines with a c a p a c i t y of
to be discussed in this and l a t e r chapters,
This is the
9033
services/
9190 services/hour. why even m o r e c a p a c i -
ty should be planned for.
10
The f o r m u l a e of appendix
D
, p a g e 180 are c o n c e r n e d with a sum of random
variables with i d e n t i c a l probability distribution. They m a y be applied to the n u m e r a t o r of ns~T) g(0, T ) , viz• m=l ts, m , if T is large because then the possible truncation of two service times m e n t i o n e d on p a g e
27 b e c o m e s insignificant•
When a POISSON arrival process d e t e r m i n e s
ns(0, T),
pectation
Ra T
N
and v a r i a n c e
V(n)
equal to =
N Ts / T
V ( g ( 0 , T) )
:
2 ( N V s + V(n) T s ) /
:
E(t 2) U ~ Ts
N o t e that the v a r i a n c e tends to v e r g e n c e (in probabilities) of g(0, T)
(see p a g e
E ( g ( 0 , T) ) and
bution of
this number of summands has the e x -
0
g(0, T)
as
T ~ to
=
/
18 ). Thus,
Ra T s T2
for l a r g e
=
U ,
:
2 Ra E(t ) / T
T,
T•
oo. Thus,
the a b o v e results confirm the c o n -
U, stated on p a g e
is a p p r o x i m a t e l y normal for large
T.
The
27 . Furthermore,
the distri-
90°70 c o n f i d e n c e interval is
30
therefore approximately
g(0, T)
+
1. 646 V V (
a t a b l e of the s t a n d a r d n o r m a l d i s t r i b u t i o n ,
11
From
Ts
=
e.g.
g(0, T) )
appendix
D
, as can b e found f r o m , page 177.
1 . 1 7 sec , and an o b s e r v e d u t i l i z a t i o n
g(0,3600)
=
.64 , the
a r r i v a l r a t e is e s t i m a t e d as Ra a r r i v a l s in an hour.
=
~ / Ts
or
1962
g,
- e n o u g h to m a k e t h e result of e x e r c i s e
The variance
V( 5(0, 3600) )
=
.56 arrivals/sec
About that many service times must have entered the observed 10
is e s t i m a t e d by
applicable.
(see e x e r c i s e s
8
and
10 )
1.61 • 64
/
3600
.000243
=
1.17
The corresponding
90% c o n f i d e n c e i n t e r v a l is
.614
~
U
<
• 64
+
. 0 2 6 , or else
.666
This w o u l d b e an a p p r o p r i a t e l y c l o s e r a n g e for m o s t p r a c t i c a l purposes.
T h e a b o v e c o n s i d e r a t i o n s apply to u t i l i z a t i o n s o b s e r v e d in a c t u a l systems as w e l l as in a simulation.
For t h e l a t t e r ,
an e x a m p l e follows in c h a p t e r
3.
T h e e f f e c t of errors on s e r v i c e t i m e s and u t i l i z a t i o n .
T h e error r a t e
Re , i n t r o d u c e d on p a g e
24
, c a n b e i n t e r p r e t e d as t h e p r o b a b i l i t i y t h a t an
i n d i v i d u a l c h a r a c t e r is n o t t r a n s m i t t e d c o r r e c t l y . ne /n Then As a
from t h e n u m b e r n /n e
=
1/Re
ne
Obviously,
of errors in a l a r g e n u m b e r
Re n
w o u l d b e e s t i m a t e d as of t r a n s m i t t e d c h a r a c t e r s .
is the a v e r a g e d i s t a n c e (in c h a r a c t e r s ) b e t w e e n c o n s e c u t i v e errors.
simplifyinga p p r o x i m a t i o n ,
r a c t e r s are m u t u a l l y i n d e p e n d e n t .
it is also a s s u m e d t h a t t h e errors o c c u r r i n g on d i f f e r e n t c h a Then,
c o r r e c t t r a n s m i s s i o n is t h e p r o d u c t of
for a string of
m
m
characters,
t h e p r o b a b i l i t y of a
p r o b a b i l i t i e s to c o r r e c t l y t r a n s m i t o n e c h a r a c t e r ,
i.e. p(m) For the s m a l l v a l u e s
Re p(m)
=
( 1 - Re ) m
t h a t arise in p r a c t i c e , =
e -Rem
is a good a p p r o x i m a t i o n .
31
Consider a s c h e m e of error c h e c k i n g which detects errors at the end of e a c h message,
and
causes the l i n e to r e m a i n d e v o t e d to the particular message until its transmission was successfully repeated.
T h e transmission of a message of g i v e n length
characters that m i g h t be erroneous.
T h e service t i m e is
nch
ts
=
involves
m = rich + N b
m Tch + T d
if no
errors occur; the probability for this is p(m)
ts - T d p(.---) Tch
=
With probability
(1 - p(m) )J p(m) j
;
j
=
0,1,2...
transmissions are erroneous before one is successful. t's
Thus,
g i v e n the v a l u e
=
(j
=
I
i.e.
and its powers are b
~E ( 1 - p ( m ) ) J j=0
consider the e x p e c t e d service t i m e
the e x p e c t e d 'error free' length.
p(m)
(j+l)kts
E( t's I i s )
With this assumption,
transmission is as s m a l l as
; k = 1,2 ....
for the length
m = 1/Re ,
the probability for a successful
-1 p(m)
Consequently,
t[
GO
L
the service t i m e is
ts
+ t)
t s, the c o n d i t i o n a i e x p e c t a t i o n s of
E( t'sk Its ) As an e x a m p l e ,
In this case,
=
e
=
0. 368 .
the e x p e c t e d s e r v i c e t i m e as found in e x e r c i s e
12
to be
e ts
=
2. 718 t s
is m u c h higher than without errors. If
m
is restricted to values which hold .pim)
constant or linear in
1 -p(m)
r e m a i n significant.
E( tsk [ is) Furthermore, Finally,
1 - p(m)
close to
=
1 , only the summands that are
Then,
approxt..matety,
tsk ( 1 + (2k-1) ( 1 - p ( m ) )
is a p p r o x i m a t e l y i i n e a r in
the known probability distribution
Fs(X )
Re , viz.
)
equal to
of the service times
Re (t s - Td) / Tch. ts
is used to find
the (unconditional) e x p e c t a t i o n s O0
E(@)
:
,/" E(t[k[ x)
dFs(X ) .
-GO
S i n c e the conditional e x p e c t a t i o n s contain two summands with the factors k - t h and k+l -th m o m e n t of E( t'sk)
k+l t k , ts , the
enter the result
Fs(X ) =
E( t k s )
+
(2k-l)
Re Tch
t k+l ) - T dE( tsk ) ) . ( E( s
32
T h e e x p e c t e d service t i m e
T~
T's
results for
=
Ts ( 1
the s a m e
c'
=
Ra T s
U'
1
as
Re E(t~) - ( - Tch Ts
Td )
c').
can be interpreted as the o v e r h e a d
a f f e c t e d by the errors,
=
+
Ts(l+ C'
k
caused by errors. If the arrival rate
Ra
is not
applies to the overhead in u t i l i z a t i o n : =
U(l+c').
Exercise 13 provides s o m e n u m e r i c a l values for c' , as w e l l as for the second m o m e n t 2 E(t~ ) which is of m a j o r i m p o r t a n c e in w a i t situations (see later chapters.)
A message .length for m i n i m a l overhead. The o v e r h e a d
c'
b e c o m e s e x c e s s i v e (see p a g e
On the other hand,
31
) if the messages are m a d e too long.
there is an overhead caused by error checking,
viz.
C C"
-N e l l Tch
with the
c
=
of page
N b Tch + T d
25.
This overhead b e c o m e s e x c e s s i v e if the messa-
ges are m a d e too short. The product ably.
( 1 + c' ) ( 1 + c" )
w i l l therefore h a v e a m i n i m u m if
In the s i m p l e case w h e r e all messages h a v e the s a m e length,
d e t e r m i n e d by
2 Nch
Nch
is chosen suit-
the o p t i m a l
Nch
is
c =
(t
+ NbRe)-
1/Re
,
Tch as derived in detail by e x e r c i s e 1 . Therefore,
14.
The first of the above factors will usually be close to
the o p t i m a l message length is found as the g e o m e t r i c m e a n of the e x p e c t e d
error free l e n g t h
1/Re , and the l e n g t h
C/Tch
which could be transmitted in the t i m e
required for one checkpoint. Exercise
14
also shows n u m e r i c a l values for
insensitivity of the m i n i m u m . the overhead.
In fact,
values
Nch , c' , c" Nch
and gives e v i d e n c e for the
off the o p t i m a l do no__~tstrongly affect
c
33
Exercises.
12
F r o m the
13
Use the
E( t[ I ts) E( t'sk)
of p a g e
of p a g e
m i n a l c o m b i n a t i o n II, p a g e
31
31, with
25 , to find the values
8.
14
For messages all of the s a m e l e n g t h T 2 . Then
' o v e r h e a d factor'
c'
:
Re (Nch + Nb).
for
m
:
1/Re.
T~ , E( t's2 ) , V~
Nch , T s
from the results of
has no v a r i a n c e ,
Find the v a l u e
Nch
and h e n c e
g E(ts)
which m i n i m i z e s the
(1 + c') (1 + c").
With the s a m e data as in e x e r c i s e Also,
T's
k = 1, 2 , and the characteristics of l i n e / t e r -
exercise
equals
find
13
c o m p u t e the o p t i m a l
c o m p u t e the o v e r h e a d factor for the
Nch
Neh
and o v e r h e a d factor.
of the c o m b i n e d message stream.
Solutions.
o3 12
The sum
E(t's I t s )
=
~
)j (1-p
(1
p ( j + l ) ts
-p
1 - ( 1 -p)
(j+l)
ts
j=O o3
=
~ (1 -p)J j=0
t
+
c a n c e l l i n g terms
s
ts reduces to With the
e(c s Its) p(m)
:
e
-1
:
:
1 - (l-p)
stated in the text, and constant
T'
=
ts
/
P
t s , the desired result
e tS
s
is proven. The results,
13
c o m p u t e d with
T~
C'
sec i
Re
:
3 . 1 0 -4
E(@)
and data from e x e r c i s e overhead
v~
8 , are : overhead
sec 2
%
sec 2
o7o
i
1, 85
2.8
2.14
9.2
.328
22
Output
0.9'/
1.8
i. 04
6.0
• 103
2O
combined
1.19
2.5
1. '/5
8.4
.307
36
Input
B
34
14 while
D i f f e r e n t i a t e d with respect to c"
=
c/ NehTch
Nch ,
c'
has the d e r i v a t i v e
=
Re( Nch + N b )
- c " / N c h . Thus,
has the d e r i v a t i v e Re
the d e r i v a t i v e of the o v e r -
head factor is Re(l+c"
)
(l+c')
c" / N e h
=
Re - ( 1 + ReN b )
c" / N c h
The zero of this d e r i v a t i v e is found from C
R e With the data
Re
=
3 . 1 0 -4 ,
=
Nb
the o p t i m a l length is such that
=
7 ,
C/Tch
=
2
Nch
15
-3
=
( I + 2.1.10
Nch
for a total o v e r h e a d of
10
c'
=
c"
=
for a total overhead of tributions
c',
c"
11
),
=-4-
100 V 5 . 0 1 224
characters.
3 . 1 0 -4 (224 + 7) 7 / 224
Nch
c'
=
c"
=
=
6.9%,
=
3.1
=
63
%,
characters , (see p a g e
3" 1 0 - 4 (63 + 7) 7/63
=
2.1
=
9.1%,
% . This is still close to the o p t i m a l value,
show another relation.
of the service times,
28
% .
The o v e r a l l v a l u e from the case study, result in
25,
f/----.-
= =
It results in
(see pages
15
)-3" I0
i.e.
, as stated in the text.
( 1 + ReN b ) ---'2---Nc h T c h
Note that this last
c'
15 ) would
% ,
although the c o n -
n e g l e c t s the v a r i a n c e
and therefore is s m a l l e r than the result of e x e r c i s e
13.
35 Chapter
3 :
First concepts and relations of Queuing Theory.
Many problems in computer systems' timing and resource allocation arise from queuing situations. At many points of a system, units of work (see page 25 , e.g.
messages to be transmitted,
data to be stored or processed, requests to retrieve data etc. ) arrive at random times while the required server may have to work on other items. Therefore, they cannot always get i m m e d i a t e service. In this case, the items have to enter some buffer, i . e .
a space provided for waiting items,
and to wait there until selected for service. A linear order, e.g.
the orde~ by arrival times,
is often natural for the set of waiting items. Therefore, wait line or queue are other names used for this set. As an example, the messages requiring a certain t e l e c o m m u n i c a t i o n line for transmission may have to wait at offices, in terminal buffers, in a message concentrator, or in the computer center. Thus the queue associated with the line may even consist of several subsets. A definite queuing discipline must be established which at any time determines which item has to get service. A t e l e c o m m u n i c a t i o n line, once it started a transmission, remains devoted to a message until it is successfully transmitted; therefore, the discipline is apptied only at the times when a service ends. The discipline which always selects the item with the earliest arrival time is called the 'first-in-first-out' or FIFO discipline. Problems which arise from queuing situations are : Which wait times tq
tw
will the items spend in the wait line, which queuing times
will be taken for their complete execution, spent in the wait line or the server. Which space must be provided for the waiting items. Here it is essential to know
the number
nw
of items which will be in the wait line at different times.
The 'queue variables'
tw , tq
for a particular item, as well as
nw
for a certain time,
36 use to be random variables. It is their probability laws which the Queuing Theory aims to determine from certain basic assumptions about the queuing system. The possible assumptions are manyfold as reference books like
8aaty 1, Takacz I
show. Some of these assumptions
and results will be used in this course.
Relations of first order for the single server queue. A basic model of a queuing situation is described by the following assumptions : There is a single server, giving the same type of service to all items. The individual service times are mutually independent, with the common distribution
Fs(X). The arrival times of items, i.e.
the earliest times at which the service could start
for each item, form a POISSON process with rate
Ra.
The wait set may contain any necessary number of items. A graphical symbol for this
"7,"
IJI
arrivals
1-- l Fsx, 1--
queue
server
situation might be as suggested in the figure.
The actual behaviour of such a queuing system, as time proceeds, may be described by the number
nq(t)
of items in the system, given as a function of time
t . Its points of discon-
tinuity mark the times of arrival by an increase, the times of service completion by a decrease. Individual queuing times, wait times and service times can also be read from nq(t) if the queuing discipline is known. The following figure assumes
FIFO discipline :
nq(t) *'ts,1
~
ts,2 ~ t s , 3
-,tl,
•
f
4---- t q, 3 -------~
arrivals
b
37
Irrespective of the queuing discipline,
the averages of the queuing variables are r e l a t e d
simply. Consider any set of items, line,
viz.
or of i t e m s in service.
the set of i t e m s in the queuing system,
of i t e m s in the w a i t
T h e n u m b e r of i t e m s in the set is a function
Its t i m e a v e r a g e over s o m e i n t e r v a l
(0, T)
n(t)
of t i m e .
is defined as
1 g ( 0 , T)
During the s a m e interval, tain t i m e in it.
-{
Then,
n(0)
assuming
T , j " n(t) dr. T 0
-
na(0, T)
a number
of i t e m s appears in the set and spends a c e r -
denotes the averages of such t i m e s as introduced in chapter =
n(T)
=
1.
0 , inspection of the previous figure shows that na(0, T)
~(0, T)
=
i- . T 2.
One result of this type was already found in chapter n(t)
i n d i c a t e s the use
Then,
u(t)
of the server,
and is
0
For the set of i t e m s in service, for the i d l e server,
1
if it is busy.
the above result reads na(0, T) ~(0, T) T
as on p a g e
27 .
The e f f e c t of truncation by the i n t e r v a l ends, by the assumption that only
n(T)
=
0
n(0)
=
n(T)
=
also m e n t i o n n e d in chapter
2, is e x c l u d e d
0 . It b e c o m e s insignificant for any l a r g e
happens often enough w h i l e
T
increases,
T
if
thus l i m i t i n g the values of the
possibly truncated times. Now,
the relation
U
If e i t h e r the a v e r a g e n u m b e r as
T~
tion w i t h
=
Ra Ts
K(0, T)
of chapter
or the a v e r a g e t i m e
oo , so does the other a v e r a g e ,
2 i-
can also be g e n e r a l i z e d :
converges (in probabilities) ,
and their l i m i t values are r e l a t e d by a m u l t i p l i c a -
R a . Especially, Nq
=
Ra T q
for the i t e m s in the queuing system,
NW
=
Ra T w
for the i t e m s in the w a i t line.
S i n c e i t e m s in the system are either w a i t i n g or in service, at any t i m e w h i l e for e a c h i t e m
tq, m
=
tw, m
*
ts, m "
nq(t) = nw(t ) + u(t),
This i m p l i e s corresponding relations for
88
the averages and their l i m i t values, *eiz. Nq and
=
Tq
Nw
+
U
Tw
+
Ts
The expected service time is known. Thus, from any one of the l i m i t values
Nq, Tq, Nw,
Tw , the other three can be computed for any meaningful arrival rate. Note that the above relations between expectations (i. e. between moments of first order ) hold for any queuing discipline, even including some situations with priority schemes chapter
(see
? ). However, relations between higher moments of the queuing variables, e.g.
the variances, d__oodepend on the queuing discipline (see chapter 14. )
A sufficient condition for convergence. For the single server queue, a very plausible condition is sufficient to make the preceding resuIts applicable. As discussed in chapter U
=
if this value is less than
Ra T s
1 , i.e.
Ra
2, the l i m i t of the utilization is
if
I/T s
=
Rs
T h e s a m e condition assures that
the server continues to have idle times as
T
increases. Thus, truncations tend to
become insignificant. the average numbers
nq'
nw
converge (in probabilities). Plausibly, with every
idle period the queuing process starts afresh with the same probabilities for its future devellopment. Of course, the independence of individual
ts
and of arrivals from a POISSON
process are essential for this reasoning. -
the averages of wait time and time in the queuing system converge (in probabili-
ties). This follows from their reIation with the average numbers. The convergence of the averages can be interpreted as a 'statistical stability' in the long rum The above stability condition is proven in later chapters. Note that instable queuing processes with
Ra >
Rs , i . e .
an 'overloaded server', may still be of practical interest, although
only for a finite duration.
39
Exercise. 15
Assume that
T s, U ,
and
Tw
are known.
G i v e expressions for
N w, Nq, T q .
Solution. 15
From
U
and
Ts,
the arrival rate is found as
Ra
=
U / T s . Thus,
the
desired expressions are Nw
:
Tw U / T s ,
Nq
:
( Tw / T s
Tq
:
Tw + T s .
+
1)U,
S i m u l a t i o n of a single server queue. In order to get s o m e n u m e r i c a l e v i d e n c e ,
a p a r t i c u l a r queuing process is s i m u l a t e d by c o m -
putation. A l a r g e n u m b e r of arrival times,
with e x p o n e n t i a l distribution of their intervals
puted successively as e x p l a i n e d on p a g e unit.
This m a k e s
Ra
=
19 . The e x p e c t e d i n t e r v a l
The
FIFO
Ts
=
Then,
.4
.7 , and the l o n g - r u n u t i l i z a t i o n
d i s c i p l i n e is considered,
no i t e m in the system.
is used as t i m e
1 . To e a c h arrival there corresponds a service t i m e ,
a random n u m b e r with uniform distribution b e t w e e n service t i m e is
Ta
and
t
Arrival t i m e s up m
=
0
and U
1
t a , is c o m -
t i m e units.
c o m p u t e d as
The e x p e c t e d
has the s a m e n u m e r i c a l v a l u a
is assumed to b e a t i m e when there is
1000 t i m e units are taken into account.
e a c h i t e m starts its service at the J.ater of its arrival t i m e and the departure t i m e of
the p r e c e d i n g i t e m .
It departs after its service t i m e has eiapsed.
can be c o m p u t e d one after the other. the queuing t i m e s wait times
Thus,
the departure t i m e s
Subtraction of the corresponding arrival times results in
tq ; a further subtraction of the corresponding service times produces the
tw .
Ideparture I
I
larrival m
ts, m
m-1
T h e figure shows a short section
i departure m
II
!I
ts, m + l
iarrival m + l
of the s i m u l a t e d process in order to e x p l a i n the c o m p u t a t i o n .
40 A procedure for this simulation, written in It produces
10
interval
=
T
PL/I,
is shown in appendix
E
, page 183.
different sequences of random arrival and service times, each for the same 1000 time units. The
10
sets of resulting statistics are reported in a table:
ha(0, T)
~(o, r)
~q
1
1050
.742
1.85
I. 14
1.54
2
1027
•
721
1.65
O. 95
1.46
3
1003
.703
I. 83
I. 12
2.18
4
1003
700
1.37
0.67
O. 65
5
1002
710
1.68
0.97
i. 56
6
1056
736
I, 72
1.02
1.51
7
1037
741
1.84
i, 13
2.15
8
963
683
1.36
O. 65
O. 62
9
992
700
1.49
0.79
O. 90
i0
955
662
1.52
O. 81
1.15
Simulation hr.
Average of
10
sample variance of the tq
resuIts
0.925 Sample variance of
10
results
j
Sample standard deviation of
[ Interval of
10
!
results
33
r
.020
.1781.176
1.65 standard deviations to both sides of average of ., I 955 - I0631.677-.74311.34-1.921.64-1.22
The convergence (in probabilities) of closely with the results of chapters variance of
na
ha(0, T) 1
and
lation is based, the values
and
is apparent. Its 'rate' checks
2 . In good agreement with page
Ra
Ra E(t?) / T . =
1 , T
follow. The approximation value is then i'q
~(0, T)
results
I
almost equals its expectation. For the utilization
approximation of the variance as
With
and
10
=
g,
page
18 , the 29 states the
From the assumption on which the simu-
1000 , and
E(t?)
=
.52
(see page 177).
.00052, and the observed value is close to it.
~w ' however, the convergence (in probabilities) appears to be 'slower'.
41 In fact, the observed values differ so widely that the confidence in observed averages of queuing variables appears as a serious problem. This problem arises with simulations as well as with observations of an existing queuing system '
Confidence intervals for the averages of queuing variables. Some theoretical considerations will be discussed here, on which two rules for practical application can be based. Consider an average of
M V(V)
random variables =
M ~" m=l
v 1 . . . . . vM
M ~ n=l
Its variance is in general
.
cov(v m, Vn)
(Brunkl). cov(v m, Vm) is meant to denote the variance of
/
Ms
vm .
It is only for independent random variab!es that this sum reduces to a simple sum over variances. Positive covariances of the random variables increase the variance
V(V) beyond
this simple sum. This effect can be very strong. The above simulation gives some evidence. In simulation hr. dividual
tq
is estimated by the sample variance
simple sum of variances, divided by ever, from the sample variance of 10..0816 a value which is about
24
1.54
(see last column of the table). The
M 2, would result in 10
/ 9
results, =
1 , the variance of each i n -
1.54 / 1050
V(i-q) is estimated as
.0351
= . 00147 . How(see page
9
)
,
times as high. Most of this increase goes onto the account of
covariances. In fact, queuing times show a positive covariance if they arise at not too long a time distance. E . g . ,
a long (short) individual queuing time makes a long (short) next
queuing time more probable, especially under the
FIFO
discipline.
One method to estimate the variance of averages, taken over a single sample process, consists in estimating the covariances
cov(v m,vn), summing them up to
V(7). This is applic-
able to statistically stable processes in which the covariances depend only on the lag as discussed on page
22 . By collecting all terms with the same lag,
m-n,
V(V) can again be
simplified to a simple sum. Only a l i m i t e d number of terms in this sum is significant, since
42 the covariance tends to fade away for longer lags. A further term
T2/(RaT)
should be
added in analogy to page 29 , in order to approximate the effect of varying arrival n u m bers. The procedure
STANAL2
of appendix
E
, page 182 , was applied to the queuing times
of simulation nr. 5 , and produced estimated covariances with a smooth pattern, characterized by the values below,
- which are given as multiples of
lag
0
1
2
3
covariance
1
.88
.79
.71
6 • 55
Vq - •
10
20
30
.44
.25
•1
times Vq.
The same procedure also evaluates the expression V q na
(
+
1
which for limited lags and large
na
For simulation nr. 5 , the result is Vq/n a = .00156.
The further term
2 - ~" covariance/Vq ) lag/0 is a simple approximation of the double sum in .0361
or
• 00156
y2 / (RaT)
• 23.3
1. 6832 / i000
for comparison =
.0028
v(~).
with is rela-
tively insignificant• A second method to estimate
V(Y) is to observe a certain number of averages
i" , i n d e -
pendent of each other. Their sample variance yields an estimate with very little statistical computation. This was shown for the simulation results. A weakness of this second approach is that it takes much more time to observe several averages. A more practical suggestion is therefore to record the averages over some subintervals of one single observation period.
The variance of sub-averages can then be estimated as sug-
gested above• Now, the sub-averages can be made almost independent random variables by assuring that each subinterval contains at least so many individual times that the first and last of these are no longer dependent. The covariance values stated above give some feeling for the required length. Finally, the variance of the average over the whole observation period is estimated from that of the subaverages by a simple division with the number of sub-averages, as is appropriate for independent random variables. As an example, collecting ali the reported simulations into a single larger one, the average queuing time with the observed value
1. 631 , has the estimated variance
.00351 .
43 Confidence intervals should in all the above cases be based on an approximately normal distribution. Then they are determined by the estimates of expectation and variance.
Distributions of the queuing variables. A further evidence of practical interest can be drawn from the above simulations: The e m piric distributions of queuing times and wait times. A computer procedure was used to print plots of these empiric distributions. The results for simulation nr. ~
are shown on the next page. The averages
gq
and
gw
are marked as
points of reference. Apparently, the individual times are widely spread around the averages. The largest observed queuing time was time
0
8.44 time units, the largest wait time
occurred frequently, viz. for all arrivals that found the server idle.
The corresponding distributions for all shown here, and
tw
7.77 time units. Also, a wait
10
simulations, - which were plotted but are not
- are close in shape to each other. Thus, one single distribution each for
t
q
appears to describe the queuing system under study, at least in some sense of sta-
tistical convergence. This fact is of great theoretical importance, and is therefore studied in several later chapters. It is as well of practical importance. The systems designer is often asked to assure that wait times or response times (for the user of a terminal, say) will not exceed a given limit. A definite limitation is rarely possible. However, knowledge of the probability distribution of the l i m i t e d quantity permits to state how often,
- or rather how seldom,
a violation of the l i m i t is to be expected in a large
number of observed cases. The designer must then choose a system such that the given l i m i t becomes some high percentile point of the distribution in question.
Exercises. 16
From the plot of the next page, read approximately the relative number of items that did not wait ,
-
that waited longer than twice the average
that spent less than
. 4 time units in the queuing system. Also, read the
Fw
,
90-th
44 ,I,
~
m
0 -0
+-.9
.0.
I I I I I I I
Empiric distribution of
wait
F~(x)
0
times o
"t".8
0
average ~r
wait time i-
=
w
q-.7
.97
0
"
w
4-.6 t I I I I t I
average 0
queuing time
Q
~q
=
1.68
"I'.5 Empiric distribution F~(x) 3t-
of
queuing
times
0
-t'-.4
,,.2
~--.1
~-
O.5
1
1.5
2
2.5
3
: X
45
p e r c e n t i l e of b o t h e m p i r i c d i s t r i b u t i o n s ,
i.e.
t h e t i m e s e x c e e d e d in less t h a n
10 %
of all
cases. I?
Choose the time unit for the above simulation, and hence
a response time of
2 seconds is not exceeded in more than
then the average response time
I0 %
Ra , T s , such t h a t of t h e cases.
W h i c h is
i-q ?
Solutions. 16
Up to t h e p r e c i s i o n of t h e plot, • 275
f r a c t i o n of t i m e .85
, i.e.
2 7 . 5 °~0 of t h e i t e m s did not w a i t .
1 - U , i.e.
This is c l o s e to t h e e x p e c t e d
for w h i c h t h e server is i d l e . 85 %
of the i t e m s w a i t e d less t h a n
No i t e m s p e n t less than
2 • .97
. 4 t i m e units in the system,
=
1 . 9 4 t i m e units.
s i n c e this is the m i n i m a l
s e r v i c e t i m e assumed. The
17 Then
90-~
p e r c e n t i l e is at a b o u t 2 . 4 t i m e units
for t h e w a i t t i m e s ,
8 t i m e units
for t h e q u e u i n g t i m e s ,
A t i m e u n i t of Ra
=
2 / 3 seconds p l a c e s t h e
a / 2 s e c o n d s - ,1 T s
=
.7.2/8
=
90-th
or
2 . 5 t i m e s the a v e r a g e ; or 1 . 8 t i m e s t h e a v e r a g e .
percentile at
. 4 6 7 seconds , a n d
3' 2 / 3 = 2 seconds. Fq = 1 . 1 2
seconds.
46 Chapter
4
:
A first result on the single server queue.
A basic m o d e l of the single server queue was defined in chapter queuing system,
the l i m i t
Tw
3, page
86
. For this
of the a v e r a g e w a i t t i m e can be derived by a reasoning
( P o l l a c z e k 1 Khintchine 1) which assumes as g i v e n the statistical stability of the queuing p r o cess,
as considered on p a g e
38 .
Such reasoning,
even though i n c o m p l e t e in its m a t h e m a t i c a l analysis,
possible results.
Also, the s a m e reasoning can be g e n e r a l i z e d to a variety of other queuing
situations,
is useful as a guide to
as l a t e r chapters w i l l show.
T h e w a i t t i m e of a particular i t e m which arrives at t i m e
t
is the sum of
a possibly r e m a i n i n g part of the service t i m e underway,
if any,
and
the service t i m e s of aI1 further items which p r e c e d e the n e w c o m e r in the server, thus tsl t I
=
+
ts, m"
over p r e c e d i n g i t e m s m
Now, form the a v e r a g e of m a n y such w a i t times,
and consider its l i m i t (in probabilities) as
T - - ~ co. T h e n Tw where
N
=
Tsl t
+
N Ts ,
is the l i m i t for the a v e r a g e number of i t e m s that p r e c e d e a n e w c o m e r w h i l e it
waits. For the
FIFO discipline,
N
is e v i d e n t l y the v a l u e
a v e r a g e number of waiting items,
Nw
=
Ra T w
, the l i m i t of the
because just these p r e c e d e the n e w c o m e r .
s a m e e q u i v a l e n c e holds for any discipline.
However,
In any intervals of an a v e r a g e l e n g t h
the
Tw,
the
server must on the a v e r a g e start as many services as arrivals are e x p e c t e d in this t i m e , R a T w ; otherwise,
statistical stability would be impossible.
is i m p l i e d in the results of chapter Substitution for
N
i.e.
A f o r m a l proof of this s t a t e m e n t
14.
g e n e r a t e s an equation which can be solved for the unknown Tw
=
Ts[t
+
R a T s Tw
Tw
=
Tsl t / ( 1 - U )
=
Ts It
+
T w, viz.
U Tw ,
and Apparently,
this result is m e a n i n g f u l only for
. U < 1, i . e .
for a stable queue (page
38 .)
47 The e x p e c t e d r e m a i n i n g service time._:_ The r e m a i n i n g service t i m e considered.
tsl t
is c o n d i t i a n n e d by the t i m e
This is i n d i c a t e d by the subscript
POISSON arrivals h a v e the property,
s[~, viz.
discussed on page
of arrival at which it is
'service t i m e , given t ' . !9
dependently 'probes' at a t i m e uniformly distributed in sult for
t
, that each individual arrival i n -
(0, T).
This implies a p a r t i c u l a r r e -
Ts[ t .
For a given pattern of service times,
the r e m a i n i n g t i m e
tsl t
is a function of
t , the
t i m e of a possible further arrival.
The figure shows an
example. L
t
0
ts, 1
If now tation
t
ts, 2
ts, 3
T
is a random v a r i a b l e with uniform distribution over
(0, T) ,
ts[ t
has the e x p e c -
(Brunk 1) T ~0
dt T
tslt
=
niT) m=l
2 ts, m / ( 2 T )
Inspection of the above figure makes evident that the v a l u e of the integral is in fact a sum of areas of triangles with the bases As
ts, m , divided by
T.
T , . ~ m , this expression converges (in probabilities) to Tsl t
=
Ra E ( t s 2) /
2 .
Note the close analogy to the reasoning of p a g e
26 which concerned the u t i l i z a t i o n .
The POLLACZEK-KHINTCHINE formula. A substitution of the above result into that of the previous page leads to the expression Tw
in terms of data assumed as known : Ra E(t?) T
= w
Other
E(ts2)
arrangements
=
TS2
+
of the same
( P o l l a c z e k 1, K h i n t c h i n e 1) 2(1 formula
V s , one arrives at
-U) can
be useful.
With
Ra
=
U / T s
and
for
48
Tw where Tw
T
w
Vs T s ( 1 + Ts2 )
=
a p p e a r s as a m u l t i p l e of
U 2(1
-U)
T s . T h e second factor,
i n c r e a s e s w i t h the i r r e g u l a r i t y of s e r v i c e t i m e s ,
in p a r e n t h e s e s ,
shows t h a t
expressed by t h e i r v a r i a n c e
V s . This
f a c t o r has its s m a l l e s t possible v a l u e ,
1 , if all s e r v i c e t i m e s are e q u a l to t h e c o n s t a n t
and h e n c e h a v e t h e v a r i a n c e
0.
V
=
S
T h e third f a c t o r r e f l e c t s the i n f l u e n c e of the u t i l i z a t i o n tor small; u t i l i z a t i o n s close to
U . Low u t i l i z a t i o n m a k e s this f a c -
can m a k e i t very l a r g e ,
1
Ra.
f a c t o r depends on the a r r i v a l r a t e
(exercise
18).
Only this third
Thus, w i t h g i v e n d i s t r i b u t i o n of the s e r v i c e t i m e s ,
Tw
a c h o i c e of t h e a r r i v a l r a t e a f f e c t s
Ts
only t h r o u g h this t h i r d f a c t o r
(exercise
19).
Exercises. 18
Plot
Tw/T s
exponential distribution 19
over
U
Fs(X)
for c o n s t a n t s e r v i c e t i m e s , =
1 - e -x/Ts .
A s s u m e t h e s e r v i c e t i m e s of a t e l e c o m m u n i c a t i o n
page
38
for c o m b i n e d i n p u t and output.
Tq,
Also,
N w,
find t h e
Nq Ra
for t h e a r r i v a l r a t e w h i c h is which makes
Tw
t i n e as f o u n d in e x e r c i s e
18,
S t a t e further t e c h n i c a l p r o p e r t i e s of t h e l i n e w h i c h
w o u l d m a k e t h e m o d e l of a q u e u i n g s i t u a t i o n a p p l i c a b l e . Tw,
and for s e r v i c e t i m e s w i t h an
8/4
e q u a l to
Assuming the applicability,
of t h e s e r v i c e r a t e
Rs
=
find
t/T s .
3 seconds.
Solutions. 18
For c o n s t a n t s e r v i c e t i m e s , Tw/T
s
=
the variance .5U/(1
T h e e x p o n e n t i a l d i s t r i b u t i o n (see a p p e n d i x Hence
Tw /T s
=
-U) D
U /(1
Vs
is zero.
. has the v a r i a n c e
, p a g e 177 -U)
Then,
Vs
=
T
2 S
,
w h i c h is t w i c e as high.
•!
T h e figure was p l o t t e d ,
~
using
values read from appendix page
170.
C
49 19
C h e c k i n g through the assumptions of p a g e
single server queue,
36 , which defined the m o d e l of a
one notes that
the i n d i v i d u a l t e l e c o m m u n i c a t i o n l i n e is a single server, g i v i n g the s a m e type of service to all messages. the transmission times for messages, rated by one request, -
e v e n if not e x a c t l y i n d e p e n d e n t when g e n e -
are not strongly dependent.
the arrivals of requests form a POISSON process.
request,
and the responses to a message,
Although the messages within a
m a y follow a s o m e w h a t different pattern,
domness of the t i m e s b e t w e e n t h e m (viz.
for reactions of the keyboard operator,
ing in the C o m p u t e r Center) weakens the possible dependencies,
the r a n -
for process-
and l e a v e s the POISSON
process as a good a p p r o x i m a t i o n ' for the arrivals of messages. an u n l i m i t e d w a i t set is a good working hypothesis. T h e a r g u m e n t a t i o n of chapter
3
i m p l i e s however,
as part of the queuing discipline,
that
the server starts a new service i m m e d i a t e l y when it ends a previous service and finds an i t e m waiting,
or when it is idle and an i t e m arrives.
This part of the discipline
holds all queuing variables to a m i n i m u m . For a t e l e c o m m u n i c a t i o n l i n e ,
this f a v o r a b l e assumption is not quite realistic.
It can be
m a d e a p p r o x i m a t e l y true by buffering any w a i t i n g message in s o m e d e v i c e (a processor storage,
a c o n c e n t r a t o r e t c . ) where the l i n e can fetch it i m m e d i a t e l y for transmission,
and by
a fast l i n e control procedure w h i c h notices arrivals and the end of s e r v i c e i m m e d i a t e l y ,
and
a c c o r d i n g l y starts the required actions. For p r a c t i c a l purposes, From e x e r c i s e They result in equals
the f o l l o w i n g results may serve as o p t i m i s t i c bounds.
13 , the e x a m p l e values Rs
• 63 sec -1
=
1/T s
=
Ts
1 . 1 9 sec,
Vs
=
. 8 4 sec -1 ; the suggested arrival rate
and results in a u t i l i z a t i o n
Then
U
=
.75 . Also,
.307 sec 2 Ra
=
V s / T 2~
are taken. 3 Rs / 4
=
.216 .
.75
T
=
1.19 .1.216 .
w
and
=
-
2 . 1 7 sec ,
=
3.36
=
1.37
items
waiting
=
2.12
items
in
2 • (i -. 75)
Tq
=
T w
+
N w
=
Ra T w
Nq
=
N w
+
T s
U
sec
,
the
, system.
50 The general relation T
=
w can be solved for
and to
U
.72 U
2.(1 -U)
(I - U )
1.19.1.216.
U
=
Tw / ( T w + . 7 2 )
U
=
3 / 3.72
Ra
=
U / Ts
.
The example 'values lead to =
. 8 0 5 / 1 . 1 9 sec
.805
,
.68 sec "1
An approximation for the distribution of wait times. Distributions of the queuing variables were considered in chapter
3 , page
wait time distribution Fw(X) , the knowledge of the expectation a reasonable approximation. In fact,
Fw(0 )
Tw
43 ff. For the
is sufficient to find
is also known. It is the probability that an
item does not wait at all. For POISSON arrivals, this probability is equal to the fraction of time for which the server is idle, due to the 'uniformly probing property' of random arrivals. Thus, for
T.-bco,
Fw(0 ) = 1 - U.
The plot of page 44 then suggests an approximately exponential distribution of the non-zero wait times, i . e . Fw(X)
~
1 - U e -cx
Since this distribution has the expectation taking Once
c Tw
=
U / Tw
for
x ~
0,
zero for
U / c, the knowledge of .(see exercise
Tw
x < 0
is included by
20)
has been found from the POLLACZEK-KHINTCHINE formula, percentiles of Fw(X)
can be approximated by -1 Fw (p)
Exercise for
21
~
Tw ( l o g U - l o g ( I - p ) ) / U
for
p~
1 -U
0
for
p~
1 -U
,
uses this approximation for a typical situation of Line design. An exact result
Fw(X), and other approximations, are discussed in later chapters.
Exercises. 20
Show that the above suggested approximation for
Fw(X) has the expectation
u/¢
Find its inverse function. 21 makes the
With the above approximation, and the data of exercise 90-th percentile
Fwl(. 9)
equal to
19,
find the
3 seconds. Compare with exercise
Ra
which 19.
51
Solutions. 20
F(x)
=
1 - U e -ex
b u t i o n for any p o s i t i v e
c;
for
x ~ U
note that
0 ,
z e r o for
x <
0
is a p r o b a b i l i t y d i s t r i -
by its d e f i n i t i o n l i e s b e t w e e n z e r o and 1. T h e e x -
p e c t a t i o n of this d i s t r i b u t i o n is co ./'xF'(x) 0
O0
,ff x d F(x)
0' (l-u)
=
+
-(13
U dx
co J~ cx e c 0
-
-CX
c dx
U --" c
=
1:
as used in t h e text. -1 T h e i n v e r s e d i s t r i b u t i o n is found by solving This is possible for all
p F
between
-1 (p)
p
1 -U T
and
1 - U e -U
=
F(0)
which 21 for
~
F(x)
p , while
>= p
(see page
< 10 )
p
for all n e g a t i v e is
T h e POLLACZEK - KHINTCHINE Tw
in order to express
Fwl(p)
0.
x.
between Thus,
0
and
-1
1 -U
the s m a l l e s t
x
This v a l u e c o m p l e t e s t h e f u n c t i o n
(p) .
48
note
for
F-l(p).
is s u b s t i t u t e d
by design d a t a : vs
l o g ( u / (1-p)
Ts(l+7~) Ts
w h i c h for t h e e x a m p l e v a l u e s is
p
f o r m u l a in t h e version of p a g e
-1
Fw (P)
F
p - 1 ( _log__ -U
w U
F(x)
for
1 , with the result
which is e q u i v a l e n t to t h e o n e s t a t e d in t h e t e x t . For t h e that
(p) /ww
F
t . 445
log(10u
2(1
-U) / (2(1-u))
=
In t h e figure, f(U)
=
,72 • f(U) . the function
log(10U)
p l o t t e d over
/(l-U)
is
U . The utiliza-
tion
U
for w h i c h
f(U)
=
3 / .72
= 4.16
is
r e a d f r o m t h e f i g u r e as a p p r o x i mately equal
to
.58 . The
c o r r e s p o n d i n g a r r i v a l r a t e is Ra
=
.58 /
1.19
=
. 4 9 s e e -1.
This is only
72 %
of the load
52 which was found as permissible under the assumptions of exercise all design specifications which l i m i t queuing variables
19 . Generally speaking,
(such as wait times, response times,
space for wait lines ) tend to also l i m i t the usabIe capacity of the servers concerned. Note that for an exponential distribution of the service times,
Fwl(. 9)
=
T s flU)
exact theoretical result, as shown in later chapters. Then, the above ptot of to read directly the
90-th percentile of the wait times in units of
is an
f(U) permits
T s.
Further results on the remaining service times. In preparation of later chapters, some generalizations of the expression for are discussed here. Throughout this discussion,
t
Ts[ t
(page 4?
continues to denote a 'random arrival'
time. The first generalization arises in queuing systems with priority disciplines. Here it is necessary to distinguish several sub-streams of arriving items, the streams numbered from
1 to N,
say. The items in each sub-stream have different distributions of the service times, viz. Fs, n(X)
for
n = 1 . . . . . N. As a simple example, consider the two streams of Input messages
and Output messages mentionned in exercise
8, page 28 if.
The pattern of service times, and the remaining service time as a function of have as shown by the figure of page 47 n~,
T)
. Hence, the expectation of
ts[ t
t , still be-
is still
2 ts, m / (2 T) .
m=l However, in this sum the contributions of the different streams of items can be distinguished. The number of items from sub-stream the arrival rate stream
n
Ra, n
n , divided by
T , converges (in probabilities) to 2 of that stream. The average of terms ts, m contributed by the sub-
converges (in probabilities) to the second moment of
Therefore, Ts[ t
=
N ~ n=l
Fs, n(X), i . e .
to
En(ts2).
Ra, n En(ts2) 72 :
The contributions of all streams, computed individually with the formula derived earlier, add into the total
Ts[ t .
53 The second g e n e r a l i z a t i o n is to consider the higher m o m e n t s of
E(t note that the case
k
=
s~ t) 1
=
T k lira ~tsl t T,,,lpco 0 ~
dt
tsl t , viz. for
k = 2,3 ....
;
T
was considered on page 47
In order to e v a l u a t e the integral, again the fact is used that tsl t is a l i n e a r function of t k over each service period. Thus, the integral of ts| t over a service period of duration ts, m equals t The integral from na(0, T) / T
0
to
times the
T
Fs(X) , and
/(k+l)
is then a sum of such terms, divided by
9
k E( ts| t )
and g(t
=
s~ t)
By the sequence of m o m e n t s ,
=
Ra E ( t s k + l )
/ (k+
Fs(X)
of the service
=
1)
for
k = 1,2 .....
these higher m o m e n t s also add , as discussed
N k+l ~ Ra, n E n ( t s ) / (k+ n=l
also the distribution of
LFslt(s)
Go (-s) k ~ k=0 k :
ts[ t
1)
for
is d e t e r m i n e d .
k = 1,2 .....
The series
E( ts] t )
is known as a m o m e n t - g e n e r a t i n g function of the distribution D
T. This is now
, the l i m i t (in probabilities) is then the corresponding m o m e n t
Note that for several sub-streams of items, above,
.
k+l -th m o m e n t of the e m p i r i c distribution
times. As quoted on page of
k+l s,m
Fslt(x ) . Page 179 of appendix
discusses some of its properties. With the m o m e n t s as found above, it can be related to
the m o m e n t - g e n e r a t i n g function LFs(S)
=
of the given service t i m e distribution LFs~t(s )
=
co ~ k=0
(-s) k
b
E( t s" ) k '
Fs(x ). In fact,
exercise 22
shows that
Ra 1 - U + - 7 - ( 1 -LFs(s ) ) .
General rules for the m o m e n t - g e n e r a t i n g functions p e r m i t to c o n c l u d e that therefore X
Fs[t(x)
:
1 - U + Ra ¢ ( 1
- F s ( y ) ) dy .
Some consequences of this result are discussed in exercises
23, 24 .
54
A last g e n e r a l i z a t i o n is useful for the analysis of buffers which are d y n a m i c a l l y a l l o c a t e d for message transmission (see chapter
9 ). The size of buffer space required at a random t i m e
follows a pattern similar to that of the figure of p a g e t i m e s of a t e l e c o m m u n i c a t i o n line.
However,
47
. The base intervals are service
the v e r t i c a l scale is a buffer size.
Therefore,
an additional scaling factor appears in the a b o v e results.
Exercises. 22
k E( is-it )
Using the expressions for LFsIt(s )
23
=
stated in the text, prove that
1 - U + R a (1-LFs(S) ) / s
Assume a server in continued use.
and the u t i l i z a t i o n is constant
Ra
is d e t e r m i n e d as the service rate
Rs
1. Find the distribution of the r e m a i n i n g service times for the cases of
service times,
24
Then,
and of s e r v i c e times with the e x p o n e n t i a l distribution
1 - e -Rsx
In order to v i s u a l i z e the s i g n i f i c a n c e of a ' r a n d o m a r r i v a l ' t i m e for the above
results,
find as c o u n t e r - e x a m p l e s the distribution
l a t e r than the begin of a service period.
Fs] t, g i v e n that
t
is by a constant
tO
Consider the service t i m e distributions of e x e r c i s e
23.
Solutions.
22
for
co ~ k=0
(-s) k k'
k E(tslt)
s ~ 0 equals
=
1
+
co (-s) k ~" ~ k=l k'
=
1
+
03 Ra ~,. j=2 -s
E( tsk+l ) Ra
k + 1
(-s) j E(t])
with
j
=
k+l,
j :
Ra
=
1
+
--(LFs(S)
- I + sT s )
-S
= 23
1
-
U
+
Constant s e r v i c e times h a v e the distribution
function as introduced on p a g e z e r o otherwise. T h e n
Fs[ t(x)
8
=
Thus,
1 - Fs(X)
Rs >n(x, T s) 0
dy
Ra( 1-LFs(S) ) /s Fs(X ) equals =
=
(x~ 1
q.e.d.
T s) , a 'truth-value'
for all
min(x, Ts) / T s
x ~ T s , and is for
x ~_ 0,
55
which is the uniform distribution b e t w e e n
0
and
T s.
The e x p o n e n t i a l distribution of s e r v i c e times makes X
Rs j ' ( 1 0
Fslt(x)
~ 0 =
-(1
- e -Rsy) ) d y
e -Rsy Rs dy
=
1 - e -Rsx
Fs(X )
For an e x p o n e n t i a l distribution of the interval length,
the t i m e to the n e x t end of an i n t e r -
val has the s a m e distribution as the interval l e n g t h itself.
This result corresponds to the p r o -
perry of the POISSON arrival process 'to p r o c e e d i n d e p e n d e n t of history from any point in t i m e ' , already used on p a g e 24 than
ts[ t ~=
x
19 .
occurs if a service t i m e is greater than
t o + x . T h e probability
probability,
Fslt(X )
viz.
=
Prob( ts/t
Prob( t O ,~ Fsit(x)
ts ~
~
t o , and also is not greater x )
is therefore a conditional
tO + x )
= Prob( t s > t O ) Fs(t 0 + x) - Fs(t0) =
if 1
For constant s e r v i c e times,
only
Fs/t(x)
tO ~ T s
=
Fs(t0
w h i c h is again a 'single step' distribution, derived in e x e r c i s e
Fs(t0)
/
m a y be considered, + x)
so that
Fs(t0) = 0 . T h e n
,
and is different from the uniform distribution
23.
For the e x p o n e n t i a l distribution, -
Fslt(x)
:
again l e a d i n g b a c k to the distribution
1 .
Fs(t0)
e-Rs(t0 + x) + e-Rst0
of intervals.
e -Rst0 =
1 - e -Rsx
62 Chapter
6
:
Terminal systems with polling.
A telecommunication line as discussed in chapter
2
gives its service to the messages which
arise in geographically different places, the computer center and at least a terminal. In fact, economic reasons often suggest to share a single line of high capacity among several t e r m i nals, even if they are at different locations. Such a situation has two evident consequences, Firstly, the messages rarely arise at scheduled times. Thus, a queuing situation is unavoidable. The set of waiting items consists of several sub-queues at the different locations, as discussed in chapter
3 , page 35
Secondly, it takes time to maintain the queuing discipline. The line itself is used to collect the information on which each decision of the discipline is based, tt carries signals which announce the presence of messages ready for transmission, as well as other signals which test for such presence. This additional use of the line contributes considerably to the total line utilization. It also tends to delay the required transmissions and causes longer wait times. Formulae to evaluate this effect are the subject of this chapter. A particular model of the queuing situation will be used which does not cover all techniques known today but rather the one in most frequent use. The model is described below. Some remarks about other techniques, and references to their queuing theory, are added to this description.
Cyclic polling of terminals. Consider a telecommunication line which is shared among
M
terminals. Assume that it is
devoted to one terminal and message for the whole time of message transmission. In fact, other techniques are known which devote a line on a character-by-character basis. Their queuing theory was considered by Konheim 1. It has proven most efficient to make the computer center responsible for maintaining the queuing discipline. Under such a scheme, the center tests or polls the terminals for messages that are present there, whenever the discipline is to be applied. Of course, output messages
68 which are present in the computer center are considered at the same times. The center polls a terminal by sending it a special message of a few characters length, just enough to identify the special nature of the, message and the terminal concerned. If the terminal holds a message, the line is now devoted to it; if the terminal does not hold a message, it passes its mrn to another terminal. In fact, there is a technique to pass this turn i m m e d i a t e l y from terminal to terminal in an order prescribed by the physical arrangement of the
M
terminals along a looped line. If
passing loops around m the computer center, it indicates that there was no input message at all. Note that this technique always starts the loop with the same terminal, thus crea ~ ting a priority scheme as discussed in the next chapter. The model considered here assumes, however, that a terminal which is polled and does not hold a message, responds with a negative answer of one character length sent to the computer center. The center decides which terminal to poll next. A cyclic order of the polled terminals can be m a i n t a i n e d by using a iist of all terminals which is referenced from top to bottom repeatedly. As an alternative, certain terminals may appear several times on the same list. This would give them some service preference, (exercise 82 ). In order to serve each arriving message as soon as possible, the polling action must occur whenever there is no productive data transmission going on. The line is then fully utilized, although only part of this utilization is productive, i . e .
caused by the external workload.
If continued polling causes too high a load of the computer center, polling may be suspended for fixed time intervals which are interspersed whenever, say, the bottom end of the polling list was referenced. The effect is then a certain increase of the wait t i m e s . Output requirements also contribute to the wait times, tt is often advisable to give them service by the line with a priority over the input. This reduces the space for storing output data in the center, and also tends to speed up the response to each individual input message. Therefore, the contribution of output to the wait times is discussed in the next chapter. A graphical symbol for the queuing situation created by a line with several terminals is suggested in the following figure.
64
Ra,1
Ilk-
v
illl
queues
arrivals
:
"
!
~
b-
Fs(X)
a,M
The probability assumptions. A result which shows some analogy to the POLLACZEK-KHINTCHINE formula can be derived from the following assumptions : Arrivals to each terminal form a POISSON process, with rates general are different for each terminal, i . e .
for
Ra, m
which in
m = t . . . . . M . The sum of these rates is
Ra , a total arrival rate for the line. The case where all
Ra, m
equal
Ra/M
is discussed
first. Also for the first discussion, continued polling according to a list which shows each terminal once is assumed. Extensions of this assumption follow later. Each polling of one terminal takes the same t i m e combination times and
II 7
Tp . For the l i n e - t e r m i n a l
of page 28 , an unsuccessful or negative poll takes two line turnaround
character times. Thus,
Tp
equals
.168 see.
The distribution of transmission times is the same for all terminals, In the following derivations, the t i m e for a polling which precedes a transmission, i . e . is considered separately, and is assumed equal to with the distribution exercise
Fs(X), are by
Tp
a positive poll,
Tp . Then, the transmission times
ts ,
and two additionally assumed turnaround times (see
8 , page 28 ) smaller than the service times considered in exercises
8
and
18.
In fact, they are thus reduced to the times for transmission of externally given data. E . g . , for the l i n e - t e r m i n a l combination II the reduction is by the average
Ts
for input B
ances remain unaffected, e . g .
is now Vs
1.12, =
.22G sec
(see exercise
.328 for input B.
(see page
13, page
28 ) .
Thus,
38 ) etc. The v a r i -
65 A last assumption m a d e here is
that a positive poll causes the transmission of just
one message from the terminal concerned. This transmission being completed, the polling scheme proceeds to the next terminal on the list. Other possibilities which also have been suggested for p r a c t i c a l applications, and may be enforced by technical properties of the terminals, are to
flag all messages currently at the terminal, then transmit them all ; or
to
transmit all messages from the positively polled terminal, including tkose
which arrive during the transmission. The queuing theory for these cases was studied by L e i bowitz I and
Cooper et al. 1
The expected c y c l e time. A polling line gives attention to a particular terminal cycle t i m e s ,
denoted by the random variable
m
in intervals which will be called
t c.
In a time interval of duration
T
terminals was polled
times. This polling held the line busy for a t i m e computed
nc(O, T)
which covers
nc(0, T)
c o m p l e t e cycles, each of the
M
as
T' The remainder
T"
=
nc(0, T) M Tp .
of the interval considered was used for a number
transmissions. This remainder is the sum of
ns(0, T)
T"
=
ns(O, T) r s
T
=
nc(0, T) M T p
ns(0, T)
of productive
service times, hence equal to
In total, +
ns(0, T) Ts
According to the above assumption that one transmission follows each positive poll, ns
cannot be greater than
n c M.
In analogy to the reasoning of chapter
2 , consider as a first consequence the situation
where each poll is positive. This results in the highest achievable productive utilization of the line. The numbers of polls and services b e c o m e equal, and as a result the number of services per time unit is ns(0, T)
1
T
T p + ~s
Its l i m i t (in probabilities) as
T-4~eo
is apparently
1/( Tp + T s ), a value which is 1..ess
66
than the maximal service rate
Rs
= 1/Ts
achievable in the long run without polling. Cor-
respondingly, the productive utilization ~(O,W)
=
T" / T
cannot have a l i m i t (in probabilities) greater than T Tp
1
S
+
1 +R
T s
This bound depends on the poll time ratio
R
=
T p / T s , and becomes lower as the poll
time increases relative to the service time. A second consequence arises, again in analogy to chapter number of services is determined by for
T T
na(0, T), the number of arrivals. Then the expression
is T
But
2 , for systems in which the
=
is also the sum of T
=
1
---
A division leads to
n c ( 0 , T ) M Tp nc
+
na(0, T) gs
cycle times, i . e .
nc(0, T) ~c
/
M Tp
0
na(0, T) +
~S
rc
,
T
Thus, for the assumed model of the polling line, the average cycle time probabilities) as
T ~
m
to a value
T
t-c
converges (in
which can be found from C
M Tp 1
=
+
Ra T s
Tc M Tp
as
=
T c
=
M Tp / ( 1 - U )
,
1 - Ra T s where
U
is the productive utilization in the long run. As indicated above, this result is
applicable only if
U <
I/ ( I + R )
.
An approximation for the variance of cycle times. In order to evaluate the remaining time of a cycle during which an item arrives, the variance of the cycle times needs to be known (see chapter 4 ). Among the
nc(0, T) M
polls executed,
ha(0, T)
were positive. The relative number of
67
p o s i t i v e polls, na~0, T)
n a ( 0 , T)
gc
z
,.,
no(0, T) M
T
M
has t h e l i m i t (in p r o b a b i l i t i e s ) p
Ra T e / M ,
=
w h i c h c a n b e i n t e r p r e t e d as a p r o b a b i l i t y t h a t an i n d i v i d u a l poll of any t e r m i n a l is p o s i t i v e .
The number fact,
ns
of s e r v i c e s in o n e c y c l e t i m e has a p p r o x i m a t e l y b i n o m i a l p r o b a b i l i t i e s .
if e a c h t e r m i n a l has i n d e p e n d e n t l y t h e s a m e p r o b a b i l i t y
number
ns
of p o s i t i v e polls a m o n g the
M
p
of a p o s i t i v e p o l l ,
In
the
polls of a c y c l e has e x a c t l y b i n o m i a l p r o b a b i -
lities, with the expectation
and t h e v a r i a n c e (see a p p e n d i x
D
E(n s)
=
M p
=
Ra T c ,
V(ns)
=
M p (1 - p)
,
, p a g e 178 ). M a c k 2 i n d i c a t e d t h a t this i n d e p e n d e n c e does n o t a p p l y
exactly under general assumptions.
In t h e s a m e sense a p p r o x i m a t e l y ,
the cycle times n s
have the variance
tc
=
M Tp
+
Vc
=
E(ns) V s
=
Mp
m'~=l ts, m +
2 V(ns) T s
(see a p p e n d i x
D,
page
180)
( Z ( t fi) - p Ts2)
Exercise
27
Assume
M
m o d i f i e d on p a g e
64
=
6
t e r m i n a l s on a l i n e w i t h t h e s e r v i c e t i m e s of e x e r c i s e
. C o n s i d e r t h e a r r i v a l rates
resulted from exercises
19
and
Ra
=
21. F i n d t h e v a l u e s of
. 6 8 sec -1
and
13
as
. 4 9 sec -1 w h i c h
T c , p , and t h e a p p r o x i m a t e V c.
Solution. 27
Line d a t a are
poll t i m e r a t i o is results d e p e n d i n g on
R
Ts =
Ra
=
1 . 1 2 sec , V s
.147 .
=
. 3 2 8 sec 2
and
Tp
=
. 1 6 5 sec. T h e
T h e b o u n d for the p r o d u c t i v e u t i l i z a t i o n is
are a r r a n g e d in t h e f o l l o w i n g t a b l e :
.872.
The
68
e a
U
=
p
T C =
see-1
=
VC
sec 2
SeC
.63
• 706
3.36
• 353
2.41
.49
.549
2.19
.179
1.46
The expected wait time. A reasoning analogous to that of chapter time
Tw
4
now leads to a formula for the expected wait
• It assumes as given that there is statistical stability•
The wait time of a particular message which arrives at time of
t
to any terminal is the sum
a remaining part of the current cycle time for that terminal, and one cycle time for each further item which precedes the newcomer in the server,
thus t
w
=
tel t
~"
+
over preceding items m
tcll, m
The cycle times per preceding item are conditioned by that each of them starts with a transmission• The l i m i t (in probabilities) for Tw where
Ra / M
=
T-)-oo Tc[ t
is then, in analogy to page
+
Ra T w Tc~ 1 / M
Tcl t Tw
= 1 - Ra T 4 t
/ M
denotes the expected remaining cycle time, and equals, according to exercise Tc] t
Tc! 1
,
enters as the rate of arrivals to the particular terminal considered• This
equation solves for
Tcl t
46 ,
=
E( tc2 )
/ (2 Tc) .
denotes the expected cycle time, given that its starts with
1
terminal considered. If the probability of a positive poll for the other were not affected by this condition, Tc[ 1
=
M Tp
23,
Tci 1 +
transmission from the M - 1
terminals
would simply equal Ts
+
(M - 1 ) p T s .
However, this argument is approximately valid only for high poll time ratios or low productive utilization• In the other cases, the conditional cycle time is further increased by the influence of additionally expected arrivals at the other terminals.
69 Exercises. 28
Find the l i m i t s of
29
Write
Tw
T c, p,
Vc, Tc/t
and
Tw
as the u t i l i z a t i o n
U
tends to 0.
as a product of the POLLACZEK-KHINTCHINE result of page
a factor of the form
(1+
clp)
/(1+
c2P)
with the probability
the fact that this factor must be greater than
p
of page
1 , derive a lower bound for
47
, and
67 . From
Tc[ 1 .
Solutions. 28
The u t i l i z a t i o n
tends to zero.
tends to zero, with the other design data unchanged, if
Ra
T h e f o r m u l a e of the three preceding pages show that then
Tc
tends to
M Tp , i . e .
the t i m e for
M
n e g a t i v e polls,
the probability
p
Tc[ t
M Tp / 2 , half a c y c l e of n e g a t i v e polls. F i n a l l y ,
Tw M(Tp+T
U
tends to
of a positive poll, and with it
tends to the same l i m i t
s ) , h e n c e its product with
M Tp / 2 , since Ra
V c, tend to zero.
Tc[ 1
Thus
c a n n o t be greater than
tends to zero.
There is a positive m i n i m a l w a i t r i m e expected e v e n for low u t i l i z a t i o n . 29
Into
Tw
= Tel t
Tel t / ( 1 - Ra T c i l / M ) substitute the relations 2 = E(tc2) / ( 2 T c ) = ( T c + V c ) / ( 2 Tc)
Tc
=
Mp/R
Vc
=
Mp(E(t?)-PTs2
T
=
a
=
MRTs/(1
-U)
,
) ,
in order to find
( M PAa ? + M p ( E @ w
2(Mp/R
a) (1 -R a(
- p
Ts + Tell/M-
) T s)
m
2 ( 1 -RaTs)
1 + p(MT
s - T e l l ) / ( M T sR)
which is of the form suggested in the exercise, T h e polling scheme must result in a g~eater Tw
than expected for i m m e d i a t e service; therefore
In terms of
Tc[ 1 , this a m o u m Tcl 1
with
c1
~ =
e2
is necessarily smaller than
to M T s ( 1 - c 1 R) ( M - U 2 ) / ( R a2 E(ts2) ) .
c 1,
70 _An improved approximation for the conditional cycle time. If the poll time ratio
R
is small relative to
-I cI ,
Tc~ 1
is bound to be close to
M Ts ,
indicating that almost all terminals are expected to contribute a transmission time to A simple iational approximation for and the approximation of page Tcl 1 so that M-1
P[1
Tc[ !
Tel 1.
which is a co mp'on:ise between this behaviour
68, is found by writing
=
M Tp
+
Ts
+
p~l(M-1)T s
,
can be interpreted as a conditional probability of a positive poll for any of the
remaining terminals. Then
pt 1
is bounded by M
p lI
>
1
-
c3 R
with
c3
-
( 1 + c I) M-I
The compromise between this bound and the fact that P]I ~ P approximation
I -p P~I
~
P
+
1+
c3R
This expression is always greater than either bound; it approaches 1 - c3 R
is then expressed by the
for small
p
for large
R , and
R.
Exercise. 30
With the data of exercise
resulting
T w.
27,
compute
Tcl I
as described above, and the
Solution. 30
The intermediate and final results are stated in the following table.
Ra see
Cl
c3
Pll
-1
Tcll
Tw
sec
sec
.63
8.76
11.7
.59
5.42
4. 73
.49
15.0
19.2
.39
4.31
2. 21
Note the increase of found in exercises
Tw
19,21 .
over the comparable values
3 see and I sec
without polling as
71
The large number of parameters entering the computation of
Tw
makes it difficult to give
a comprehensive graphical survey of their effects. The following figures show somewhat the nature of the dependence of variance
Vs
Tw
on varied terminal number
of the transmission times.
more of which are given in appendix
::~
.222 2_~--~; ~ [ 2 + H Ti
__~__
I;
''
l
~
I[i
The figures as based on computer remits,
some
C , page 173 .
;;:'
....
The first figure shows
Tw
its dependence on
for the
U
in
i
poll t i m e ratio :
R, and
M, poll t i m e ratio
R
=
.15 (see
_ ~ ~ a i ~ ----4-:
exercises), and constant service time. 20.
M varies between
,,.i,]],-J.
I
'i
;
,
i iliii!l
!
: !2~
?,'T; ; i ! [
~;l:~z:~::t 1. t ii!~-:l_-._i:.--
i-~:~!~¢-!ZiqP:i .... ~llmr-
2 2 : I--~:~."~:_-: 1 ! ~
#
: '
-
~
'f
'-
~I""
_1. . . .
and
The figure gives e v i d e n c e
that the dependence on . ~H:,TI~ [ ]:i-~- x~i[i ~-. k.,[[idil [ /
2
M
is
almost linear.
7-
~
The systems designer is usually
"
-!2":r=~iK_" ,t ; ~,~J~& :.: :it' 7 r ~ . ~ _ + L ~ : . L A ; 4 i : ' : : ~ ram:
faced with the problem to decide which terminals out of those l o c a t e d in some geogra-
T--.XI ~m.47 ; [ TTi - T . 2 ~ T
2 1 ~ T+ i - ' T ' - I - ~
~
phical area may share a line.
........................
The workload of each terminal is then given as a fixed contribution
Um
=
Ra, m Ts
to the productive utilization of the line to which it will be a t -
tached.
The selection of certain terminals now influences both
M
and
U.
A useful aid in this situation can be a table of highest permissible utilizations different
M
considered, assuming a certain l i m i t for
the above figure, assuming
Tw
=
U
for all
T w. One such table was read from
2.68 T s , corresponding to
3 sec with the data of the
preceding exercises: Number Bound for
M U
4
5
6
7
8
9
i0
I!
12
13
14
18
16
.66
.64
.62
.60
,57
.85
.53
.51
.49
.47
.45
.48
.41
An application of this table is shown in the next exercise.
72 A second figure shows the dependence of t i m e ratio minals, R
Tw
=
Tw
on the poll
R. For
M = 8
ter-
and the ratios .3,
.16,
.075, .025, .01,
is plotted over
bound
1/(I+R)
U. The
for the u t i l i z a -
tion is indicated by a vertical dotted l i n e with each curve. Vs
is assumed as in the pre-
vious figure. Within the precision of the plot, the last curve coincides with the lower bound of
Tw
given by
the POLLACZEK -KHINTCHINE formula (see page
47
.)
Finally, the effect of service t i m e variance and arrival p a t tern is shown by plotting for
M = 8, R = .15
ral
Vs
Tw
and seve-
which arise for e x p o -
nential distribution F s, for the exercises, and for constant serv i c e times. For comparison, the lowest curve gives
Tw
assuming con-
stant service times and ' c o n v e r sational' arrivals as discussed under the next heading.
73
Exercise.
31
Assume that each terminal produces messages with an average interval of
equal to
40 sec . This is roughly the shortest possible interval with which the customer
requests
CR1
of the case study can be entered at a terminal,
Based on the data of exercise contributed by each terminal,
27 , page
67
Ta, m
as described on page
, find the productive iine utilization
2 U
m
and the largest possible number of terminals that could share
a single line, with reference to the table of page
71
Solution. 31
The contributed utilization per terminaI is computed as Um
The total contribution of table for all
M
=
Ts/Ta, m
M
terminals,
=
1.12/40
.028,
or
2.8 % .
M U m , remains below the bound of the quoted
15, where it reaches the value
up to
=
.42 .
The arrival pattern for conversational use of terminals. Keyboard terminals are often used in a sort of conversation where after each input message the operator waits for a response before he prepares his next input. It is evident that the arrival times in such a case cannot form a POISSON process with mutually independent arrivals After each arrival, at least the wait time,
then the transmission t i m e have to elapse before
another arrival becomes possible.
Assume that the t i m e
tr
from the end of input transmission to the arrival of the next m e s -
sage has an exponential distribution with the expectation mutually independent.
The time
tr
t i m e for output of a message if any,
T r , and that all such times are
includes message processing in the computer center, the and the t i m e to prepare the next input message.
Then the queuing situation for each terminal is equivalent to that of a m a c h i n e waiting for repair by a cyclicly patrolling repairman. for the repairman,
and
tr
There,
ts
is a repair time,
a t i m e to the next failure after a repair.
Tp
a walking time
Mack et al. 1 studied
this problem for constant servioe times; Mack 2 also considered variable service times.
74
T h e i r essential result is a recursion formula for the probabilities that e x a c t l y
m
services are g i v e n in one c y c l e ,
Pm
=
Prob( n s
m )
for
m = 1, 2, . . . . M,
viz.
M -m+l Pm
=
( cm-lc'
- 1 )
Pm-1
m where
e Ts/Tr C
aIld
The e x p e c t e d number of transmissions per c y c l e , M g(ns) = ~" m Pm ' m=l can be c o m p u t e d from the Pro"
bution of
tr
97
, this determines
assures that the
Tcl t
=
and the v a r i a n c e of n s , viz. M V(ns) = ~ m2 Pm m=l
T c , E(tc2)
and
=
Tc~ t
E2(ns )
T c l t . The e x p o n e n t i a l distri-
is still a p p l i c a b l e , s i n c e it m a k e s
t i m e to a n e x t arrival in a POISSON process. Finally, Tw
e
1 , they are c o m p l e t e l y d e t e r m i n e d by the reeursion.
S i n c e the sum of these probabilities is
In analogy to p a g e
M Tp/T r
c'
=
tr
b e h a v e l i k e the
the e x p e c t e d w a i t t i m e is
,
since there are no other messages at the s a m e t e r m i n a l which p r e c e d e the n e w c o m e r . T h e procedure MACK of appendix
E
, p a g e 183 , shows the required computations.
r i c a l results of this procedure are i n c l u d e d in the tables of appendix previous figure m a k e s e v i d e n t that the resulting rivals.
Tw
This is due to a similar e f f e c t as discussed in chapter 8, p a g e
for g i v e n
T r. In design situations,
for g i v e n
U
however,
U
, p a g e 173 . The
is considerably less than for random a r -
Note that the procedure MACK c o m p u t e s the u t i l i z a t i o n
Tw
C
Nume-
U
=
61
, already.
E(ns) T s / T c
is a design d a t u m rather than
as a result T r . The
can be found by r e p e a t e d use of the procedure in a t r i a l - a n d - e r r o r
s c h e m e l i k e the r e g u l a falsi. A p l o t of the result for s o m e c o n v e n i e n t values
Tw
o v e r the result
U , both c o m p u t e d
T r . is another possible t e c h n i q u e .
G e n e r a l i z e d t e r m i n a l l o a d and polling lists. If t e r m i n a l s with different arrival rates p e r m i t that some terminals, list than others.
viz.
Ra, m
are considered,
those with a higher load,
it also b e c o m e s plausible to
appear m o r e often in the polling
75 Some results for this case are stated here. However, their difference from those given above is significant only in certain extreme situations. Let terminal
entries.
m
Lm
times in the polling list, which then has a total length of
=
M ~2 m=l
occur
Terminal
m
b m
is polled whenever an entry
over the list. In analogy to page 65 interval
(0,
T)
is denoted by T
but also where the
tc, m
'm'
is encountered during the scan
, the number of polls for terminal
m
during a time
nc, m(0, T). Then
=
L nc, m(0, T) ~m Tp
=
nc, m(0, T) tc, m
+ na(O,T) ~s
'
,
are the intervals between consecutive potls of terminal
m. Their average
has a l i m i t (in probabilities) found from L 1
=
T
Lm Tc, m i.e.
L T
Among the logy to page
Ra
T s
,
Tp
=
c,m
nc, m(0, T)
+
P
Lm
( I -U)
polls of terminal
m, na, m(0, T)
were positive. Therefore, in aria-
67 , the relative number of positive polls has the l i m i t Pm
=
Ra, m Tc, m
'
which can be interpreted as the individual terminal's probability for a positive poll. The expectation and variance of the number
ns
of services between two polls are then approxi-
mately
E(ns)
=
L Pm/L m
and
V(ns)
=
E(ns) (1 - Pm) •
Thus, the values
Vc, m '
Tclt, m ' T c l l , m and finally
dually for each terminal with the formulae of pages numerical results, comparable to those of exercise Ra, m
Tw, m
can be computed indivi
67 ft. The next exercise gives some 30. In fact, the influence of varying
on the average wait time expectation appears not very strong.
76
Exercise. 32
C o m p a r e the results of e x e r c i s e
nals,
3
with the following situation :
h a v e an arrival rate t w i c e as high as the
into the polling list. minals,
30
C o m p a r e the i n d i v i d u a l
3
others,
Of
6
and are p l a c e d t w i c e as often
Tw, m , and their averages over a l l
for the same total l i n e utilizations as in e x e r c i s e
termi-
6
ter-
30.
Solution. 32 Lm
The suggested polling list could h a v e =
1
for t e r m i n a l s
could be
4 to 6. Thus
L
=
Lm
=
2
for t e r m i n a l s
1 to 3 , and
9. A possible a r r a n g e m e n t of the entries
I, 2, 4, 3, I, 5, 2, 3, 6
T h e f o r m u l a e to be used are Ra, m
=
Lm R a / 9
T c , in,
=
9 Tp/(L m (l-U))
Pm
=
Ra T p / ( l - U )
Vc, m
=
9 p ( E(t s2 ) - p Ts 2) / Lm
Tc{t, m
=
. 5 ( T c , m + Vc, m / T c , m )
Tel1, m
=
--
=
p
9
and a p p r o x i m a t e l y
(Tp+p
T s)
+ (1 - p )
Ts ,
Lm from which
T
can be found• Lm
is either
1
Ra
Ra, m
Tc, m
Vc, m
Tclt,m
Tel1, m
Tw, m
weighted average Tw
see -1
sec
sec 2
sec
sec
see
see
I
.054
3.28
2.19
1.98
4.21
2.56
2
.109
1.64
1.09
1.15
2.56
1.60
1
• 070
5.03
3.62
2.88
5.76
4. 82
2
. 140
2.51
I. 81
I. 62
3.24
2.96
Lm
sec-1
• 49
• 63
w,m
=
Tc[t, m / (1 - Ra, m Tc[1, m ) or
2. With the data of e x e r c i s e
30, the results are :
1.92
3.58
T h e results for e q u a l t e r m i n a l load,
c o m p u t e d with the a b o v e a p p r o x i m a t i o n of
Tcl 1 , are
77 1.91
and
3.56 sec , respectively, i.e.
the same as the average
the difference between individual terminals. nevertheless the lower values of
T w. More noticeable is
The terminals with the higher load
Ra, m
have
Tw, m " The preference given to these terminals by placing
them twice onto the polling list is stronger than would be required to balance out the wait times caused by different load.
A rough approximation for
Tw .
Inspection of the figure on page 71 suggests an approximation
Tw(U, R)
=
Tw(0,R) Uma x
+
Uma x where the point of infinity, tion,
Tw(0,R )
=
Urea x
M Tp / 2 Tw(U, 0)
, =
Tw(U, 0) U
= I/(I+R) , the wait time expectation for low utilizaand the bound for low poll time ratio
R,
E(~) U / 2(1-U) ,
are known. With some rearrangement, MR
rw(U, R)
+
U (I+R) (l+Vs/Ts2)
= 2
[I - U (I+R)]
Ts
results. Values computed with this expression are greater, i.e. earlier expressions, but by not more than practice.
t0 %
more pessimistic, than those of the
for the range of arguments which arise in
78 Chapter
7
:
Some results on queues with priority disciplines.
Queuing disciplines which consider priorities of some items are an important technique for improved service. They permit to reduce the response t i m e for services of high importance. In many cases they also reduce the overall response t i m e of the system. As a first example, chapter
6
mentionned that it is often advisable to give the output a
priority over the input of messages. The effect of such a discipline is considered in this chapter. To begin with, some general notions of priority disciplines are discussed. Then some results are reported which are,
- similar to the approach in chapters
4
and
6 -, concerned with
the l i m i t expectations of averages, assuming as given the statistical stability of the queuing system. Exercises for their application follow here, but also in later chapters. Complete results of this part of queuing theory can be found in Chang's 1 paper, which also gives further applications to computer systems analysis.
General notions of priority disciplines. Priority disciplines assume that each i t e m entering the system belongs to one of
N
classes
which have a well defined order. The classes are identified by elements of an ordered set like the first
N
letters of the alphabet, or the integers
n = 1 .....
N
.
In a n o n - p r e e m p t i v e priority discipline, an item may enter service only if there is no i t e m of a preceding priority class waiting. Among items of the same priority, FIFO discipline is assumed. Furthermore, the server always completes a current service before a new item is considered. In a preemptive priority discipline, the priorities are also considered at each arrival time. Thus, the service being given to an i t e m may be preempted by the arrival of items of a preceding, i . e .
'stronger', priority class. The preempted service will later have to be
resumed at the point where it was interrupted, at some earlier checkpoint, or even restarted completely. Only the first of these possibilities will be discussed here.
79 A further assumption for the following discussion is that each item maintains its priority class throughout its presence in the system. Thus, the priority is defined for each arriving item. The type of time sharing disciplines which modifies priorities according to, say, the time already spent in the system is not covered here. The probability assumptions. The items of a class
n
can be distinguished upon arrival. Their arrivals are assumed to
form a POISSON process with rate
Ra, n
(n = 1 . . . . . N) . The arrivals for all classes toge-
ther wiI1 then form another POISSON process with rate Ra as discussed in exercise
N ~n=l
=
Ra, n
'
88.
Mutual independence of the service times, and a common distribution Fs(X), are assumed as before. However, each priority Class may have a different conditional service time distribution
Fs, n(X) , given that an item is in class
n. This condition has the probability
Ra, n / R a , so that the total service t i m e distribution can be expressed as Fs(X)
=
N Z n=l
Ra, n Fs, n (x) / Ra "
Its expectation and moments are similar sums over the conditional moments, respectively, e.g. Ts
=
N ~ n=l
Ra, n Ts, n / Ra
As results, the conditional probabilities for the queuing variables, given the priority class of an item, are of interest. They are all denoted with an extra index
, n . Total probabilities
and moments are found as sums analogous to those above. Statistical stability is assumed for each class. In particular, the utilization of the server by items of class
n
wilt converge (in probabilities) to Un
=
Ra, n Ts, n n
An abbreviation useful in the following formulae is for the utilization by all classes up to
n ~ with
Sn SO
O.
=
~ m=l
Um
80 Under a non-preemptive discipline, the wait time for a particular item of class arrives at time
t
n
which
is the sum of
a possibly remaining part of the service time underway, if any, the service times of all not 'weaker' items already waiting, and the service times of all 'stronger' items arriving during this wait time. Proceeding i m m e d i a t e l y to the limits (in probabilities) of averages, the equations
Tw, n = Tslt, n arise for
+
n ~ Ra, m Tw, m Ts, m m=l
n-1 + ~ Ra, m Tw, n Ts, m m=l
n = 1 . . . . . N , is close analogy to the reasoning of page 46 • They can be rear-
ranged into the recursive form T w , n ( 1 - Sn )
=
Ts[t,n
n-1 ~-" m=l
+
Um T w , m
and can therefore be solved by repeated substitution. E . g . ,
Tw, I
=
Tslt,i/(
Tw,2
:
(Tslt, 2
I - v I)
+
for
,
n = 1
and
2
the result is
,
Ts~t,l UI/(I
-UI)
) /(I
-S 2)
The solution is especially simple if the expected remaining service time is the same
Ts[t
for all items. Then =
TW, n
Ts[t
for n = t , . . . , N
,
(1 -Sn_ 1)(1 -S n) 34. In fact this is rather the usual situation with non-preemptive prior-
as shown in exercise ities.
Values for the other queuing variables follow from the general results of page 37
and
Tq, n
=
Tw, n
+
Ts, n
Nq, n
=
Ra, n Tq, n
Nw, n
=
Ra, n Tw, n
, viz.
, ,
This last equation did already enter the above reasoning. Overall values for the stream of all items are found as sums with the weight
Ra, n/Ra, e.g.
N T
W
Tq
=
n=l =
Ra,n Tw, n / R a
Tw
+
Ts
=
Nw / Ra
,
81 Exercises. 33
Show that the time to the next arrival from any of N
with the rates
Ra, n
has the same probability distribution as the time to the next arrival
from one POISSON arrival process with a rate 84
PO[SSON arrival processes
Ra
which is the sum of all
Ra, n,
Show by induction that the equations
Tw,n(1-Sn)
=
T
=
Ts] t
are solved by
Um T w , m
Tsl t w,n
(1 -8n_ t)(1
$5
Assume that there are three classes
val rates
.1,
.25 aad
seconds. The priorities
merits m i n i m i z e
-S n)
I, II and III of items with the respective arri-
1 see -1 , and the respective constant service times .2, 1,2, and 8
can be assigned to these classes in
For each assignment, compute the three values
36
n-1 ~ m=l
+
Tw, t , which m i n i m i z e s
6
Tw, n , and the overall
different ways. T w.
expression for 37
1
in order to m i n i m i z e
Fs(x)
of service
Tw,1 ? Also, find the
Tw.
Assume the data of exercise
resulting from
Which assign-
Tw ?
Consider the case in which all items have the same distribution
times. Which class should have priority
1 and . 4
Input B and
27 , page
Output (see exercise
over the input. Find the approximate
Tw, n
67 , and consider the Ra 4,
used there as
page IG ). Give the output priority
for both output and input messages.
Solutions. 33
The time to the next arrival from any of
m i n i m u m of to
t
-
N
independent random variables
ta, n
N
POISSON arrival processes is the with the distributions
Fa, n(X) equal
e - R a , n x . The distribution of the m i n i m u m is then Fa(X)
=
1
=
1
Prob( all ta, n > x ) N -
~
(1-Fa,n(X ) )
n=l
= with the
Ra
as stated above.
1
-
e-RaX
(see appendix D, page 180)
82 34
n = 1
For
rect for a l l
the c l a i m e d solution is evidently correct.
m
Now assume that it is c o t -
Then Um Tw, m
=
(Sm
- Sin-l)
(I
Tw, m
- Sm_ 1 - I + Sin)
(1 -S m_l)(1 =
-Sm)
Tslt 1
Tslt
Sm
-
Tsl t
I - Sm_ 1
If this expression is substituted in the sum of the given equations, leaving
all tema~ but one cancel,
Ts[ t Tw, n( 1 -S n )
= ( i - Sn_ 1 )
as had to be proven. 35
The total rate of arrivals is Ra Ts
=
(.1".2
The dividend in S3
Ts
=
+ .25+
.4)
U 1 + U 2 + U 3
=
According to page
1,35 sec -1. The overall
/R a
=
Ts
is found as
,496 sec .
gives at the same t i m e the total u t i l i z a t i o n
The expected r e m a i n i n g service t i m e Ts[ t
=
(.1..04
=
.67
Ts~ t
+ .25 + .16)
.
is c o m p u t e d as /2
=
Ra E ( t : ) /2,
as
i.e.
.207 sec.
52, each s u m m a n d in this c o m p u t a t i o n is a r e m a i n i n g service t i m e e x -
pected by items of one class if they were alone in the system. Further results are arranged in the following table : Class assigned to priority
S1
S2
Tw,l
Tw,2
Tw,3
Tw
see
see
see
sec
1
2
3
I
II
III
.02
27
.211
289
.859
• 706
II
I
III
.25
27
.276
378
.859
•
II
III
I
.25
65
• 276
789
1.79
.768
I
III
II
.02
42
•
211
364
1.08
•486
III
I
II
.4
42
• 345
• 595
1.08
• 500
III
II
I
.4
65
• 345
• 986
1•79
•
The v a l u e
Tw, 1
716
571
is m i n i m i z e d by any priority assignment giving strongest preference to
83 class 1/(1
-
I U1)
which has the lowest u t i l i z a t i o n . In fact, such a choice m i n i m i z e s the factor in
Tw,
1
•
T h e smallest overall T w
is found by choosing class
class has the second lowest service time.
III
The m i n i m a l
for the second priority l e v e l . This Tw
• 520 sec , while without
is
priorities the expected w a i t t i m e would be Tw
36
If all
Ts, n
:
Ts~ t / ( 1 - S 8 )
:
• 628 sec
are equal to
T s, the utilizations
Tw, 1
Ts] t / ( 1 - U 1 )
Un
=
Ra, n Ts
are proportional
to the arrival rates• In order to m i n i m i z e
=
, priority
1
should be given to
the class of items with the lowest u t i l i z a t i o n , h e n c e the lowest arrival rate. The overall expected wait t i m e Tw
=
Um Tw, m
Tw
is in this case
N ~ Ra,n Tw,n /Ra n=l N ~... Un T w , n / ( Ra T s ) n=l
:
Using the expression for
Tw
derived in exercise
=
rs It ( - 1 - SN
=
Ts] t / ( !
•
84 , one finds
Ts{ t ) /
SN
-S N )
This is the same as the POLLACZEK-KHINTCHINE result for an equally loaded queuing syst e m without priorities:
Without different conditional service times,
a n o n - p r e e m p t i v e priority
discipline can no longer i m p r o v e the overall wait situation . 37
Since priority
1
is g i v e n to output, priority
=
.103 sec 2,
Ts, 1
=
,9'7 sec, Vs, 1
Ra, t
=
Ra /
Ts, 2
= 1.35
Ra,2
=
2. 741
(from page 15
sec, Vs, 2
1. 7 4 1 R a / 2. 741
=
El(ts2)
2
to input, the p r o b l e m data are:
= 1 . 0 4 sec 2
(from page
33 ),
),
. 3 2 8 sec 2, (from page
E2(ts2) 15 ).
= 2 . 1 4 sec 2
(from page 33
The polling t i m e is
Tp
=
),
• 165 sec.
Some values resulting from these data were computed for the following table. They i n c l u d e
84 the expected service time remaining upon arrival of an output message, according to page 52
Tstt, 1 , which
is found as the sum for three types of remaining service, viz. another
output transmission, an input transmission preceded by the positive poll, or a negative poll. Thus, Ts|t, 1 Note that
1 - S2
=
( Ra, 1 El(ts2) + Ra, 2 E~ts2) + (1-$2) Tp )
is the non-productive utilization, hence
(1 - $2) / Tp
/ 2 the rate of n e g a -
t i r e polls. Ra
Ra,1
Ra, 2
U1
U2
sec -1
sec -1
see -1
.63
.23
.40
.22
.54
.49
.18
.31
.17
.42
S2
Tslt, 1
Tw,1
sec
sec
.76
.57
.73
.69
.46
.56
The effect of the priority discipline on the input wait times is not expressed by the formulae of this chapter but may be approximated by results of the previous chapter. For messages waiting at a terminal, it is still the c y c l e t i m e which determines the wait times. The equation of page 66 T
=
which lead to
nc(0, T) M Tp
+
T c , viz.
ha(0, T) gs
must now be understood to account for both input and output messages arriving and serviced. Hence,
M Tp Tc
=
1 - Ra T s
still holds under the priority discipline, where
Ra
and
Ts
refer to the combined message
stream. Vc, Tcl t
and
Tc] 1
will be somewhat affected by the priority discipline. Anyhow, they
were considered only approximately in the previous chapter. Thus. for
Tw, 2
to use the results of that chapter, with a productive utilization
S2
U
=
it is suggested
from both input
and output, and with the service t i m e distribution for the combined message stream. The computations are then similar to those of exercises
27 if.
85 The preempt-resume discipline. Preempting priority disciplines are often used by programmed computers. Modern hardware and programming techniques tend to minimize the need to repeat interrupted service, and the time required to apply the discipline.
Thus, some results on preempt-resume priorities
(see page 78 ) are added here, in preparation for later chapters. An item which is interrupted while in service, returns into the queue where it will be reconsidered by the queuing discipline whenever applicable.
The time spent in the wait line may
therefore consist of several periods, all of which contribute to the time
tq
spent in the
queuing system. It is the total time in the wait line which is denoted here by which equals
t
w
=
t
q
- t
t w , and
s
The time which a particular item of class
n
spends in the system is the sum of
a possibly remaining part of the service time underway, if any, the service times of all not 'weaker' items already waiting, the service time of the item itself, and the service times of all 'stronger' items arriving during the time which the item spends in the system. The first two of these summands arose already with the non-preemptive priorities on page 80 Together, they can be interpreted as the wait time caused by the items present upon arrival of the newcomer. The results for non-preemptive priorities show already (see e . g . exercise that the expectation of this wait time can be found from the POLLACZEK-KHINTCHINE formula as T'w,n
=
Ts]t, n / (1 -Sn)
The expected remaining service time
Ts[t, n
is found by adding (see page
52 ) all the
contributions of the item classes which the newcomer cannot preempt, viz. as n
Tslt, n
=
~r"
Ra, m Em(ts2) / 2
m=i
Using these results, the expected time spent in the system satifies the equation n-1 Tq,
n
=
T'
w, n
+
Ts, n
+
m=~-'lRa' m
Tq, n Ts, m
I
38 )
86 which has the solution Tq, n By a subtraction of
:
Ts, n ' Tv,n
( T~c,n
+
Ts, n ) / ( 1 -Sn_ 1 )
the expected wait time =
( T~r,n
+
Tw, n
is found as
Sn-1 Ts, n ) / ( 1 - Sn_l )
Exercises. Show that the result for non-preemptive discipline can be arranged as
38
Tw,n
where
T'w , n
=
T(v,n
+
Sn-i Tw, n
follows from the POLLACZEK-KHINTCHINE
, formula stated on the previous
page. 39
Reconsider exercise
35
with preempt-resume priorities, and compare the results
36
with preempt-resume priorities.
of the two disciplines. 40
Reconsider exercise
Solutions• From
38
Ts]t, Tw, n
= (i -Sn_l) ( 1 -Sn)
follows
Tw, n ( I - Sn_ I)
=
Tw,n
+
T'w , n
and
:
Tw, n
Sn-1 Tw,n
as stated in the exercise. 39
The results are given in the fallowing table :
Class of priority
Tslt, 1
Tslt, 2
Tslt, 3
Tw, 1
Tw, 2
Tw, 3
Tw
1
2
3
see
see
see
see
see
see
see
I
II
I[I
• 002
.127
.207
.002
.198
1.01
• 783
II
I
Ill
.125
.127
.207
.167
.299
1.01
• 799
II
III
I
.125
.205
.207
.167
.914
2.16
• 868
I
III
II
.002
082
.207
.002
.152
1.81
.447
Ill
I
II
.08
.082
.207
.133
.369
1.81
.460
IH
II
I
.08
.205
.207
.133
2.16
.563
1.64
8q Comparison of these results with those of exercise duction of
Tw, 1
caused by p r e e m p t i o n .
which produces the s m a l l e s t
on page
Still i t is the class
82 I
shows the significant r e -
with the lowest u t i l i z a t i o n
Tw, 1 •
The overall e x p e c t e d w a i t t i m e assignments,
35
is further reduced by p r e e m p t i o n for some priority
Tw
but i n c r e a s e d for some others. The next exercise looks at the basic reason for
these effects. 40
If all
are equal,
Fs, n(X) Tslt, n
the expressions derived above simplify to
n Z m=l
= = =
is the sum of the
can be expressed as
+
Tw, n , w e i g h t e d with the factors U n / S N . tn the resulting sum,
( 1 - S n ) ( i - S n _ 1) SN T
s
Sn-i Ts ) / ( 1 - Sn_ 1 )
2 Ts
U n Sn
while
,
E(t 2)
(- -
1 - Sn Tw
2
Sn E(t 2) / ( 2 T s ) Sn
Tw,n
E(t 2) /
Ra, m
Ra, n / R a
E(ts2) / 2T s
which for equal
Fs, n
has the factors
Un
Un
(1-Sn)(1-Sn_ 1) S N
( 1 - S n _ l ) SN
has the factors Un
Un
SN
(I-Sn_l) S N
U n Sn- 1 / (I-Sn_I)S N =
The sum c
N
Un
n=l
(1-Sn_l) SN
= N 2Y" Un/S N = 1 . The sum of the positive n=l was a l r e a d y found in exercise 34 as 1 / ( 1 - S N ) . Thus finally
is term by term greater than the sum factors to
E(ts2) / 2 T s
E(t_2) Tw T h e first s n m m a n d c -1
=
~ 2 Ts
if the expected service time
Ts
E(ts2) +
1 - SN
is the P O L L A C Z E K - K H I N T C H I N E
is positive. T h e preempt-resume
E(ts2) / 2 T s
SN
(c - I) ( T s - - ) 2 Ts result as found in exercise
34
already.
discipline increases the overall expected wait time
is greater than the expected remaining service time
of the interrupted service, given that a service is underway (see exercise
In terms of the variance
V s , the condition for increased
Tw
is
Vs<
2 Ts .
28).
88 Chapter
8
:
Some applications of Markov processes.
One problem of Communications Network Analysis, though appearing early in the survey of page
6
, was delayed until now due to its mathematical complexity : The queuing situa-
tion in front of several identical servers. In the Case Study, this situation arises at all offices with more than one operator and terminal, all of which can give the same service to an arriving customer request. The queuing discipline directs an arriving or waiting item to any free server. This server is held for the total service time. The complexity of these situations, as compared to the system with a single server, lies in the fact that an individual wait time is no longer the fairly simple sum of service times as on pages 46 and 68
Instead, a certain number of remaining or full service times must be
completed before an arriving item can get service. The analysis of a queuing situation is very much simplified if there are times
t
such that
the future of the queuing system is conditionned only by its state at the time
t , but not
by the history of the process before this time. Processes with this property were first studied by MARKOV (see Parzen 1) . Within this course, the POISSON arrival process arose as the first example of a process which has the Markov property, in fact for any time 19
). Exercise
24
t (see page
indicated that it is the assumption of interval times with an exponential
probability distribution which gives the Markov property for any
t
to certain queuing pro-
cesses. Therefore, exponential distribution of service times is assumed throughout this chapter. The results of chapter
4
show that this tends to result in more pessimistic estimates of the
queuing variables than with the service time distributions actually occurring in most applications. The relatively high variance of the exponential distribution is the basic reason for this tendency. For the arrivals, a POISSON process will be considered. However, the same m a t h e m a t i c a l reasoning can be applied if only a finite number of items may request service, each with an exponential distribution for the time
tr
between the end of a service and the next arrival
of the item. The analysis of such cases is included here, for use in later chapters.
89 _Queuing processes with Markov property.
Consider the number of items in a queuing system at time
t, viz.
nq(t). It describes the
state of the queuing system. Assume that this state is a random variable,
with the probabili-
ties Pq, j(t) Then,
:
Prob(nq(t)
=
j )
for
j = 0,1,2 ....
the expected number of items in the system is CO
Nq(t)
=
~ j pq, j(t) j=O
,
and the expectations of other queuing variables in which the systems analyst may be interested will be related to by a convergence (as
Nq{t). Statistical stability of the queuing systems would be caused
t - - ~ co ) of the probabilities
pq, j(t)
to limit values
pq, j .
Assume further that conditional probabilities pq, jlk(tl, to) exist for any pair ing
t0,t 1
of times.
=
Prob(nq(tl)
= j ]nq(t0)
= k )
; j,k = 0,1,2...
They will be called transition probabilities since, suppos-
t I > t O, they refer to transitions of the system from state
k
to
state
j.
Also, the states at several preceding times m a y be given, so that conditional probabilities Pq, jlk, 1 . . . ( t l ' t0' t-1 . . . . ) arise. If a process has the Markov property for equal to
= P r o b ( n q ( t l ) = jlnq(t0) = k, nq(t_l) = 1. . . . ) t 0, these conditional probabilities are all
pq, jlk(tl, to) . Once these are known, they describe essentially the whole process.
In facL from the state probabilities state probabilities for a later
t1
Pq, j(t 1)
--
pq, k(t0)
and the above transition probabilities,
the
follow by the law of total probabilities as CO
i.e.
Z Pq, j{k (tl, to) Pq, k(t0 ) k=0
J = 0, 1 . . . . .
by a matrix multiplication pq(t 1)
=
Pq (tl, t 0) pq(t 0) •
Next, assume that the process has the Markov property also for lities for a later
t2
t 1. Then,
the state probabi-
are found from the matrix operations P4t2)
=
Pq(tg, tt)
pq(tl)
--
Pq(t2, tl) Pq(tl, to) pq(t0) ,
9O i.e.
a repeated matrix multiplication with the transition probabilities for adjacent t i m e inter-
vals. This argument can be extended to any number of intervals, supposed that the process has the Markov property in the points which separate the intervals. This approach has advantages for many applications. It is often easier to find transition probabilities for short t i m e intervals than for long ones. Then,
the matrix multiplication is a
simple computational procedure• Finally, in many cases the transitions probabilities are the same for all intervals considered. Then the procedure reduces to taking powers of a single matrix, and its l i m i t values can be found by even simpler computations.
Exercise. 41
h server with a single potential user is assumed idle at t i m e
its state probabilities at
ti
=
i time units, i = 1,2 . . . . .
=
t
when the server
if busy at t i m e
t i, is idle at t i m e
ti+ 1
with probability .1 ,
if idle at t i m e
t i,
ti+ 1
with probability
is busy at time
0. Compute
.4 .
Solution• 41
Only the transition probabilities
pq, 0}l(ti+l, ti)
=
.1
are stated. They are, however, sufficient to c o m p l e t e the matrix
and
i. The initial state probabilities are
Pq, 0(0)
= .4
since the sum
Pq(ti+ 1, t i)
over each of ira columns is a total probability to reach any state at
holds independent of
Pq, l | 0 ( t i + l , t i )
ti+ 1, hence equals
=
1 , Pq, l(0)
=
1.
0.
Some results of the repeated matrix multiplication, its general result and its l i m i t foUow: limit
i
1
2
3
4
general i
Pq, o(ti )
.6
.4
.3
• 25
. 2 + •8"2 -i
.2
Pq, l ( t i )
.4
,6
.7
.75
.8 - . 8 . 2 -i
.8
The l i m i t values can be found directly by solving the linear equations as components of an eigenvector of the matrix
Pq.
pq
=
Pq pq , i . e .
91
Markov queuing processes with constant intensities. Queuing processes in w h i c h the distributions of service times and times to the n e x t arrival are exponential, h a v e the Markov property at any t i m e be found easily for short intervals of length
t.
Their transition probabilities can
dt . Thus, their state probabilities satisfy simple
differential equations. Consider a system of system,
u(t)
=
with the rate tion
Fr(X)
servers, each with the s a m e
min(j,M)
Fs(X ). If there are
j
items in the
of the servers are busy. Also, consider either POISSON arrivals
Ra , or a f i n i t e population of =
At any t i m e
M
N
items,
each with the return t i m e distribu-
1 - e -Rrx , as assumed for the conversational t e r m i n a l use, page t, the t i m e to the next end of a service is the m i n i m u m of
service times. H e n c e its distribution is (see exercise 33 of page 81 Fslt(x)
--
u(t)
73 remaining
)
t - e - u ( t ) Rs x
The t i m e to the next arrival has the distribution Fair(X) for POISSON arrivals. If the m i n i m u m of bution
=
nq(t)
N -nq(t) Fair(X)
1 - e-Ra x of the
N
items from a f i n i t e population are in the system,
possible return times has to be considered, which has the distri=
1 - e - ( N - n q ( t ) ) Rr x
It is now characteristic for the queuing processes that the state
nq(t)
changes by just one on
any arrival or end of service. A transition from one state to a neighbouring state can be caused by one of these events, or by a larger, j, where
Ij - k] • i , requires at least
In a short t i m e i n t e r v a l
odd n u m b e r of events. A transition from
to
IJ - k] events, but can be caused by more.
dt, one arrival occurs with the probability
service with the probability
k
Fs~t( dt ). These probabilities are small,
Fa[t(dt),
one end of
since from the power
series of the e x p o n e n t i a l function it follows that Fa[t( d t )
= or
and
Fslt( d t )
=
Ra dt
+
O(dt 2)
(N - nq(t) ) Rr dt u(t) Rs d t
+
+
O(dt 2)
O(dt g) .
But they are nevertheless the only significant contributions to the transition probabilities. T h e
92 transitions caused by m o r e than one events occur within
dt
with a probability which is a
product of more than one of the a b o v e probabilities of order
dt , h e n c e is at least of the
order
O(dt2).
T h e transition probabilities
pq, jlk(t+dt, t)
are therefore
for
j
=
k-1 (end of service)
Pq, k_l~k(t+dt, t)
=
m i n ( k , M ) Rs dt
for
j
=
k+l (arrival)
Pq, k+l~k(t+dt, t)
=
Ra dt
or
for
j
=
(no change)
k
and of the order
=
O(dt 2)
O(dt 2)
(N - k) Rr dt
+
O(dt 2)
1 - sum of the above
for all other index combinations.
O(dt 2)
The equation
pq, klk(t+dt, t)
+
+
pq(t+dt)
=
Pq(t+dt, t) pq(t)
(see page
89, with t 1 = t+dt, t o = t)
can be rewritten as pq(t+dt) - pq(t) where
I
is the i d e n t i t y m a t r i x . p~(t)
Here,
18
k ;
k ;
Rai k
=
is
Pq pq(t)
or
=
c a g e d the transition intensities in analogy to
m i n ( k , M ) Rs
(N - k ) R r
in the p l a c e ,
in the p l a c e ,
in the diagonal p l a c e of column
- Rsl k - Ra~ k
dt --~ 0
!
Rsl k
Ra
,
After division by dr, the l i m i t for
=
Their values are
of column column
( Pq(t+dt, t) - I ) pq(t)
is a m a t r i x of constant coefficients,
P~
page
=
just above the diagonal,
just below the diagonal, k ;
of
and zero otherwise.
Some e x a m p l e s are written e x p l i c i t l y in the next exercises. Thus,
the state probabilities
constant coefficients.
pq, j(t)
satisfy a system of l i n e a r differential equations with
In the following exercises, some systems
are stated, solved and i n t e r -
preted.
Exercises. 42 and
43
Give the matrix
P$
for a single server, assuming P O I S S O N
N = 3. Solve the differential equations for
arrivals, then
N = 1
N = i.
By adding the first j + l differential equations (j = 0,1 . . . . ) find a system of e q u i -
v a l e n t equations with less n o n - z e r o coefficients. 44
By adding all differential equations,
differential equation for
Nq(t)
m u l t i p l i e d with appropriate integers, find a
and solve it as far as possible. When is
Nq(t)
bounded ?
93
45
Show t h a t t h e POISSON p r o c e s s c a n b e d e f i n e d by t h e p r o p e r t y to h a v e m u t u a l l y
independent
inter-arrival
times with a common
exponential
distribution.
Solutions. 42
With a single server,
a r r i v a l s r e s u l t in
P~
a l l s e r v i c e i n t e n s i t i e s for n o n - z e r o
states equal
R s. POISSON
=
-
Ra
-(Ra+R s)
0
Ra
0
i!
Rs
-(Ra+Rs) etc.
For
N
=
1 , only the states
0
and
1
are possible,
and
Rs
For
N
=
,IF
3 , the possible states are
0, 1, 2, 3, Rs
- 3R r p'
=
Apparently, is a l w a y s
p~,0(t) 1.
for
Rs
0
0
2 Rr
-(R r + Rs)
Rs
N
Rr
• 0
=
1
=
_ R r Pq, 0 (t)
P ; , 1(t)
=
g r Pq, 0 (t)
p~,l(t)
=
With the substitution
0
-
Rs
are
Pq, 0 (t)
+
0
-(2 R r + Rs)
0 equations
0
3 Rr
q
The differential
and
+
Rs Pq, 1(t)
for a l l
Pq, l ( t )
R s Pq, 1 (t)
t , s i n c e t h e s u m o f t h e two p r o b a b i l i t i e s
=
1
-
Pq, o(t) , a s i n g l e d i f f e r e n t i a l
equa-
tion Pq, 0(t)
+
(R r + R s) Pq, 0(t)
=
Rs
is f o u n d w h i c h h a s t h e s o l u t i o n Rs Pq, 0(t)
=
+ R r + Rs
Whatever run
the initial probability
Pq. 0(0)
is,
to
(
Rs Pq, 0 (0) - _ _ Rr + Rs
the probability RS
Pq, 0
=
lira t-~m
pq, 0(t) Rr + Rs
e -(Rr + Rs) t )
of s t a t e
0
tends in the long
94 If
ts
failure,
is interpreted as the t i m e to repair some device, while pq, 0(t)
tr
is the t i m e to the next
is the probability that the device is no___!in repair. Then Rs Pq, 0
Tr
-
= Rr + Rs
Ts + Tr
is a well known expression for the a v a i l a b i l i t y of the device, expected in the long run.
48
Addition of the first
cancels the factors of
j + 1
pq, 0(t) . . . . .
differential equations of the system
p~(t)
= Ph pq(t)
pq, j_1(0 , l e a v i n g
J p~, k(t)
=
- Ra[ j pq, j(t) + Rslj+ t pq, j+l(t)
j = 0, 1 . . . .
k=0 Thus, only two coefficients r e m a i n different from zero in each equation, viz.
the n e g a t i v e
of an arrival intensity and a service intensity. This result makes it especially simple to find l i m i t probabilities for
t - - ~ ca , as discussed under the next heading. GO
44
Nq(t)
=
O0
~
j pq, j(t)
has the derivative
N~(t)
:
5
j ph, j
sum results to the left of the equality sign i f alI differential equations are added after a m u l t i p l i c a t i o n with
j . To the right of the equality sign, ( k+ 1
k ) Ral k + ( k - 1
Thus, Nq(t)
=
oo X k=O
the service rate at t i m e
k ) Rs[k
Ral k Pq, k (t)
The two sums which arise here are expectations,
=
Ra
-
M
Rs[k
Rs[kPq, k (t)
viz. of the arrival rate at t i m e
t, and of
Nq(t)
=
Nq(0)
E(u(t) )
Ra
"
T h e expected service rate depends
E(u(t))R s
so that
Ra T s <
Ral k -
E(u(t) ) Rs . Then,
N~(t)
Nq(t)
:
will have the factor
t .
on the expected server use, and is
servers. Hence,
m X k=O
-
For POISSON arrivals, the arrival rate is constantly
The expected server use
pq, k(t)
+
Ra Rs t ( m Rs
1 t - --./~ t 0
E(u(t'))
at'
)
and its t i m e average c a n n o t exceed the n u m b e r
can only be bounded if
is a sufficient condition (see page
Ra/R s
=
Ra T s ~
38 for comparison). If
M
of
M . tn fact, Ra T s >
M , the
95 queuing system is no longer statistically stable. However, the expected number finite time approaches the expression Thus, a slight overload by an
Ra
Nq(0)
+
( Ra - M Rs ) t
not much greater than
Nq(t)
for a
as all servers become used.
M Rs
might not do much harm
in some finite time period. For a finite population, N~t(t)
=
(N-Nq(t))l~
-
E(u(t))R s .
The solution of this differential equation is always bounded. In fact, Nq(t) can never exceed the number 4~
N.
Consider the arrival process as a queuing process without service, i.e.
with
Rs = 0.
The assumed exponential distribution of interarrival times gives to the process the Markov property for all times applicable.
t. Thus, the above results, especially the result of exercise
Assume that no item is in the system at
the number of arrivals between and
pq, j(0)
=
0
for
0
j >
and
=
0. Then, the state
t . The initial probabilities are
0 . It need
probabilities with the parameter
t
only be shown that the
nq(t)
Pq, 0(0)
pq, j(t)
The probability to have no arrival satisfies the differential equation =
- Ra pq, 0(t)
Pq, 0 (t)
=
e-Ra t
with
pq, 0(0)
=
0
hence equals By induction, if then
pq, j(t)
pq, j_l(t)
=
( Ra t)J-1 e-Rat / (j-l) :
,
sitisfies the differential equation pq, j(t)
=
- Ra pq, j(t)
pq, j(t)
=
e -Rater a(R at') j-1/(j-1) :
f
+
Ra ( R a t ) j - t
e -Rat / (j-l) :
hence
(Rat)J e-Ra t / J : which completes the proof.
,
dt'
=
gives 1,
are POISSON
Rat.
p'q, 0(t)
42, are
96
The l i m i t probabilities. The l i m i t values
pq, j
=
l i m pq' j(t) t-~oo
of the state probabilities c a n be found without
e x p l i c i t solution of the differential equations. If the functions p'q,j(t)
their derivatives
values in a f i n i t e circle,
tend to zero.
pq, j(t)
The particular form of
P~
tend to constants,
places all its e i g e n -
and assures that no oscillations with high frequency are possible. 48 , page 94
Thus, the differential equations found in exercise
, tend to the a l g e b r a i c re-
iations 0
=
Rs[j+l
Pq, j+l
Ra{j Pq, j
J = 0,1 ....
By repeated substitution, Ra[j Pq, j+l
=
~
Rsij+ 1
The sum of all probabilities equals
Pq, 0
=
a/~
where the sum is extended from
Pq, j
J = ('IT
= "'"
I . Hence,
RaIk
k=0 Rs[k+1
Pq, 0
) Pq, O =
cj+l Pq, O"
can be found as
cJ
j
0 , with
co
=
1, to
or
co
N. Then, the other pro-
babilities can be found recursively from the previous equation.
Exercises. 46
For
M
servers and POISSON arrivals, find
the expected server use has the l i m i t the l i m i t s of the probability
P
-
U
=
Ra T s
1 - Fnq(M-1 )
pq,j
for
j -- 0 , 1 , 2 . . . .
if this v a l u e is less than
Show that M. Also find
that all servers are busy, and of the e x -
pected numbers of items in the system and in the wait line. 47
From the Case Study data,
find the expected hold t i m e
operator. With the worst case request rates according to exercise m i n a l use
U
Ts
of a t e r m i n a l and
4 , find the expected ter-
for the different locations.
Use the table of appendix
C
, page 172 , to find approximately the numbers of t e r m i n a l s
at least required in the different locations if the probability to find no free t e r m i n a l upon arrival has to b e less than
.2 .
97 Solutions. 46
With
Ra] j
=
Ra , and
e.l and The series of the
c: J
Rs] j
=
m i n ( j , M ) Rs , the coefficients
=
(Ra Ts)J / j :
for
=
(Ra Ts)J / ( M ' M J - M )
cj
are
j __< M , for
is g e o m e t r i c with the quotient
j
~
Ra T s / M
M . for
j
~
M.
If the
quotient is not less than
1, the sum over this series diverges. Then, the equations h a v e
only the trivial solution
pq, j
tend to zero as higher indices
t - ~ oo.
=
0
for all
j. This i n d i c a t e s that all probabilities
pq,j(t)
Consequently, the n o n - z e r o probabilities arise for higher and
j. The queuing system is unstable.
If the quotient is less than 1 , the sum of the cj oo M-1 pq~l = ~ ' - cj = ~ " cj + c M / ( 1
j=o
can be written as -R aT s/M)
j=o
.
The limit probabilities are pq, j For the states up to
M
=
cj pq, 0
they are in the same relation as POISSON probabilities; above
they form a g e o m e t r i c series. In particular, for the single server system with are g e o m e t r i c probabilities. One c o n s e q u e n c e is that in this case the state
M
M = 1, they
0 , with idle
• server, has the highest probability of a l l states. The e x p e c t e d server use has a l i m i t defined by probabilities are n o t all zero. m i n ( j , M ) pq, j so that
U
equals
=
Ra T s
U
=
0o Z j=l
m i n ( j , M ) pq, j , if the l i m i t
Now, m i n ( j , M ) cj Pq, 0
=
Ra T s Cj_l Pq, 0
=
R a T s Pq, j - 1
m u l t i p l i e d by the sum of all probabilities, which is
1.
The probability that all servers are busy usually is an i m p o r t a n t design criterion. Also, it arises within the expressions for other parameters in which the designer is interested. For the above case i t has the l i m i t
M-t P
=
1 j=O
which is
I
Pq, j
'
if the system is not stable, and (13
P
=
~ - Pq, j j=M
=
Pq, M / ( 1 - U / M )
if it is stable.
98 Two tables for this expression are given in appendix shows percent values of
P
for various
M
is increased to serve a given workload
and
C
U/M.
, page 172 . The first of them Note that
P
decays sharply if
M
U. The tab!e is then read in a Iower row and in
earlier columns. The second table gives
-logP
for various
U
and
M - U . It is used to find how many
servers more than those in use on the average are required to hold value. The logarithmic scale is more convenient if very small
P
at a certain small
P are required. The next
exercise makes use of this table. The expected number of items in the wait line of a stable system has the l i m i t O3
Nw since
j - M
j=~
items wait i f
(j-M)pq,
j ~
M
=
W
N
Finally,
q
,
are in the system.
sum form a g e o m e t r i c series, so that, N
j
The
pq, j
appearing in this 12, page
in a certain analogy to exercise
33
,
Pq, m (U/M) / (1 - U/M) 2
U/(M-U)
=
p
=
N
W
+U
47
The rimes for which a terminal and operator is occupied by a request are stated
on page
2
t i m e is
1 . 6 neh / 3
in relation to the k e y - i n times. For the input message length
the hold rime is 1.4 n c h / 3
=
sec
with the request types
3 nch / 3 sec, i . e . 1 . 4 - 12
=
CR2, CR3 and CR4. With the type CR1,
the value for the other types, plus an extra
16.8 sec.
The average amount of input data per request was found on page 15 Nch
=
nch , the hold
125.4 . The extra t i m e for
CR1
occurs in
16820/25000
, input case =
67.3%
C , as
of the r e -
quests. Thus the average hold t i m e is, not accounting for the response of the computer, T s
=
1.6"125,4
=
78.2 sec
/3
+
.673
• 16.8
sec
The computer response t i m e is bounded by the requirement of page 5 . The average key-in t i m e of an individual message is
12 sec, with the average length of input
A, page
15
99
In order to make this value the
90-th p e r c e n t i l e of the response t i m e distribution, its
expectation must be considerably less. Thus, Ts
=
a hold t i m e average of
90 sec
is a pessimistic assumption. 3293 per hour
The worst case request rate of
3
to the request numbers of page
is split into the values per location according
. The following table gives the resulting rates per hour,
per second, and the expected terminal use, assuming Location
GE
FRA
KOP
Ts
as above.
LON
i
MIL
PAR
|
Hourly rate
395
519
250
501
341
446
Rate in sec -1
.110
.144
.069
.139
• 095
.124
9.88
12.96
6.24
12.53
8, 54
11.15
Expected use
U
The second table of appendix
C , page 1 7 2 , shows a probability
value
-logP
U
M -U
=
3
= for
1,61
, if
P
=
.2,
i.e.
the
is integer, and the additional number of terminals is
U = 5or 6 ,
4
for
U = 7 through 11,
5
for
U = 12 through 19 .
Thus, the required numbers are roughly for location ml
M
i
=
With further
13
[
GE
FRA
KOP
LON
MIL
PAR
I
14
18
9
18
13
16
for
AMS, and
9
for
MAD
and
VIE
each,
terminals.
the total number is
119 terminals. Note that this total is still almost proportional to the average hold t i m e
T
. Any reduction S
of this value affects the terminal number to the same percentage. t i m e of
4
instead of the assumed
12 see
E.g.,
an average response
results in a total number of
112 terminals.
The case study states another criterion than considered in this exercise, viz. a bound for a percentile of the wait t i m e distribution.
This is the subject of the next exercise.
The wait t i m e distribution. The assumption of exponential service time distributions eliminates the difference between c o m p l e t e and remaining service times. Thus, the wait t i m e of an i t e m is
0
with the pro-
100
bability
1 - P
that not all servers are busy. It is not greater than s o m e
POISSON process of rate least
j -M
used on p a g e
M Rs
which is formed by the e n d - o f - s e r v i c e events,
events in the t i m e 21
already.
curs with the probability
x . The probability for this is
Here,
j
generates at
Gammaj_M (MR sx)
is the state encountered by the arriving i t e m ,
as
and o c -
pq, j .
Taking total probabilities over all possible states, Fw(X) By c o l l e c t i n g powers of
x } 0, i f the
one arrives at
oo 1 - P + ~ pq, j G a m m a j _ M ( M Rs x ) j=M
=
x , or by taking a detour over m o m e n t g e n e r a t i n g functions,
one
can si~nplify this sum to Fw(X)
=
1
-
P e
-(M
-U)Rsx
for
This is a distribution of the form already suggested in chapter 4,
x
>
0
°
50 . Its e x p e c t a t i o n
page
is r
=
PT
W
/(M-U)
=
a
a result which is consistent with the g e n e r a l relations of chapter The p e r c e n t i l e s of the distribution are -1 F w (p) = - log((1-p)/P)T and
0
for the other
R N
S
p . If
s/(M
, W
8 .
-U)
if
p~
1 -P,
T s, U, and a bound for s o m e p e r c e n t i l e are g i v e n ,
to be chosen as the s m a l l e s t i n t e g e r for which
Fwl(p)
is less than the bound.
M
has
The n e x t
e x e r c i s e shows an a p p l i c a b l e t e c h n i q u e .
Exercise. 48
With the data of e x e r c i s e
4%
choose
p e r c e n t i l e condition stated in the case study,
M
page
for e a c h l o c a t i o n so as to satisfy the 5 . Find the l i n e l o a d per t e r m i n a l .
Solution. 48
The stated condition is
Fwl(.9)
~
20 sec . With
Ts
=
90 sec,
M must be
chosen such that (2.3o + log p) / (
M - g ) <
2O / 9O
=
.222 .
This i n e q u a l i t y for a transcendental function is satisfied by trying several
M ~. U .
101
E.g.,
for
U
p a g e 172, M-U
=
6.24,
t h e v a l u e of
-logP
c a n b e r e a d f r o m t h e t a b l e in a p p e n d i x
by i n t e r p o l a t i o n b e t w e e n t h e t a b l e e n t r i e s for
= M-7 , with fixed
U = 6, M - U
= M - 6 , and
M . T h e n e c e s s a r y c o m p t a t i o n s are in t a b u l a r form
:
M-6
M-U
M-7
9
3
2.76
2
1.630
-.24(1.630
-
.955)
=
1.47
.30
10
4
3.76
3
2.290
-.24(2.290
- 1.506)
=
2.10
• 053
M
=
10
is c h o s e n for t h e l o c a t i o n
( 2 . 3 0 + l o g P) / ( M - U )
KOP.
In the s a m e way t h e f o l l o w i n g
further results are f o u n d :
Location
GE
FRA
KOP
LON
MIL
PAR
M
14
17
!0
17
12
15
=
The total,
including three further locations,
is
117
terminals.
Again,
terminals•
a c h a n g e of
Ts
has an a p p r o x i m a t e l y l i n e a r e f f e c t .
T h e a v e r a g e c o n t r i b u t i o n of a t e r m i n a l to t h e l i n e l o a d c a n now b e d e t e r m i n e d . p e a k hour m e s s a g e r a t e line service time
Ts
Ra =
9033 h -1
1 . 1 9 sec
U Each of t h e
=
=
2.98
16
of p a g e
2 . 5 sec -1 33
of p a g e
16
With the
, and the expected
, t h e t o t a l l i n e use is
.
117 t e r m i n a l s c o n t r i b u t e s
c o n t r i b u t i o n a s s u m e d for e x e r c i s e
=
31.
2.8%
line utilization.
According to
T h i s is s l i g h t l y less t h a n t h e
t h e t a b l e of p a g e
71
it p e r m i t s up to
terminals per line.
However,
t h e b o u n d of
row if t h e
T
<
3 sec
a s s u m e d for t h a t t a b l e m a y a p p e a r s o m e w h a t too n a r -
9 0 - t h p e r c e n t i l e of response t i m e s is at
lysis w o u l d r e q u i r e k n o w l e d g e of t h e v a r i a n c e c h a p t e r 14 . As a s i m p l e a s s u m p t i o n , single l i n e e a c h ,
lines.
as discussed in
FRA, LON,
a n d PAR
by a
T h e f i n a l d e c i s i o n depends on t h e
a n d w i l l a t t e m p t to m i n i m i z e t h e cost of t h e l i n e
as i n d i c a t e d in t h e survey of this s e c t i o n . 7
98 ). k close a n a -
in t h e p o l l i n g system,
w h i l e t h e o t h e r l o c a t i o n s share lines.
Later chapters will assume
(see p a g e
it s e e m s p o s s i b l e to serve
g e o g r a p h i c a l s i t u a t i o n a n d t h e l i n e tariffs, network,
Vw
12 sec
,
U = 7
M
As a result,
- log P ( U , M - U )
C
Section COMPUTER
2
CENTER
ANALYSIS
The number of decisions required for the design of a c o m p u t e r center is considerably higher than for the c o m m u n i c a t i o n s network. -
This is because
the c o m p u t e r center has to h a n d l e several functions,
storage and r e t r i e v a l of data,
the essential ones being the
the control of the c o m m u n i c a t i o n s network and its data flow,
and the processing of data. -
the d e v i c e s that are a v a i l a b l e for c h o i c e differ not only in operation speed but
also in their l o g i c a l structure.
Channels for data transmission are m o r e or less dependent on
the central processing unit (CPU) ; control units m a y be l i n k e d to one or m o r e channels ; storage devices m a y or m a y not require a seek m o t i o n before data can be t r a n s m i t t e d ; the control of the c o m m u n i c a t i o n s network m a y be a function of the CPU or be p a r t i a l l y shifted to control units ; etc. -
a v a r i e t y of p r o g r a m m e d techniques are in use to e x e c u t e the functions of the
c o m p u t e r center. methods,
e.g.
Different methods for data r e t r i e v a l and transmission constitute the access
for sequential files, indexed files, t e l e c o m m u n i c a t i o n s .
Supervisor programs
and priority disciplines l e a d to further distinctions. As a consequence, this section
2
w h i l e the network design was c o v e r e d almost c o m p l e t e l y in section
rather discusses some s e l e c t e d problems of c o m p u t e r center analysis,
1 ,
- main-
ly those in which probabilities p l a y a m a j o r role. Tfiey can be classified by functions of the c o m p u t e r center to which they are r e l a t e d :
Function
I , Communications
control.
Design data are the line network specification,
control procedures,
length distribution and
arrival rate of messages. The decisions concern the
core buffer provision; storage and r e t r i e v a l of messages not in
process; t e l e c o m m u n i c a t i o n s access m e t h o d and control programs. Problems for analysis are
103
the core buffer requirements,
(chapter
9)
storage and retrieval of messages as discussed under the next function. Function
2 , Storage and retrieval of data.
Design data are the volume of permanent and temporary data sets, the number of accesses per application or control function, and the total rate of application and control functions. The decisions concern the types of storage devices, layout of data sets on the devices, required number of devices and their assignment to control units and channels. Problems for analysis are Access rates per d e v i c e and per data set, distribution of seek times and transmission times,
(chapter
10)
(chapter
11)
utilization of channels, devices, data sets, wait times for channels, devices, data sets, response times for data sets. Function
3 , Processing in the CPU.
Design data are the contributions to CPU t i m e use of the applications and control functions, the rates with which these forms of use occur, and the interference from channels. The decisions concern the CPU type, channel types, required numbers of these, and the core requirements. Also, a supervisor program, and processing priorities have to be chosen. Problems for ~
are
the total CPU utilization, the utilizations and wait times per priority cIass,
(chapter
12)
(chapter
12)
and, by putting together results from all three functions, the overall message response t i m e s .
It should again be noted that programmed computations for Computer Center Analysis have been conceived, following the above order, and have been used successfully.
104 Chapter
9 :
Core buffer requirements.
Message transmission over a t e l e c o m m u n i c a t i o n line, once it is started, continues to the end of the message irrespective of how the characters are received in the computer center. It is necessary to provide enough space in core memory of the center so that character by character can be stored there as they arrive. Otherwise, data might be lost. The length of an input message is usually not known to the computer center when a transmission starts. A simpIe provision would then be to atlocate for each line enough core storage to hold the longest possible message. In the case study, Input
B, the longest messages have
150 characters. Some
30
additio-
nal characters of core memory are required to store an identification of the message and a time stamp, arranged in a message control header. The total buffer space is then for the 7
lines which are at least required (see page 101 )
However, the average message length is only about
7 • 180
=
1260 characters.
60 characters for the combined input
and output. Also, the fraction of time during which a iine actually needs its buffer is given by the productive line utilization, which may be about
40 %
(see again page 101 ).
Finally, the buffer use begins with a single characters and builds up to the full message length during an input transmissions; similarly, it decays during an output transmission. This again reduces the actual use of the individual character position of the core buffer. Since the times for line control and transmission are long in comparison to CPU execution times, a more flexible buffer allocation can be applied. It provides a pool of buffer space for all lines. A line which starts a transmission occupies the required space out of this pool. As it needs more, for input of longer messages, it occupies it at an appropriate later time. If it needs less, during output, or after a complete transmission when the whole message has been stored, it gives space back into the pool for use by other Iines. The effect of such dynamic allocation schemes is the subject of this chapter.
i05
The probability assumptions. The message length is assumed to be a random variable ties and moments as considered in chapter At any time
1,
nch
pages 13
with independence, probabili-
ft.
t, for each t e l e c o m m u n i c a t i o n line there is a number
the computer center, requiring buffer space. This number is on. It grows linear with
t
from
0
During output, it decays from some
to some length nch
to
nch
0
nch]t
of characters in
if no transmission is going
during an input transmission.
0. The values
nch[t
for different lines are
assumed to be independent random variables. The above assumption neglects the buffer requirements other than caused by the transmissions. This is acceptable as an approximation if the times to allocate or free space in the buffer pool are small in relation to the transmission times. The additional requirements caused by the storage and retrieval of messages are discussed in exercise 52 . The figure shows a possible pattern of
nchlt
for a half-
duplex line on which input and output are mutually exclusive. Note the analogy to the pattern of remaining service times on page 47 A last assumption concerns the organization and allocation of buffer poot space. The pool consists of a number
M
of cells, each of
L
characters length. In each ceil, some space
will be occupied by identifiers and other control information. The rest is available to store the message proper. Typical sizes of control information are ceil. Meaningful The number number
L
b(t)
%@ for
then are at least
40
to
50
20
two functiom bi(nchlt) , bo(nch[t )
b0
30
characters per
characters.
of p o d cells allocated to a line at any time that time. A value
to
t
depends only on the
which applies if no transmission is going on, and
referring to input and output transmissions, describe this
number of cells. As an example, consider an allocation scheme which always alIocates at
106 least one cell to each line ; then hold the current
nchlt
b0
=
1 . During input, one more cell than required to
is allocated. During output, cells the content of which has been
transmitted are freed. If each cell can hold bi(x ) t bJx)
40
characters of a message,
is 1 more than the smallest integer not Iess than is the smallest integer not less than
x / 4 0 , and
x/40. The figure shows the
b(t)
re-
suiting from the previous figure and the above example. A cell size of
L
=
assumed, and
60 characters was nch[t , L b(t) I
are shown with the same scale.
Expectation and moments of the buffer allocation. The first step in the analysis is to find the probability distribution of
n c h l t . As indicated
above, this random variable behaves very similar to the remaining service times discussed in chapter
3. Its values vary linear between 0 and a random variable
nch
with known pro-
babilities. The only difference is that the base of each interval of linearity is not self, but the transmission time
it-
nch Tch. Thus, the reasoning of pages 52 ft. now leads to
E( nch]t ) k E( nch[t )
=
Fehlt (x)
=
=
Nchlt
=
2 Tch Ra E( nch ) / 2
Tch Ra E(nckh)
and
Here,
nch
/
(k + 1)
for k = 1,2 . . . .
X
U
=
Tch Ra Nch
As stated on page
T c h R a 0~(1 - Fch(Y) ) dy
is the expected line utilization (in the long run) by the trans-
mission of messages proper. For arises with the value
1 - U +
x
=
0, the probability that no character requires buffering
1 - U .
52 , both input and output contribute an individual summand, based on
their individual arrival rate and message length distribution, to the utilization and to the moments and distribution of ed separately.
nch]t. For numerical evaluation, these summands will be treat-
107 As a next step, the moments of
b(t)
probability distribution of
by the general rule
nch[t
which is a function of (see e.g.
nchlt
are found from the
Brunk 1)
oa
E(f(v) )
=
~/~ f(x) d Fv(X) -GO
The differential
dFchlt(x)
is
1 - U
for
x = 0, and
Tch Ra (1 - Fch(X) ) dx
x > 0. The contributions of input and output are separated since different Thus,
for
bi(x), bo(X) apply.
CO
E(b(t) k )
=
b 0 (I - U) + Tch ( Ra, iO~ bi(x)k (I
Fch, i(x) ) dx
CO
+ Ra, o ~0b o ( x ) k (1 Since
bi(x ), bo(X )
and the
- Fch ,o(x) ) dx ).
are piecewise constant in most applications, the
Fch(X)
above integrals can be evaluated as finite sums of products. Exercise
80
shows an a p p l i c -
able technique. The values
k = 1
and B
2 =
are of p r a c t i c a l interest, leading to the expected number E(b(t)
)
of cells a l l o c a t e d to a line, and to the variance V(b(t))
=
E(b(t) 2 )
-
B2
of this number.
Probabilities to exhaust the buffer pool, Since independence of the allocations for different lines is a plausible assumption, the e x pected total allocation and its variance are found by adding the values
B
and
V(b(t) ) for
the individual lines. The criterion for the choice of a number size
ML
M
of cells in the pool, and hence of the pool
in characters, usually is a small probability to exhaust it. Two approximations
for this probabiiity can be suggested. The first is based on the expected total allocation only, and considers the pool as a system of
M
servers, as discussed in chapter
by the expected allocation. Thus,
8. The expected server use of chapter
the probability
P
8
is given
to exhaust all servers can be found
108 from the tables of appendix
C
, page 172 . The other method uses the expected total
allocation and its variance, and approximates the distribution of the allocated number of cells by a normal distribution, as is plausible for the sum of many independent contributions from the different lines. A table of the standard normal distribution is then sufficient to find the probability to exhaust any given
M. Exercise
51
It should be noted that the choice of the cell size tion and the
M
also influences the expected a l l o c a -
to be chosen. TriM-and-error computations may be necessary to m i n i m i z e
the buffer pool size following exercise
h
applies both approximations.
L M. Examples of such computations for the case study are reported 51.
Exercises. 49 of
Define L
b0, bi(x ) and
bo(X) for the following allocation scheme:
One poot cell
characters is always allocated to each line. A further cell is allocated to a line that
starts input. As the arriving characters fill the last but one allocated ceil, a further one is allocated. Each first cell can hold
L - 30
message characters, the consecutive ceils hold
L - 20 characters since they require less control information. For output messages, consecutive cells are allocated as required to hold the whole message. Each cell is freed, except for the last, 50
as its content has been transmitted.
Assume the data of the case study for Input
a line utilization by messages proper of 51
B and Output, the line type
60.
Find the expected total allocation for the case study data as used in exercise
48,
M
B
of servers which has less than
and
1%
ed. Then find the variance of the total allocation, and a similar
V(b(t) ) for
L
and
=
page 100 , and a number
40 %. Compute
II
probability to be exhaustM
with the approxima-
tion by a normal distribution. 52
Starting from the results of exercise
if each message occupies its buffer for an extra
60, which is the effect on 50
B
V(b(t) )
msec after input transmission, or before
output transmission. Note that these time intervals add their contribution into E( b(t~ ).
and
B
and
109
Solutions. 49
T h e p e r m a n e n t a l l o c a t i o n is
the v a l u e of
2. It steps up to
L -20
=
3
40 characters,
at
b0
=
t.
x = L -30
i.e.
at
The input a l l o c a t i o n starts at =
30.
x = 0 with
Further increases occur in intervals
x = 70, 110, 1 5 0 . . .
For output a l l o c a t i o n ,
it is assumed that the longer control i n f o r m a t i o n of
held in the last cell.
T h e n the a l l o c a t i o n is for all
x
30
characters is
one c e l l less than the input a l l o c a -
tion. A f o r m a l expression,
useful in p r o g r a m m e d computations,
is GO
bi(x )
=
1 + bo(X )
with a relation expression of v a l u e •50
0
S i n c e the i n c r e m e n t s of
c o m p u t e d in e x e r c i s e
or
Fch(X)
= 1
l
~[ (x k=0
+
as used on p a g e
8
at the possible message lengths w e r e already
2 , it is c o n v e n i e n t to express the
by these i n c r e m e n t s .
~_ L - 3 0 + k ( L - 2 0 ) )
A partial integration proves that,
B
and
E(b 2)
found on p a g e 107
for both input and output,
O21
.p 0
b(x) k ( 1 - Fch(X ) ) dx
=
,~(~b(y) 0 0
k dy)
dFch(X ) ,
where the i n d e f i n i t e integrals are still fairly s i m p l e expressions, X
X
~/~ bi(y) dy 0
=
x
+
(3O
~/~ bo(Y ) dy 0
S i n c e the longest possible message has k < (180 - L ) / ( L - 2 0 ) . Furthermore, x bo(y)2 ,/" dy 0
=
x J" 0
= 4x
bi (y)2
dy
oo
x+
=
x
+
~-" m a x (0, x - L + 30 - k(L - 2 0 ) ) . k=0
x = 150 characters,
the integrals over
the sum is considered only for
b2
can be expressed as
( 2 k + 3 ) m a x (0, x - L + 30 - k(L - 20) )
k=0 +
m ~_ (2 k+ 5) max(0, k=O
x - L + 30 - k(L - 20) ) .
The following t a b l e shows the first few values of these functions. the i n d e f i n i t e integrals are l i n e a r functions of x
=
(Input)
,2~ b(y) dy 0,jX~b(y) 2 dy 0
viz.
Between the table values,
x.
0
30
70
110
180
0
60
180
340
0
120
480
1120
(Output)
0
30
70
540
0
g0
110
2120
0
g0
190
!I0
T h e i n d e f i n i t e integrals are now e v a l u a t e d for the a c t u a l l y occurring message lengths, m u l t i p l i e d with the r e l a t i v e frequencies of o c c u r r e n c e for these lengths. summed.
and
T h e s e products are
T h e following t a b l e shows the necessary values.
Input
Output s
x
=
124
36
60
72
96
108
120
dFch
1.005
.437
.003
.065
.169
.310
.011
~(y)dy
148
78
150
188
284
332
540
174
390
512
896
1088 2120
J~(y)2dy196 Exercise
4, p a g e
=
48
72
.328
.336
.336
203.9
24
66
114
68.4
623.0
24
lO2
198
108.7
16 , resulted in the arrival rates
Increased by the error overhead Ra, o
24
~..dF
c'
.133 see -1 for e a c h of U = .366 • 6 3 . 3 "
Tch
of page 7
lines. =
33,
Ra, i
=
~..dF
5740 / h o u r , Ra, o = 3293/hr.
the values are
Ra, i
=
.233 sec -1 and
T h e resulting l i n e u t i l i z a t i o n is
.348
Substitution into the f o r m u l a e of p a g e 107 results in B
=
1.50
E(b 2)
=
3.06
V(b)
--
. 797
for e a c h line. 51
For
7
lines,
the e x p e c t e d use of buffer ceils is
If the m u l t i s e r v e r m o d e l with Markov property is applied, searched at which is
U
=
10.5
for the
M
is just not yet successfuI.
1200 characters,
are required.
tionned on p a g e 1 0 4 . a l l o c a t i o n times, information,
In fact,
10.5
60
II
Thus,
M
=
20
- log(1%) = log 100, U = 12,
ceils, with a total size of
This is scarcely less than with the constant a l l o c a t i o n m e n the Markov m o d e l assumes an e x p o n e n t i a l distribution of c e l l
and is thus somewhat pessimistic.
Also, the extra space required for control
together with the assumed extra c e l l for idIe or input times,
7 • Tch..
5.58 .
of p a g e 172 must be
U = 10, M = U + 9, and
e x p e c t e d number of data characters that require buffering, has the v a l u e
table
with a t a b l e v a l u e of at least
4. 60 . Interpolation b e t w e e n the entries for
M = U + 7
1 0 . 5 , its v a r i a n c e
366 • 5010 / 2
=
is significant.
E(nchlt ) , expressed on p a g e
9 1 . 5 characters.
The 106 ,
This is m u c h less than the
= 630 characters which on the a v e r a g e are a l l o c a t e d out of the pool.
111 !f a normal distribution of the number of allocated cells is taken as an approximation, its expectation is
10.5 , its variance 10.5
Thus, a pool of
16
+
5.58 . Its
99-th percentile is at
2. 326 " 5 . ~ ' ~
=
ceils with a total size of
16. O1 .
960 characters would be chosen.
A programmed procedure was used to do similar computations for different cell sizes
L.
Some of the results were for
L
=
a pool size (in characters) of
80
34
44
52
60
68
120
1170
!020
924
936
960
1020
1560
=
is too small a cell size, hence
The two end values are high for obvious reasons.
L
makes the required number of cells excessive. L
=
30
120
keeps the required number of cells
low but leaves too much unused space within each cell. On the other hand, all results for
34 < L ~
68
were between
cating that the pool size is not very sensitive to the choise of
L
924
and
1020, i n d i -
within this range. For a
case with only one or two possible message lengths it would be more sensitive, because then only a few cell size~ fit well with the message lengths. 52
The m a x i m a l number of cells allocated to a message is
bo(nch )
bi(nch )
upon input, and
upon output. The expectations of these number are GO
~/" b(x) 0
d Fch (x)
with the corresponding allocation functions study data and
L
=
b
and length distributions
60 , the expectations equal
If this allocation is held for an extra time
Th
3. 561
Fch . With the case
for input, and
2.008
for output.
per message, the expected allocation
B is
changed by the amount T h ( Ra, i . 3.561 + R
a,o
For
Th
=
.05
sec, this amounts to an increase of
will increase by the same order of magnitude.
" 2. 008 )
=
1. 0 9 8 T h
5.5 %. The required buffer pool size
112
Chapter
10 :
Service times of direct-access storage devices.
A major part of the time necessary to process a message is often spent on accesses to a data base. The desire to process messages as soon as they arrive calls for a possibility to access the data base 'randomly', i . e .
at a random point within the space in which it is stored.
Direct-access storage devices with magnetic recording on different media have been devised as economic solutions. Typical forms are magnetically covered drums or cylinders, disks, and strips that can be placed on a drum. Such devices need a physical motion to enable storing and reading of data, and possibly a positioning of read heads and strips. The physical motion is in all cases provided by a rotation with practically constant angular speed. Any particular data pass under the read heads only in intervals of a full rotation time. Thus, if requests for data transmission arise asynchronous with the rotation, the~c execution is delayed by half a rotation time on the average. In fact, a probability distribution of the delay times can be assumed which is uniform between
0
and a full rotation time.
The positioning of read heads is also known as seeking. For disk storage, it consists in a radial motion of a set of read heads. The time of motion depends on the radial distance travelled. For strip storage, it consists of a motion of read heads along the drum surface, and possibly a concurrent rotation of the cell which contains all strips. This rotation takes the sense of the shorter angular distance to the desired strip. A general concept of a cylinder is introduced for the sets of data which are accessible with the same position of read heads. The different cylinders and positions are then numbered such that adjacent positions have adjacent numbers. A seek motion is then described by the cylinder number
m
at which it ends, and the cylinder number
n
at which it starts.
The following tables give some characteristics of typical devices. Capacity (characters) Drum
Subcells
Strips
4.10 6
Disk
2.9.10 7
Strip
4-10 8
Cylinders
2000
char/see
17.5
1.2.10 6
200
25
3.12.10 5
10000
50
5.5-10 4
1
200
Rotation (msec)
113
S e e k t i m e s for a t y p i c a l disk storage depend on the distance Distance
d
Seek t i m e (msec)
d
= I m - n l of cylinders:
0
1
7
8
10
37
60
91
199
0
25
32
33
29
50
66
70
135
A v e r a g e seek t i m e s for a t y p i c a l m a g n e t i c strip storage are for a m o t i o n b e t w e e n cylinders of the s a m e strip
95 m s e c
of different strips in the s a m e subcell
175 m s e c
in subcells with a c y c l i c distance of
E.g.,
if the m o t i o n starts at cylinder
cylinders
m =
2-5
6-50
95
175
is (in msec) Additional
1 subcell
250 m s e c
50 subcells
800 m s e c
100 subcells
400 m s e c
n = 1, the t i m e to r e a c h 51 - 100 . . .
4951 - 5000 . . .
250
9951 - 10000
400
250
200 m s e c are required to restore a current strip before a new one is accessed.
This t i m e does not contribute to the message processing t i m e if it i s ' c o m p l e t e d before the next data r e f e r e n c e arises. All t i m e s not quoted a b o v e should be found by l i n e a r i n t e r p o l a t i o n .
Probability assumptions. The t i m e s for data transmission are d e t e r m i n e d by the transmission speed of the d e v i c e , quoted in the t a b l e of the previous p a g e in c h a r a c t e r s / s e e , mitted. amounts,
and by the a m o u n t of data trans-
T h e i r probability distribution is simply r e l a t e d to a known distribution of data as discussed in chapter
2, p a g e
26
.
The delays by rotation are also random variables, transmission times.
i n d e p e n d e n t of e a c h other and of the
T h e i r uniform distribution was m e n t i o n n e d above.
T h e positioning t i m e s
tp
in a s e q u e n c e of accesses are again random variables.
d e n c e of e a c h other and of the other a b o v e - m e n t i o n n e d t i m e s is assumed. distribution of the
tp
ing occurs from c y l i n d e r
is d e t e r m i n e d by the probabilities n
to cylinder
m.
Pro, n
Indepen-
T h e probability
that a p a r t i c u l a r p o s i t i o n -
114 Expectation and moments of the seek time distribution. The positioning time for given
m,n
is a function
f(m,n)
of these two cylinder numbers.
Its expectation and moments are therefore found as tk
E( p ) where
M
M Z" m=l
=
M Z n=l
;k=l,2
fk(m, n) Pm, n
....
is the total cylinder number of the device. The expected positioning t i m e 9. 2 k = 1. The variance Vp can be found as E(C.t,) - Tp
results for
T
P
For actual computation of these sizeable double sums it is advisable to first collect all terms with the same value tance
d
=
f(m,n). With disk storage, all values of
m -n
for the same dis-
are the same, and can be described by a function
E( t k ) P Typical values for
f(m,n)
f
assumptions about the
M-1 ~ gk(d) d=l
=
and
g
Pm, n
g(d). Then
M-d m~=l ( Pm, m+d + Pm+d,m) =
were stated on the previous page. The effect of several is discussed in the following exercises.
Exercises. 53
Assume that only the first
N
cylinders of a disk storage are used, that each
access adresses any one of these cylinders with equal probability, and that the positions for consecutive accesses are independent of each other. Find the probabilities sums which are factors of N = 1. . . . . M
and each
gk(d). Show that the sequence of all values k, can be computed from the values
Give the expected seek time and its standard deviation for based on the 54
g(d)
N
gk(d) =
Pm, n
and the
N2 E('t k ) / 2 with
2 M
, for additions.
2, S, 10, 50, 100, 200
of page 113 .
Assume that the ITEM data set is stored on one magnetic disk device. Use the
relative access frequencies to find probabilities that a particular cylinder is accessed, and the multiplication rule for independent random variables to find the
P m , n ' Compare the
expected seek times for two possible layouts: Cylinders
91 - 110
for the most frequently accessed items, 1 - 60 and 141 - 200
for the least frequently accessed items; or
1 -20 ,
81 - 2 0 0
respectively.
115 55
Assume equal probabilities to access any of
a d e p e n d e n c e of consecutive accesses which makes
200 cylinders in a disk storage,
Pm, n
=
0
if
m,n
but
belong to the
same half of cylinders. This situation arises if two data sets on the s a m e device, stored in cylinders
I -100
and
101 - 2 0 0 ,
are accessed a l t e r n a t i v e l y . Find the other
the simplest possible i n d e p e n d e n c e assumption, and express and
N = 200
of exercise
T
53. C o m p a r e with the result for
Pm, n
by the results for P N = 200.
under
N = 100
Solutions. 53
T h e probabilities to access one of the
Pm, n
1/N2
In fact,
for
cylinders are all equal to
m ~ N, n ~ N , while they are zero for all other M-d ( Pm, m+d + P m + d , m ) = 2 (N - d) / N2 m=l
this results if any
Furthermore,
N
N
m,n.
l/N, and the Therefore,
consecutive cylinders are the only ones used.
k E( tp )
=
S.(k)
=
N-1 Z d=l
gk(d) • 2 (N - d) / N 2
=.
2 S(Nk)/N 2 .
N-1 For the sums
N2E(tk)/2
=
gk(d) ( N - d ) d=l
the recursion
s(k)N+I
=
s(k)
+
~N
g k(d)
d=l is evident,
so that ali
been found by another
S(k) M
can be found by
M
additions, once all sums
N ~ gk(d) d=l
had
additions.
For the seek times of page 113 , some results are stated fn the following table. Number
N
of cylinders used
Expected seek t i m e
Tp
Standard d e v i a t i o n V ~ p
2
5
10
50
100
200
12.5
20.9
25.2
35. I
45.8
62.3
(msec) i 12.5
I0.5
8.7
9.2
14.9
24.2
(msec)
The expected seek t i m e iS sensibly reduced by small
N .
54
5
With the access frequencies stated on page
linder are 40% / 60
50% / 20 =
=
.025
, the access probabilities per c y -
for the most frequently used
.00667 for the next group, and
20
cylinders,
.000833 for the least frequently used ones.
116 For the first, containing
c e n t e r e d layout these probabilities are arranged as as a s e q u e n c e of values 60 values . 00083,
values . 00083.
For the second,
60 values .0067, The
Pm,n
30 values . 0067,
20 values .028,
80 values .0067,
a s y m m e t r i c layout the a r r a n g e m e n t shows
Pm
and 60
20 values . 025,
and 120 values . 00083 .
are found as products
PmPn • In the expression for
is the probability that the distance
d
occurs.
the factor
E(t~,
of
g~d)
S o m e of these probabilities are i n c l u d e d in
the foUowing results of a p r o g r a m m e d c o m p u t a t i o n : Layout
Tp
Vp
msec
msec 2
probability of the distance 5
20
100
1 (centered)
42.9
259.1 = 16.12
.0268
.0156
.0015
2 (asymmetric)
49.3
548.8 = 23.42
.0285
.0106
.0015
T h e a s y m m e t r i c layout results in an increased e x p e c t e d seek t i m e b e c a u s e the short distances occur with slightly lower probabilities. T h e array of probabilities
58
size.
Pm, n
is partitioned into four square blocks of equal
T h e two blocks which contain the diagonal d e m e n t s
tions within one data set, h e n c e h a v e all zero e l e m e n t s . pair
m,n
is assumed to be e q u a l l y probable.
Thus,
Pro, m
correspond to seek m o -
In the two other blocks,
the r e m a i n i n g
Pm,n
each
are all e q u a l to
2/N 2 The resulting array can be composed from the arrays, only the first (last) h a v e the probabilities
N = M/2
cylinders are used,
4 / M 2 ; these arrays are denoted by
all cylinders are used i n d e p e n d e n t l y , In fact,
=
Tp
which is
26 %
so that
83, arising if
so that the occurring motions p(1,100)
, 2,0n0 ) F. ( 1m
=
and p(101,200) 1 /M 2
2 .(1,200) i, m , n
( _(1, :00) p(101,200) i' m , n + m,n
) / 2
:
2 T
( T
) / 2
=
2 • 62.8
Pro, n Therefore,
discussed in e x e r c i s e
200) -
45.8
100) + - P msec
:
78.8 m s e c
m o r e than for independent accesses to the s a m e data.
7 9 . 6 r o s e , arises if accesses a l t e r n a t e b e t w e e n cylinder
1
"
A similar result,
and the other cylinders.
viz.
117
Alternating accesses to an index and data. Alternating accesses to one cylinder and to the r e m a i n i n g cylinders, of the previous exercise,
as discussed at the end
occur frequently in data r e t r i e v a l applications.
cylinder contains an index,
i.e.
the desired data are stored.
T h e index is p a r t i a l l y read,
There,
the single
i n f o r m a t i o n about the l o c a t i o n within the d e v i c e at which
is positioned for the data access.
and interpreted,
b e f o r e the d e v i c e
Examples for the case study are considered in the next
chapter. Assume that the index is in cylinder cylinders
1
noted by
Pm
Then,
through for
m 0 , and that the data occupy the r e m a i n i n g of the
N. T h e probability that the index w i l l point to a cylinder m = 1, 2 . . . . .
the joint probabilities
N. This probability is
Pm, n
0
are z e r o if neither
for
:
Pm, m 0
=
m = m0
nor
n = m 0. T h e y are
Pm,n'
viz.
Pm / 2 :
T h e probabilities to c o m e to the index from position use of the index,
is d e -
m : m0 .
different from z e r o only in one row and in one c o l u m n of the array Pm 0 , m
m
m,
and to r e a c h position
m
are both equal to h a l f the probability that a d a t u m is in cylinder
after a m.
Mean and m o m e n t s of the seek t i m e are then reduced to the sum over only one index N
E(tk)
=
~
)Pm
gk( m - m 0
"
m=]
If all data cylinders h a v e the s a m e probability a v e r a g e of the values Two choices of
g
m0
k
1/(N-l)
to be accessed,
this sum is just an
w h i c h enter it.
h a v e b e e n considered for p r a t i c a l a p p l i c a t i o n ,
viz.
m0 :
1
which
places the index at one end of the data set; and an i n d e x in the center of the data set, which for odd E(t k )
N
amounts to
is t h e a v e r a g e of all
m0
=
gk(d)
gives some results for this case.
(N-1)/2.
with
d
With the index at the end of the data,
from
1
through
N-l.
T h e following t a b l e
For c e n t e r e d index, read it at h a l f the data set size. 2
5
i0
50
100
200
(msec)
12.5
21.4
26.4
40.5
54.0
79.6
Standard d e v i a t i o n IVVP (msec)
12.5
10.8
9.1
8.5
15.9
30.5
Number
N
of cylinders used
E x p e c t e d seek t i m e
T
p.
118
Chapter
11 :
Queuing for data accesses.
A c o m p u t e r center which serves as a data base for m a n y independent users is bound to c r e a t e a v a r i e t y of queuing situations. quests asynehronously,
For e f f i c i e n t operation,
as far as this is possible.
p e t e for the central processing unit
(CPU)
and for the data transmission channels. action at a t i m e ,
Thus,
it is essential to treat individual rethe user messages do not only c o m -
as a server, but also for the data storage devices
Both devices and channels can only be devoted to one
and other requests for service arriving during this t i m e h a v e to wait.
T h e typical structure is a queuing situation on two levels. Tasks which are in exectition by the CPU c a l l for data accesses as they are necessary for the application considered.
T h e case study,
page
4
, describes such requirements for different
message processing tasks. T h e data accesses are e x e c u t e d by one or several d e v i c e s which hold the data set. S i n c e each access adresses a unique p i e c e of data, device.
Thus,
it can only be serviced by one particular
the devices constitute a set of independent single servers.
accesses is split,
according to usually known r e l a t i v e frequencies,
T h e total stream of
into separate arrival
streams for these servers. The service t i m e of each d e v i c e is a sum of transmission t i m e , sibly a seek t i m e .
Depending on the data organization,
e a c h such t i m e once, data layout,
or several times.
known as an index,
rotational delay,
and pos-
a single data access m a y require
T h e l a t t e r situation occurs if a description of the
must first be read from the s a m e d e v i c e .
access is always required for the data themselves.
an extra
Another type of data l a y o u t i m p l i e s that
the data found in a first access m a y not yet be the desired data, s a m e d e v i c e where the desired data can be found.
Then,
Then,
but point to an area on the
an extra delay arises only for a
certain fraction of the data. A further contribution to the d e v i c e service t i m e is caused by the second l e v e l of queuing, that of d e v i c e s c o m p e t i n g for a channel.
In fact,
several devices are usually a t t a c h e d to one
channel as a single server, or m a y be switched to any one of a few channels which form a
119 multi-server system as discussed in chapter
8.
The service time of a channel is, for the devices quoted on page 112 , the sum ofrotatior~al delay and data transmission time. These time constitute the essential part of channel u t i l i zation. The amount of control information which also passes the channel, viz. device adresses, desired seek positions, and responding interrupts, is usually small in comparison with the data transmitted. Devices which sense their rotational position permit to reduce the part of channel service time which is rotational delay. They try to use the channel only when the data are almost under the read heads. This implies a small risk to delay the transmission by one or even several full rotations because the channel may be busy when the device tries to use it. Thus, the device service time, considered in the first level of queuing, might be increased. This chapter discusses both levels of queuing under a common point of view.
Queues with finite population. A common property of the queuing situations for both channels and devices is the finite number of individuals that can ever place a request for service. These individuals form a finite population of items. The number of devices attached to a channel is finite. If all of them have placed a request for data transmission, by sending an appropriate interrupt signal, say, no further requests are possible until a device completes its transmission. With a wait time
T
w
FIFO
discipline, the expected
for any device cannot exceed the sum of expected service times for the
competing devices. The queuing system is statistically stable by its very nature. This was already concluded for the Markov queuing process with finite population in chapter cise 44 , page 95 . Also, the resulting
Tw
POISSON arrivals for the same utilization
U.
8, exer-
turn out to be considerably smaller than with
The number of tasks in a CPU is also finite for reasons of memory space. It may, however, be considerable. The effect of a limited number is noticeable whenever the utilization of the serving device is high~ it is also noticeable if the number of tasks goes up as high as 20.
120
Only for still higher numbers, the POLLACZEK-KHINTCHINE formula could be considered as approximation. Another effect of the finite population is that the number of arrivals depends on the number of services completed. Hence, even though the individuals might desire to enter the system at a high rate, they cannot do so unless the previous service is complete. Thus, the 'throughput' of the queuing system is not only determined by the individuals' desire to reenter the system. It should be noted that the 'conversational' use of terminals, discussed in chapter
6, is also
generated by a finite population, in this case consisting of one single user.
The probability assumptions. As for all preceding queuing models, the service times
ts, m
independent random variables with a common distribution The population size
N
are assumed to be mutually
Fs(X).
is considered constant.
The arrival process is no longer a POISSON process but is described by the intervals
tr
bet-
ween the end of service for one item, and the t i m e when it returns into the queue with a request for service. The return times
tr
of each item, and of the different items, are
assumed to be mutually independent with a common exponential distribution Fr(X)
=
1 - e-Rrx.
This assumption, introduced already on page 78 the service is a repair, and
tr
, corresponds with practical experience if
the time to the next failure of a repaired device. The
finite-population queues were in fact first discussed for such applications. (Takacz 1'2) In the context of this course, the assumption is used because it is the only one maintaining a certain Markov property of the arrival process (see Section
8.) In fact, it is the only
assumption leading to formally convenient results. As discussed at the end of chapter these results may be pessimistic in a practical design situation.
5,
121
Relations b e t w e e n u t i l i z a t i o n and queuing variables. For e a c h i t e m
n ,( n = 1 , 2 . . . . .
als is the sum of a t i m e to the queue.
Thus,
tq
N)
of the population,
the t i m e b e t w e e n c o n s e c u t i v e arriv-
spent in the queuing system,
a time interval
(0,T)
passes of the i t e m through the server,
and a t i m e
tr
before it returns
b e t w e e n any two arrivals which covers
ns(0,T)
and h e n c e as m a n y i n t e r - a r r i v a l t i m e s of the i t e m ,
can be written as T
=
ns(0, T) ( t q , m + tr, m ) m~ =- l
=
ns(0, T) ( tq
B
If statistical stability can be assumed, i t e m has the l i m i t e x p e c t a t i o n Next,
T
q
the a v e r a g e i n t e r - a r r i v a l t i m e +
consider the arrivals of any of the
in the long run,
is
N
+ tr )
T
T/ns(0, T)
of the one
r N
items.
For reasons of s y m m e t r y ,
t i m e s as high as for the i n d i v i d u a l i t e m ,
their number,
resulting in a l i m i t e x p e c -
tation of the i n t e r v a l t i m e b e t w e e n arrivals of any i t e m of 1 = --~ ( T q + T r )
Ta
Using the g e n e r a l first-order r e l a t i o n of p a g e Tq
=
Nq T a
37
,
,
the above equation can be rewritten as (N
- Nq)
/ Tr
T h e a v e r a g e arrival rate of the items is i t e m s no___~tin the queuing system. system desire to return,
= Rr
I/T a =
=
t/T r
Ra
m u l t i p l i e d by the e x p e c t e d number of
This result is plausible since e x a c t l y the i t e m s not in the
with an individual rate of
Rr,
T h e server u t i l i z a t i o n has the l i m i t e x p e c t a t i o n N Ts U
=
Ts/T a
Tq + T r
which in fact depends on the e x p e c t e d t i m e spent by e a c h i t e m in the queuing system. Inversely,
all l i m i t e x p e c t a t i o n s of the queuing variables can be expressed by
assumed data,
viz. Tq
=
N Ts / U
-
Tr
,
U
and the
122 with the other l i m i t expectations following from the general first-order relations as Tw
=
Tq - T s
=
T s ( N / U - 1) - T r
Nq
=
Tq / T a
=
N
U Tr/T s
Nw
=
Nq - U
=
N
U( T r / T s + 1)
The remaining problem is to find the l i m i t utilization
U(T r, T s, N)
in its dependence on
the assumed data. This can be called the throughput problem because it brings the actually possible utilization, or 'throughput', of the server in relation to the utilization 'desired' by the items as individuals. In fact, U As an example, consider
N
=
1.
expected time spent in the system is
N Rr T s
is always less than this desired value.
If there is only one item, it will never wait, and the Tq
=
Ts.
Thus,
T U(T r , T s,1) The same expression for
U
-
s Ts + Tr
=
RrT s / ( 1 + RrT s) <~ RrT s .
was already derived in exercise 42 of chapter
8
under the
additional assumption of an exponential distribution for the service times. For general
N,
U(T r , T s,N)
can be found (Takacz 1) by the method discussed in Section
of this course. In fact, this method could be presented in the context of this chapter. However. it is described in a seperate section because it applies to a l i queuing models used so far. This chapter only states the final formula for
U, and uses some of its numerical re-
suits for several application exercises. The numerical results are contained in the tables of appendix
C , pages 170 and 171.
Exercises. 56
Assume, for the processing described in the Case Study, a system with a single
data channel through which pass all input messages when logged, all requests when stored and retrieved before they enter processing all accesses to the data base as required by the application processing all output messages when stored and retrieved before being sent over a line. Since these operations are not in all detail determined by the Case Study data, make the
123 following additional assumptions
:
The data sets of queued messages, logged messages and ITEMS are placed on three different disk devices. The CUSTOMER data are stored on two further devices. Queued and logged messages are written sequentially. In retrieving a queued message, only the two most recently written cylinders need be considered. The required adressing information is held in core memory. This information is usually called an index. Retrieval and storage of ITEM data and CUSTOMER data requires large indices, partially stored on the disk devices themselves. Some of this information must first be read, before the actually desired location becomes accessible. Thus, at least two data transmissions, and possibly two positioning motions are required to read or write data. Only when an updated record is written, it can be assumed that the corresponding adressing information was found during a preceding read and has been saved in the CPU. Assume that the ITEM data are stored in One track in each cylinder, i . e .
40
cylinders, an index to which is held in core.
the part of a cylinder read in one rotation, contains an
index to the individual blocks of 1/6
track length which can be found within the same cy-
linder. Thus, one seek, but two transmissions are required for retrieval and storage. The CUSTOMER data are stored in two times
200
cylinders of two devices. In both devices
one cyiinder contains an index to the cylinder and track of the desired data. Thus, two seek motions and two transmissions are required. An index in core selects a track of the index. Data transmissions for queuing and logging occur in full buffer pool ceils of as were discussed in chapter
60
characters
9. Index data are scanned during the read, starting at a parti-
cular point of the track, until the desired entry is found. This takes a time with approximately the same uniform probability distribution as assumed for the rotational delay. ITEM and CUSTOMER data are transmitted in blocks of 1/6 stant transmission time of 1/6
track length. This takes a con-
rotation t i m e , i . e . 4.2 msec.
The data layout is not quite realistic, as the following exercise problem will show : Find the percentage of storage capacity used in the devices for ITEM and CUSTOMER data,
124
57
With the assumptions of exercise
56
,
find the expectation and variance of trans-
mission times for the different operations of each device, the occurrence rates of these operations, and the overall service t i m e parameters for the channel. page 171, with a population size of
N
=
Use the table of appendix C
5 , to find approximately the expected t i m e
waited for the channel service. g8
Based on exercise
57 , find approximately the effect of channel wait times on
the service times of the different devices. Note that not only a data transmission as discussed above may have to wait until the channel is available. A seek motion is also started by a short adress transmission through the same channel and may therefore be delayed if the channel is busy. These adress transmissions, however, add very l i t t l e to the channel u t i l i z a tion,
and are handled with high priority. Thus, results of chapter
approximate this additional delay.
can be used to
Variances of wait times can be approximated from the
exponential distribution suggested on page 59
ff
50 already.
Assume that a finite population of
3
tasks may issue requests for access to the
ITEM data. With the device service t i m e considered in exercise
58,
find t h e expected t i m e
which a request is waiting before it can use the ITEM device.
Solutions. 86
Current sizes of the ITEM and CUSTOMER data sets are stated on the first page of
the Case Study report. For the ITEM data the current size is million characters.
Incremented by
5%
8.42 • 106 .( 1.05 )8 which is
14 %
18,000 • (10 + 180 ) = 8.42
during three years, the size will reach =
8.96
m i l l i o n characters,
of the total capacity of the device, hence
20 %
of the capacity of
40
cylinders. A growth factor of the CUSTOMER data set is not stated in the Case Study. If the
9%
yearly increase of the worMoad is also applied to the CUSTOMER data volume, and the additional locations are assumed to bring new customers proportional to the workload, a future size of
47,000 • (20 + 350) • (1.09) 3 • ( 1 + 5 3 , 2 0 0 / 1 5 5 , 1 0 0 )
=
3.08.
107
125
characters results. This is slightly more than the capacity of on__~edevice. The capacity of two devices is used to about
80 %. A natural design alternative would therefore be to store
both ITEM and CUSTOMER data on only two devices. The choice of another data layout, however, changes the access times and their probabilities. 87
The solution of the next three exercises is prepared by giving a tabular arrange-
ment of the rates with which data input and output occur, and of the corresponding service times for devices and channel. Table
1
shows the rates for the message processing tasks,
accesses to data. vidual
and the corresponding rates for
The tasks are stated in the order in which they are performed for an indi-
message. Rates are given per hour as on page TASK
16
.
INPUT / OUTPUT
function
rate
operation
Log a message
5740
WRITE sequential
Store a message
5740
Retrieve request
3293
DATA SET
rate/task
identifier
total rate
1
LOG
5740
WRITE small set
1
QUEUE
5740
READ smali set
1.74
QUEUE
5740
Process request CR1 2216
READ indexed
1
ITEM
2216
Process request CR2
READ indexed
1
CUSTOMER
READ indexed
8.45
ITEM
8340
WRITE updated
8.45
ITEM
8340
WRITE updated
i
CUSTOMER
988
988
988
Process request CR3
63
WRITE indexed
1
CUSTOMER
63
Process request CR4
26
READ indexed
1
CUSTOMER
26
WRITE updated
1
CUSTOMER
26
Store a message
3293
WRITE small set
1
QUEUE
3293
Retrieve a message
3293
READ small set
1
QUEUE
3293
On the next page, rences per hour,
the table shows for each device and access operation the rate of occur-
and the expectation and variance of all contributions to the service time.
The sums in the last two columns include an expected rotational delay of the variance of this delay,
equal to
252/12
=
52 msee 2
12.5 msec, and
for a uniform distribution.
126 DEVICE
ACCESS
identifier
operation
rate
Seek t i m e
Transmission
Sum + rotation
Ts
Vs
T
Ts
Vs
msec 2
msec
msee 2
msec
msec 2
.3
0
12.8
52
.3
0
25.3
208
/hour m s e c LOG
WRITE
5740
QUEUE
WRITE
9033
READ
9033
total
18066
12.5
READ index
10556
27.42)
ITEM
data
READ
(each)
156
73
27.4
73
29452
S
.3
0
25.3
208
12.53)
52
52.4
177
4.3
0
16.8
52
4.3
0
44. 2
125
7.24
34.2
37.3
363
index
5071 54.04)
253
12.53)
52
79.0
357
data
5071 54.0
253
4,3
0
70.8
305
62.55)
590
4.3
0
79.3
642
54.0
253
12.5
52
79.0
357
32] 54.0
253
4.3
0
70.8
305
76.3
446
WRITE updated WRITE new data total transmissions
CHANNEL
V
s a m e as previous line
8340
total
156
10556
WRITE
CUSTOMER1 , 2
12.51)
S
507
32
i
15841
7.09
32.8
74492 ]
3.33
26.7
Notes concerning the c o m p u t a t i o n of t a b l e entries: t)
It is assumed that
2
cylinders are in actual use at any t i m e .
T h e table entries
are read from the results of e x e r c i s e 58 , p a g e 115 . 2)
T h e particular access probabilities for the ITEM data w e r e a p p l i e d to
40 cylinder~
3)
T h e t i m e to scan an index track has a p p r o x i m a t e l y the s a m e probabilities as the rotational delay.
4)
Read from the t a b l e of p a g e 117 .
5)
This is a seek from data to data.
Hence,
the t a b l e of p a g e 115 applies.
All totals of e x p e c t a t i o n s w e r e found by linear c o m b i n a t i o n in proportion to the a p p l i c a b l e rates,
as described oh p a g e
second m o m e n t s .
15
. T o t a l v a r i a n c e s are found by linear c o m b i n a t i o n of the
127
T h e a r r i v a l r a t e t o t h e c h a n n e l as server is
74492 / 3600
:
2 0 . 7 sec -1.
The parameters
of its s e r v i c e t i m e distribution are found f r o m those of t h e transmission t i m e s by a d d i n g t h e v a l u e s for t h e r o t a t i o n a l d e l a y : For t h e d e v i c e under c o n s i d e r a t i o n , t h e c h a n n e l is d e v o t e d to t h e d e v i c e also during t h e t i m e of r o t a t i o n a l delay.
It is only w i t h d e v i c e s w h i c h sense
t h e i r own r o t a t i o n a l position t h a t this c h a n n e l use c a n b e m o s t l y e l i m i n a t e d .
T h e c h a n n e l u t i l i z a t i o n results as
U
=
20.7
• 1 5 . 8 . 10 -3
=
.3275.
A further p a r a -
m e t e r for r e a d i n g t h e t a b l e s o f t h e a p p e n d i x is t h e r a t i o 2 T s / Vs With
N
=
;
3.16
5 , t h e a c h i e v a b l e throughput r a t i o R
=
U /(NRrTs)
=
.92
is a p p r o x i m a t e l y r e a d by i n t e r p o l a t i o n in t h e t a b l e o f p a g e Tr and,
=
N R Ts / U ,
by substitution in t h e f o r m u l a of p a g e 122 , Tw
= =
171 . It p e r m i t s to find
T s ( N (1 - R ) / U .221
Ts
=
(or by r e a d i n g p a g e 170 directly)
- 1) 3.5
=
T s ( .4 /.3275
msec .
If t h e c h a n n e l is not h e l d during t h e t i m e of r o t a t i o n a l d e l a y , U
=
2 T s /V s
- 1)
t h e c o r r e s p o n d i n g results a r e
.069 =
so t h a t t h e t a b l e s of p a g e s 170,
.4 171 are not s u f f i c i e n t . A s e p a r a t e c o m p u t a t i o n r e s u l t e d in
R
=
.9848
Tw
=
T s ( .076 / .069
=
.llT s
=
1 86 m s e c ,
showing a r e m a r k a b l e r e d u c t i o n .
58 mission.
T h e transmission o f seek adresses has a n o n - p r e e m p t i v e priority o v e r the data t r a n s T h e adresses t h e m s e l v e s are s m a l l a m o u n t s of d a t a t r a n s m i t t e d over t h e c h a n n e l .
C o m p a r e d w i t h t h e p r o b l e m data, channel.
t h e y result in a very s m a l l a d d i t i o n a l Utilization of the
With the n o t a t i o n of c h a p t e r 7, p a g e
79 , two u t i l i z a t i o n s
c o n s i d e r e d w h i c h h a v e t h e a p p r o x i m a t e values U1
=
0
;
U2
=
U .
U 1 , U2
h a v e to be
128
T h e result of c h a p t e r data,
?
about the expected wait times
was b a s e d on t h e a s s u m p t i o n of POISSON arrivals.
be a reasonable approximation that the ratio arrivals,
Tw, t
for seek adresses,
For a f i n i t e p o p u l a t i o n ,
Tw, 1 / Tw, 2
Tw, 2 for
it s e e m s to
is t h e s a m e as for POISSON
viz. Tw, I
=
(1
-S2)Tw,
T h e e x p e c t e d w a i t t i m e of data, a f f e c t e d by t h e a d d i t i o n a l ,
Tw,2
2
=
(1
-U)Tw,
2 .
' as found in t h e previous e x e r c i s e ,
very s m a l l u t i l i z a t i o n caused by t h e adresses.
is n o t m u c h
Thus,
Tw, 1
can
b e a p p r o x i m a t e d as Tw,1
=
( I - .3275)
=
149 T s
• .221 T s =
2.3
reset.
T h e s e w a i t t i m e s are further a d d i t i v e c o n t r i b u t i o n s to t h e d e v i c e s e r v i c e times. below shows how often t h e y o c c u r w i t h i n t h e d i f f e r e n t o p e r a t i o n s . occurrences,
The table
W i t h t h e s a m e n u m b e r s of
t h e v a r i a n c e s of w a i t t i m e s c o n t r i b u t e to t h e v a r i a n c e of t h e d e v i c e s e r v i c e
time. A p p r o x i m a t e v a l u e s for t h e v a r i a n c e s of w a i t t i m e s c a n b e found from t h e a p p r o x i m a t e distribution Fw(X )
=
1 - U e -Ux/T
w h i c h was a l r e a d y used in c h a p t e r Vw
page
50
2 Tw ( 2/U
=
For t h e c h a n n e l u t i l i z a t i o n of
4,
w
U
=
.3275,
Vw, 1
=
27 m s e c 2 ,
Vw,2
=
62 m s e c 2 .
. T h i s d i s t r i b u t i o n has t h e v a r i a n c e 1)
.
this r e l a t i o n is
Vw
=
2 5.1 Tw , i.e.
T h e e x a c t results w o u l d b e s m a l l e r s i n c e t h e e x p o n e n t i a l a p p r o x i m a t i o n p e r m i t s u n l i m i t e d wait times,
w h i l e t h e f i n i t e p o p u l a t i o n keeps a l l w a i t t i m e s b e l o w t h e sum of
N - 1
set-
vice times. T h e t a b l e b e l o w also shows t h e a c c u m u l a t e d times.
e x p e c t a t i o n ond v a r i a n c e of d e v i c e s e r v i c e
The indexed operations have relatively long service times because they hold the de-
v i c e u n t i l two accesses h a v e b e e n c o m p l e t e d . form of l i n e a r c o m b i n a t i o n as used on p a g e
T o t a l s per d e v i c e w e r e found by t h e s a m e 15
.
129
T a b l e of w a i t o c c u r r e n c e s and d e v i c e s e r v i c e t i m e s ,
DEVICE
operation
rate
LOG
WRITE
5740
QUEUE
any
18066
ITEM
READ
Ts(msec )
V s ( m s e c 2)
1
16.3
114
1
1
31.3
297
10556
1
2
78,5
380
8340
1
1
50.0
214
65.9
507
WRITE u p d a t e d total CUSTOMER1 , 2 (each)
18896
READ
507
2
2
161,4
840
WRITE u p d a t e d
507
1
1
85,1
733
32
2
2
161,4
840
124.4
2245
WRITE new total
59
1046
T h e arrival r a t e to t h e
T h e d e v i c e u t i l i z a t i o n is value R
=
8.56,
adresses data
U
=
ITEM d e v i c e
as server is
5.25 • .0659
=
so that the t a b l e o f a p p e n d i x C ,
18896 / 3600
. 3 4 6 . T h e ratio
=
T 2 / Vs
5 . 2 5 sec -1 has t h e
p a g e 171 , is read for a throughput ratio of
. 8 6 6 . T h e e x p e c t e d w a i t t i m e is c o m p u t e d as
T
W
=
Ts ( 3..134/.346
-
.158 T
s
1) =
10.4
msec .
:
76.3 msec .
T h e e x p e c t e d d e v i c e response t i m e is then Tq
:
T s + Tw
The r e l a t i o n b e t w e e n u t i l i z a t i o n and return rate.
For a g i v e n return r a t e
Rr
=
1/T r
and p o p u l a t i o n s i z e
N , the l i m i t e x p e c t a t i o n
U
of
the server u t i l i z a t i o n can b e c o m p u t e d as a r a t i o n a l expression i n v o l v i n g the LAPLACE t r a n s form
LFs(S )
of t h e distribution o f s e r v i c e t i m e s ( T a k a e z l ) .
T h e expression is
NR r T s U (Rr , N , F s ( x ) )
= N Rr T s +
where
P0
ver i d l e .
is the l i m i t p r o b a b i l i t y that an i t e m , Section
3
discusses why this
P0
P0
w h e n finishing its s e r v i c e ,
a p p e a r s in this c o n t e x t .
l e a v e s the s e r -
T h e v a l u e of
P0
can
130
be computed
as P0
with constants
c',
recursively
l
cj
As s e c t i o n
3
N-1 1 / ~ cj j=0
=
d e f i n e d by
that,
1 - LFs(JR r)
J
LFs( J R r ) the expressions
given
j
j
for
LFs( j R r )
, for
1 - LFs( j R r )
j = 1,2 .....
j = 0, 1, 2 . . . . .
n o n e of t b e m
Fs(X )
viz.
U
is thus d e t e r m i n e d .
Two special
=
1 - e-X/Ts
a re-
that at
c a s e s a r e of
1
-
;
hence
LFs( j Rr )
1 + j Rr T s
s i m p l i f i e s to
cj
= =
In o r d e r to s e e t h e r e l a t i o n t h e e x p r e s s i o n for
,
, t h e LAPLACE t r a n s f o r m is v e r y
1 + Ts s ej
N-1
places
is t h e n t h e p r o b a b i l i t y
1
T h e r e c u r s i o n for t h e
,
to e a r l i e r results.
distribution
LFs(S )
N-1
a request within a service time.
distribution,
interest since they are related
simple,
cj-1
i t e m s a r e no__i in t h e s y s t e m ,
items places
For a n y g i v e n s e r v i c e t i m e
With an exponential
1 , and
N - j
quest for s e r v i c e w i t h i n o n e s e r v i c e t i m e . l e a s t o n e o u t of t h e
=
=
discusses i n d e t a i l ,
are the probabilities
c~
(N - j) R r T s (N-I)'
cj_l
(R r T s)j
for
=
1 -U
-
N-1
.
/ (N - j - 1) '
o f t h i s r e s u l t to t h e r e s u l t of c h a p t e r
3 - U
j = 1,2 .....
Pq, 0 ' v i z .
with the
U
8,
page
96
, consider
from the previous page
P0 N R r T s + P0
If t h e a b o v e
cj
are substituted here,
the resulting
expression
1 -U N-I
NRrTs~
c'j
+
1
j=O can also be written as
Pq, 0 with
c
= 0 if one takes
1
and Ra[ j
=
1/
N 2~2 c. j=0 ]
cj+ 1 = (N-j) R r T scj . This is the s a m e =
(N-
j)R r
,
and
Rslj+ 1
=
I/T s
result as found on p a g e
for all j .
96
,
131
T h e second special case is that of a constant service t i m e . LFs(JR r)
=
e - J Rr Ts . T h e recursion for the
cj' with
c
:
e
Rr T s
N - j J
=
appearing on p a g e 74
eTs/Tr
(
cj
ci
LFs(S)
Now,
=
e - S T s , and
is then
c' j-1
-1)
This recursion shows a certain r e s e m b l a n c e with the one
for the c o n v e r s a t i o n a l use of terminals.
Conversational t e r m i n a l use
apparently i m p l i e s a f i n i t e population of users.
The throughput ratio for g i v e n u t i l i z a t i o n . T h e previous exercises showed that the u t i l i z a t i o n , for the analysis.
rather than the return rate,
is a datum
It is then necessary to solve the e q u a t i o n U
N Rr T s
=
N Rr T s + P0(Rr, N, Fs(X ) ) with g i v e n
U
for the unknown v a l u e
cedure must be applied. to infinity.
Thus,
T h e range of
Rr . For g e n e r a l
N
and
Fs(x ) , an i t e r a t i v e p r o -
Rr , as known at this stage,
an i t e r a t i v e procedure a i m i n g at
Rr
m a y be from
U / ( N Ts)
itself m a y cause stability problems.
It is safer to first solve for the throughput ratio
R
=
=
1 / ( N R r T s + p0 ( R r, N, Fs(X) )
.
NR r T s The i t e r a t i o n
U
R (i+l) :
1/(
, N, Fs(X) )
U/R (i) + P0 ( R(i)NT
)
S
has in fact proven its n u m e r i c a l stability if started with
R(0)
=
1 - U , or with the
~mewhat closer a p p r o x i m a t i o n R (°)
:
-
I
u I
+(N'1)/2
It was a p p l i e d to G a m m a - d i s t r i b u t i o n s of the s e r v i c e times, LFs(J Rr) if
=
1 / (1+
for which
j Rr T s / n ) n
n
is the i n d e x of the G a m m a - d i s t r i b u t i o n . A good a p p r o x i m a t i o n to a g i v e n Fs(X) is 2 found if n is chosen equal to T s / V s , as suggested in the previous exercises. Integer
results in a rational c o m p u t a t i o n . Once
R
is d e t e r m i n e d ,
the return rate is found as
Rr
=
U / (R N Ts),
and its inverse as
132
Tr
=
R N Ts / U .
S u b s t i t u t i o n of this expression i n t o t h e f o r m u l a e of p a g e 122 p e r m i t s to c o m p u t e t h e l i m i t e x p e c t a t i o n s of t h e four q u e u i n g v a r i a b l e s as Tq
=
T ~,N ( I - R ) / U
Tw
=
Ts(N(I
N
:
N (1 - R )
:
N (1 - R ) - U
N T h e expression for
q w
Tw
-R) / U
1
)
was a l r e a d y used in t h e p r e v i o u s exercises.
p r o v i d e s a f u r t h e r i n t e r p r e t a t i o n of t h e r a t i o
R , viz.
ion of i t e m s t h a t a r e not in t h e queuing system.
T h e expression for
N
q
as t h e l i m i t e x p e c t a t i o n of t h e f r a c t -
133
Chapter
12 :
Final remarks on the Computer Center Analysis.
All t i m e delays discussed so far were times for data transmission, or times waited for such transmissions. This may appear surprising in the analysis of data processing_systems, but it is natural in view of two facts : Data transmissions which involve m e c h a n i c a l devices, or long-distance communications, are often slow in relation to electronic processing. Thus, the delays caused by transmissions are often the major part of response times. On the other hand, data processing in its physical realization is again a form of data transmission, through special circuitry. It differs from the transmissions mentionned above by its speed and by its complexity. In fact, the possible structures of a CPU are manyfold. It may be strictly sequential in its actions, or split into parts which concurrently give different forms of service, e . g . tion handling,
instruc-
data retrieval and storage in core memeory, and data processing proper. AIso,
the CPU may or may not be involved in data transmissions through the channels discussed in the previous chapter. One cannot,
therefore, speak of a typical CPU structure which could be
assumed for the case study. The following remarks show rather some typical reasonings that may be a p p l i c a b l e in the analysis. Also, it is not possible to quote typical values for the times which the CPU spends on the different services required by a particular application. Some values for the processing proper were quoted in the Case Study, but are chosen arbitrarily. In practice, an evaluation of actual programs is required to find such design data. Apart from the processing which is determined by the application, considerable CPU t i m e is spent on control functions. Every single message transmission must be prepared by some CPU action. Similarly, every storage or retrieval of data requires CPU t i m e to set up adresses and instructions for the channel, to interpret index information, and to select desired data from a block of retrieved data. The control programs which handle these functions may differ widely in structure and efficiency. Hence, in p r a c t i c e the actually used programs must be evaluated.
134
T h e f o l l o w i n g v a l u e s o f CPU s e r v i c e t i m e s are a r b i t r a r i l y c h o s e n as d a t a for a few further exercises
:
CPU t i m e r e q u i r e d to
r e c e i v e or send a m e s s a g e
50
msec
store or r e t r i e v e d a t a on disk
10
msec
start or restart a processing task
5
msec.
Exercises. 60
Use t h e m e s s a g e rates a n d d e v i c e a c c e s s rates as in e x e r c i s e s
57,
58 , p a g e 125
a n d 129 , and t h e a b o v e CPU t i m e s to c o m p u t e the CPU u t i l i z a t i o n by l i n e c o n t r o l and storage accesses. 61
Use t h e task rates as in e x e r c i s e
s t a t e d in t h e C a s e Study,
page
4
57, p a g e
125,
a n d t h e CPU processing t i m e s
, to c o m p u t e the CPU u t i l i z a t i o n by a p p l i c a t i o n p r o -
cessing, 62
S e p a r a t e t h e CPU u t i l i z a t i o n into t h e c o n t r i b u t i o n s from l i n e control,
messages,
a p p l i c a t i o n h a n d l i n g of c u s t o m e r request types 1 , 2 , 3 a n d 4.
It c a n b e f o r e -
seen t h a t t h e s e f u n c t i o n s are h a n d l e d on d i f f e r e n t l e v e l s of priority.
Solutions. 60
T h e results are a r r a n g e d in t h e f o l l o w i n g t a b l e :
CPU t i m e r e q u i r e d to
time
r a t e of o c c u r r e n c e hour-1
sec-1
msec
utilization %
i
i
Receive messages
5740
1.59
50
7.97
Send m e s s a g e s
3293
0.91
50
4.57
Log m e s s a g e s
5740
1.59
I0
1.59
18066
5.02
i0
5.02
Access ITEM a l o n e
2216
0.62
10
0.62
Access CUSTOMER
1976
0.55
10
0.55
t h e n ITEMs
16680
4.68
I0
4. 63
0.02
I0
0.02
Store and r e t r i e v e m e s s a g e s
Access CUSTOMER a l o n e
89
l o g g i n g of
135
The total from this type of CPU utilization is then 61
25
% .
A similar table can be given for the application processing:
CPU time to process
rate of occurrence hour -1
i
time
see -1 i
utilization
msec i
% ,
a request while logged
3293
0.91
30
2.73
a request of type 1
2216
0,62
40
2.48
a request of type 2
988
0.27
40
1.08
8340
2,32
30
6.96
988
0,27
35
0.95
89
0.02
15
0.03
(per ITEM : ) (finally : ) a request of types 3 or 4
The total from this type of CPU utilization is 62
14.2 %.
Arranged by the possible priority classes, the c o l l e c t e d utilizations are : Task
CPU utilization for control
for processing
total i
12.54
-
12.54
Message queuing
5.02
-
5.02
Logging
1.59
2.73
4.32
Request type 1
0.62
2.48
3,10
Request type 2
5.18
8.99
14.17
Request types 3, 4
O. 02
0.03
0.05
Line control
The overall total of the CPU utilization is
about
40 % .
Waiting for the CPU as server. The need for processing of data by the CPU arises at times which are virtualiy independent of the CPU itself. Transmission of a message requires CPU service mainly for line control and buffer allocation. The times when this service is required are mostly determined by the t e l e c o m m u n i c a t i o n
136
lines. Some of the service must be given fast enough to avoid a loss of data travelling over a line. The service time is determined by the particular line control program chosen. For the use in the following exercises, it is assumed that such high-priority service arises for each input message in addition to the sists in 80 msec
3
50 msec
independent service intervals of
processing time assumed earlier, and con-
4 msec each. Also, it is assumed that the
line control time for each message arise in two independent service intervals of
25 msec each. Another process which generates random times at which CPU service is required, is the storage and retrieval of data. It is usual that a processing task starts some data access, but then suspends further action until the data have been transmitted. The random seek times and transmission times of storage devices determine when further CPU action besomes possible. The total CPU service for a request, say, is therefore split into several shorter contiguous intervals which are determined by the application considered. These intervals have to be considered as the CPU service times in the sense of Queuing Theory. A model of the queuing situation with the CPU as server must also consider priorities. The results of chapter
7
are then applicable to find l i m i t expectations for the wait times in the
different priority classes. With the Case study, the first few priority levels Fast receive processing,
Line control,
Message queuing,
Logging
suggest thernselves quite naturally. Priority assignment for the processing proper can be based on several arguments. It may be satisfactory to assure the smallest average expected wait time for all requests together. As discussed in exercises
35, 39 , pages
82.
88
,
this may require the comparison of seve-
ral possible priority assignments. On the other hand, the response time for a particular request type may be critical. Then, this request type must be preferenced. Another choice is necessary between non-preemptive and preemptive priorities. For the Fast receive processing, preemptive priority-is mandatory. However, the average expected wait time may be increased if preemptive priorities are used on all levels. Exercise
40
page 87 gave some indications when this effect will occur. Also, preemption of a CPU service requires further CPU time to save, and later restart, an interrupted task.
on
137
Exercises. 63
Assume the four priorities indicated above, and three further priority classes for the
requests of type
1 , of type
2 , and of types
3 and 4
together.
The contiguous service intervals for Logging and request processing are formed of the processing which precedes a data access, the CPU t i m e required for the data access itself, and the processing which may be overlapped with the data access, At the end of such service intervals, the CPU will be free for other work. Collect for all priority classes the occurrence rate of service intervals, their expected duratton
Ts
and their second moment
E(t ) , approximated by
ximation corresponds to a standard deviation of
.816 T s , and is in line with the
range of processing times stated in the case study page Apply the formulae of chapter
7
2
1.1 T s. Note that this appro+_ 40 fro
4
for preempt-resume priorities to compute expected wait
times for all priority classes. 64 classes
With the data of exercise 63 , compute expected wait times for the priority 4 through 7 , if only the first three priority classes preempt the others.
Solutions. 63
The data for the assumed queuing system with priorities are coilected in the fol-
lowing table. CPU service times are taken as assumed on pages 134 and 136 , or as estimated in the Case study page tion sums
Sn
of chapter
4.
The accumulation of
7 . The accumulation of
Ra,n Ts, n
Ra, n E ( t : n ) / 2
results in the u t i l i z a provides the expect-
ed remaining service times under a preemptive discipline. In the case of logging and request processing, several t i m e contributions arise with different rates. They enter into the accumulation by simple addition. For utilizations, this is quite plausible. The general rule was discussed in chapter
4, page
52
138 Table of arrival rates and service t i m e moments. n
Priority class
items /hour
services /item
9~
services /sec
Ts, n En(ts)
Sn
Ts[t, n
msec msec 2
%
msec
1.9
.04
688
14.5
1.77
10
ii0
19.5
2.04
1.59
10
110
1
.91
30
990
23.8
2.58
2216
1
.62
30
990
2216
1
.62
20
440
26.9
3.02
988
1
.27
50
2750
8340
1
2.32
30
990
8340
1
2.32
20
440
988
1
.27
45
2228
41.1
5.36
89
1
.025
20
440
89
1
.025
5
41.2
5.37
1
Fast receive processing
5740
3
4.78
4
2
Line control
9033
2
5.02
25
3
Message queuing
9033
2
5.02
4
Logging
5740
1
3293 5
6
7
Request type 1
Request type 2
Request types 3 , 4
With the
Sn
and
17.6
27.5
Tslt, n ' the formulae for expected wait times under the preempt-resume
discipline of page 86 result in the following values : Priority class
n
I
I
Expected wait t i m e (msec) I
64
2
3
4
5
6
7
.04
2.59
4.66
8.39
13.2
22.5
24.2 I
1 - 3
preempt those of weaker prio-
If only the services for the priority classes
rities, the same formulae as above can be used with two modifications : the expected remaining service t i m e the other hand, the summand
I
1
Tslt, n
Sn-1 Ts, n
to be replaced by the smaller term
Tslt, 7
is now equal to
=
] average 8.07
For classes
4 - 7
5.37 msec. On
generated by the preemptions during service, is for the classes
$3 Ts, n
n = 4
- 7. The resulting
values are now : Priority class
i
n
Expected wait t i m e (msec)
I
1
I
i
.04
2
3
4
5
6
7
2.59
4.66
12.9
16.0
19.8
19.6
average 8.08
139 Waiting for a program as server. Data processing is controlled by programs. Each unit of work, like the processing of one request, requires that a program is devoted to it for the time of processing. In fact, what is actually devoted the particular unit of work, is core storage within or associated with the program, such as branch adresses within the code, and temporary data storage. If this associated storage exists once for a program, the program can work on only one work unit at a time. On the other hand, programs can be designed so that they are not m o dified during use, and have the associated storage available in any required number of copies. Such programs are called re-entrant. They act like an unlimited number of copies of the same program. While the control programs for data storage and telecommunications use to be re-entrant, application programs are often available in a finite number of copies only, or even in only one copy. As requests for processing arise at random times, they compete for the program copies as servers, and may have to wait before processing can start. The t i m e for the service given by a program is a sum of times for data accesses, times of CPU processing not overlapped with data accesses, and times waited for the CPU, in an order which is determined by the application considered. E x e r c i s e 65 d i s c u s s e s t h e - C a s e Study request type
2
as an example.
The times waited for program service can then be estimated using the POLLACZEK-KHINTCHINE formula, if a single program copy is assumed, or the results on multiple servers of chapter
8
in the case of multiple program copies. If re-entrant programs are assumed, no
such wait times occur. Note that a change in the number of program copies affects the size of the f i n i t e population waiting for service by the data storage devices, and hence the expected wait time during data accesses. More program copies reduce the time waited for program service, but increase the population size for data accesses and hence the times waited there.
140
Exercises, 65
Find t h e e x p e c t e d p r o g r a m s e r v i c e t i m e for t h e processing of request t y p e
a d d i n g e x p e c t a t i o n s c o m p u t e d in p r e c e d i n g exercises. t h e v a r i a n c e of p r o g r a m s e r v i c e t i m e ,
Also,
2
by
find an a p p r o x i m a t e v a l u e for
t a k i n g i n t o a c c o u n t a t l e a s t t h e v a r i a n c e of t h e n u m -
ber of ITEMs p e r request. 66
Find t h e e x p e c t e d t i m e w h i c h a request of t y p e
g r a m if this p r o g r a m exists in o n e copy,
2
w a i t s for t h e p r o c e s s i n g p r o -
or in two copies.
Solutions. 65
E x p e c t a t i o n s for t h e c o n t r i b u t i o n s to t h e processing t i m e s a r e
for t i m e s to a c c e s s CUSTOMER a n d ITEM d a t a : 162 + 86 + 8 . 4 5 ( 2 .
t0.4
+ 78.5 + 50.0 ) msec
=
1. 510 sec
=
• 408 sec
=
. 3 7 4 sec .
for not o v e r l a p p e d CPU t i m e s : 25
+
45 + 8 . 4 5 (
20 + 2 0 )
msec
for t i m e s w a i t e d b d f o r e CPU s e r v i c e : ( 1 + 8.45 ) • 2"
19.8
msec
2 . 2 9 2 sec .
T h e t o t a l e x p e c t e d s e r v i c e t i m e is t h e n T h e e x p e c t e d n u m b e r of ITEM a c c e s s e s per request of t y p e
2
was found in c h a p t e r
1
as
8 . 4 5 . Not o v e r l a p p e d CPU t i m e s a r e s p e c i f i e d in t h e C a s e Study a n d on p a g e 134 . D a t a a c c e s s t i m e s w e r e t h e result of e x e r c i s e s
58 a n d 59 , p a g e 124 . Note t h a t t h e t i m e s to
w a i t for a CUSTOMER data a c c e s s are v e r y s m a l l d u e to t h e low u t i l i z a t i o n o f d e v i c e s . t i m e w a i t e d b e f o r e CPU s e r v i c e was t a k e n from e x e r c i s e
64,
The
p a g e 138 , since t h e p a r t i a l
p r e e m p t i o n discussed t h e r e g i v e s t h e m o r e f a v o r a b l e result for p r i o r i t y class
6 .
T h e v a r i a n c e of t h e processing t i m e is t h a t of a sum of r a n d o m v a r i a b l e s w i t h i n d e p e n d e n t l y v a r y i n g n u m b e r of s u m m a n d s .
W i t h t h e f o r m u l a of a p p e n d i x D , p a g e 180, it is found as
t h e sum of v a r i a n c e s of t h e t i m e s r e l a t e d to t h e CUSTOMER
plus
8 . 4 5 t i m e s t h e sum of v a r i a n c e s ai" t h e t i m e s r e l a t e d to t h e ITEMs
plus
1 3 . 7 4 t i m e s t h e s q u a r e d sum of e x p e c t e d t i m e s r e l a t e d to an ITEM , where
13.74
is t h e v a r i a n c e of t h e n u m b e r of ITEMs per r e q u e s t of t y p e
2.
141
T h e c o n t r i b u t i n g e x p e c t a t i o n s and v a r i a n c e s w e r e found in e a r l i e r e x e r c i s e s , w i t h t h e e x c e p tion of t h e v a r i a n c e s for w a i t t i m e s spent b e f o r e d a t a a c c e s s e s and CPU s e r v i c e . For t h e s e , approximations of the form Then,
=
T
2
( 2/U - 1 )
W
w i l l b e used as a l r e a d y on p a g e 128 .
to t h e e x p e c t e d t i m e w a i t e d for an ITEM a c c e s s o f
a variance of class
Vw
at
.346
utilization
about 520 m s e c 2 results. For t h e t i m e w a i t e d for CPU s e r v i c e in priority
6 , w i t h t h e e x p e c t a t i o n of
is about
10.4 msec,
1 9 . 8 m s e c , and
S6
=
. 4 1 1 , t h e sesulting v a r i a n c e
1530 m s e c 2.
T h e v a r i a n c e of t h e p r o c e s s i n g t i m e t h e n results as 840
+
8.45
( 380
13.74
i.e.
733
+
63
+
( 78.5
214 +
+
203
+
2.
50.0
+ 520
+
2.
2.
1530
+
+
40
+
40
+
2.
I0.4
+
20
+
20
+
1530 ) 2.
+
1 9 . 8 )2
msec 2
as Vs
=
. 7 6 5 sec 2 .
Most o f this v a r i a n c e is c a u s e d by t h e r a n d o m n u m b e r of ITEMs p e r request. rows in t h e a b o v e s u m m a t i o n c o n t r i b u t e only about
6 %.
66
=
With t h e arrival r a t e
service time
Ts
=
Ra
=
988 hour -1
.2'744 sec -1
T h e first two
and t h e e x p e c t e d
2. 292 sec, t h e e x p e c t e d n u m b e r of p r o g r a m s in use is U
=
Ra T s
=
.629 .
T h e POLLACZEK-KHINTCHINE f o r m u l a results in an e x p e c t e d w a i t t i m e of Tw
=
2. 292 ( 1 + . 7 6 5 / 2 . 2 9 2 2 )
=
2 . 2 3 sec .
Two p r o g r a m s w i t h t h e s a m e e x p e c t e d t o t a l use service times, C,
.629 / 2(1-.629)
U , and e x p o n e n t i a l distributions of t h e
h a v e a p r o b a b i l i t y to b e both in use w h i c h is r e a d f r o m t h e t a b i e in a p p e n d i x
p a g e 172 , as P
=
4s.e
%.
T h e c o r r e s p o n d i n g e x p e c t e d w a i t t i m e is Tw
=
.486 • 2.292 / ( 2 - . 6 2 9 )
=
.81
sec .
This result is p e s s i m i s t i c , s i n c e t h e a c t u a l s e r v i c e t i m e distribution for t h e p r o g r a m has a v a r i a n c e c o n s i d e r a b l y less t h a n t h a t of an e x p o n e n t i a l distribution w i t h t h e s a m e e x p e c t a t i o n . T h e c o m p a r a b l e w a i t t i m e w i t h one p r o g r a m is
2 . 2 9 2 • . 629 / . 8 7 1
=
3 . 8 8 see.
142 Message response times. Finally, the quantity which is usually taken as a criterion of performance, is the message response time as defined on page
5
of the Case Study. From the results of the earlier
exercises, the expected response time for a request of type
2
can be collected. For other
types of requests, they can be found by analogous computations. Expected response times are sums of expected times
Tq
spent in different queuing systems
as indicated in the following table. For message queuing and logging, re-entrant programs were taken as a simplifying assumption. One processing program is assumed. Server
Tw
Ts
Tq
in seconds
Line, input
3.0
1.35
4.35
Message queuing
.18
.18
Logging
.03
.03
2.23
2.29
4.52
.42
.25
.67
5.65
4.10
9.75
m|
Processing of type 2 Line, output i
Total
This expected response time applies to
30 %
of the requests. The other types require less
processing, bringing their expected response time close to the cessing. The average will be about
sec.
5.23 sec for other than pro-
7 sec. As discussed on page 98 , the design require-
ment is a 90-th percentile of the response times at or below
12 sec.
Each response t i m e is the sum of a considerable number of independent random variables. The distribution of response times will therefore be approximately normal. The above expectation and percentile then permit a variance of response times up to the square of ( 12 - 7 ) / 1.28
=
3.85 see , i . e .
up to
waited for line input, and for processing of type
15
sec 2 . To this, the variance of times 2 , will give the major contributions.
In fact, the above case is on the borderline. In order to safely satisfy the response time requirement, the above analysis should be reviewed with at least a second copy of the processing program for type
2 , but also with some more or faster communication lines.
143
Conclusions. The reader who, by now, has fought his way through a long series of exercises, requiring a considerable amount of numerical computations, will be asking himself two questions of p r a c t i c a l importance : Whether a similar series of computations is feasible in any design situation, and whether the results are precise enough to base a design upon them. Both questions can be answered positively, however with some comments. The amount of computation for the analysis of one possible configuration, if done from scratch makes a programmed computation mandatory. In actually executing the computations for the Case Study, a conversational computing facility was used. It is operated from a k e y board terminal which also prints the resuIts. This facility has proven to be a most adequate tool, as it would be for any engineer engaged in a design process. The computations can be reduced by use of the tables contained in Appendix
C
and in
some parts of the text. With these aids, the analysis of one configuration can be handled with the slide rule in an a c c e p t a b l e time. There is, however, the need to compare different design possibilities. Within the design process, analysis serves as a tool which one intends to use repeatediy. The considerations of this last chapter on computer center analysis showed this need most d e a r l y . In such circumstances, the analysis should be programmed so as to be computed with varying parameters. The precision of results is influenced by three aspects : the precision of data, the exactness of the m a t h e m a t i c a l or probability model, and the nature of the results. Design data are statistics from a l i m i t e d number of observations. Their inherent uncertainty was, to some extent, discussed in chapter chapter
1
and, for service times and utilizations, in
3. Neither the systems designer nor the user of a system should expect results more
reliabIe than the data provided. The m a t h e m a t i c a l models presented in this course contain certain assumptions, especially the probability models of Queuing Theory. Some of these assumptions can be well ascertained,
144 e.g.
some of the service t i m e distributions. Others would be difficult to prove. E.g. in
assuming independence of random variables, one has often to reason with the general nature of the process producing them. arrival process,
A particularly frequent assumption is that of a POISSON
- chosen since it simplifies many results of Queuing Theory. This assumption
is made even if some dependence of arrivals is evident. If this dependence is in the sense of mutual inhibition, the POISSON process may be considered as a pessimistic assumption, i n creasing e.g. predicted response times over the actual values. Finally, the m a t h e m a t i c a l nature of results is often that of expectations or similar parameters from probability theory. This implies a particular understanding what 'precision of results' can mean. In fact, there is no possibility to check the results by means of a simple experiment. Even in a long run of observations, random results arise that may deviate from probability predictions. One can only state that such results would have a small probability to occur.
Thus, ~most results of Computer Systems Analysis cannot, and do not, claim to be of high precision. ( Note that a certain precision, in numbers of decimal digits, has been m a i n tained throughout the text. This has the only purpose to suppress a further source of uncertainty, and simplifies the identification of numerical results.) The value of analysis lies above all in the ease with which different designs can be compared. Quantitative results should be interpreted more critically. It is mainly as a base for this critique that the course gives so many details about the probability assumptions and the derivation of results.
The whole section
3
has thee same purpose.
Section
FURTHER
RESULTS
3
OF
QUEUING
THEORY
The results of Queuing Theory which were presented and applied in Sections
1
and
2
are
mainly concerned with the l i m i t expectations of the queuing variables. These results permit a simple derivation, but are fairly general. The effort to find distributions of queuing variables as in the simulation of chapter by the iteration method of chapter
3 , and
5 , was considerable. Thus, for the application exercises
a very crude approximation of distributions was suggested. However, the Computer Center Analysis with its nested queuing systems made evident that at least the variance of variables in one queue has some effect on the variables in another, related queue. Formulae for this variance would be useful in this context. At the same time, the design criteria are frequently stated as bounds on percentiles of the queuing variables. Therefore, a knowledge of the distribution of queuing variables, or again at least of its first two moments, is of practical value. Chapter
8
showed that the Markov property of a queuing process gives an easy access to
its theory. A queuing process has this property for any time if both the inter-arrival times and the service times have an exponential distribution which does not vary with time,
- a
somewhat restrictive assumption. Kendall 1 noticed that the Markov property still exists at the end times of services if only the inter-arrival times have the exponential distribution. The analysis of a queuing process for these points in time carries almost as far as for the Markov processes of chapter ter
13
is devoted to this analysis. From its results, chapter
14
8 . Chap-
leads to some distributions
of queuing variables, and to expressions for their moments. Within this course, the method of imbedded Markov chains is preferred to other powerful m e thods because it lends itself easily to programmed computations, producing numerical evidence on convergence rates and correlations which is of high practical interest.
146 Chapter
18
:
Imbedded Markov chains of some. queuing processes.
Assume a queuing system with one server, and the inter-arrival times or return times with an exponential distribution as on page 120 . Reconsider the queuing processes with Markov property and the notation of page by
t 0, t 1, t 2 . . . .
89 . Denote
the times at which the server ends a service and is ready to start a
further service. At such times
t i , the future behaviour of the system depends on the further
service times, which are assumed to be independent of the history before
t i . Also, the
times remaining to the future arrivals are independent of the history. Therefore, the queuing system has the Markov property for each
t i.
Kendall 1 suggested to consider the state of the system only at the service end times
ti .
These state values form the imbedded Markov chain of the queuing process. The matrix iteration technique of exercise
41, page
90 , permits to find l i m i t probabilities of the
imbedded chain. In a further step, the l i m i t state probabilities for any time
t
are found.
The transition probabilities of the imbedded chain are the basis for this analysis. They depend on the nature of the queuing process, and of numerical values of its parameters. Three types of queuing processes will be discussed which correspond to three queuing models used earlier in this course. In fact, still other types of queuing processes permit analysis with the same method (see Chang 1) . For all of the discussed cases,
nq(ti) , the state of the queuing system at the time
t i , is
understood as the number of items left behind in the system by the leaving item. Thus, the possible states are
0
and the positive integers. The transition probabilities are probabilities
to have the same or another state at the next service end time. Since at that time, exactly one item will leave the system, at1 transition probabilities a r e p r o b a b i l i t i e s to have a certain number of arrivals within one service time. The following exercises give some examples and properties of such probabilities. Exercises. 67
Denote by
p a , j l k (x)
the probability that, given the system state
nq(ti)
= k ,
147
exactly Pa
j
items arrive in the t i m e interval from
are conditional probabilities.
Consider
bilities
x
t.
1
to
t. + x . If
x
1
as any service time,
is random,
these
and find the total proba-
(2O
Pa, j~k
=
~
Pa, jlk (x) d Vs(X)
-133
to have exactly
j
arrivals in one service time,
for the two cases of POISSON arrivals and
of arrivals from a finite population. 68
For the two cases of exercise
67, find the expected number of arrivals in one
service time.
Also show that the probabilities
ing function
Ga[k(Z )
form
of the service time distribution.
LFs(S)
of the probabilities
Pa,0[k
Pa, j[k
to have no arrivals,
and the generat-
can be expressed by the LAPLACE trans-
Both
G
and
LF
are defined in appendix
D
pages 178, 179. 69
show' that
For the finite population,
N -k Pa, j - l [ k + l
Pa, j[k holds for all
N -k-j+ j
1 Pa, j - l [ k
j ~ 0.
Solutions. 67
The POISSON arrival probabilities were defined in chapter
population,
I - e -Rrx
1 . For the finite
is the probability that a particular item arrives,
e -Rrx
the proba-
bility that it does not arrive. With these values, binomial probabilities are formed. Thus for the case of
POISSON arrivals
finite population
Pa, jl k(x)
(Ra x) ] -Ra x ~j: e
(
=
To form the
Pa, j!k
N-k J ) (1 - e "Rrx) j e -Rrx(N-k-j)
requires only a substitution into the integral stated above. Explicit
expressions can only be given for an individual service time distribution. constant service time =
Pa, j[k For Pa,0lk
~
=
Ts
I
results in
(Ra Ts)] j :
e -Ra Ts
0 , the conditional probabilities =
I
As one example,
LFs(Ra)
( N-k ) (1 - e -RrTs) j e -RrTs(N-k-j) j
Pa,0lk(X)
are very simple,
I "LFs(Rr(N-k) )
so that explicitly
148 The expected number of arrivals in one service time can be found using that
68
for the case of
POISSON arrivals
finite population
J Pa, jlk (x)
Ra x p a , j _ l [ k (x)
(N - k ) ( 1 -e-Rrx) Pa, j - l l k - 1 (x)
=
sum over all j , v i z .
(N - k) (1 - e-Rr x)
Rax
, and the
is absolutely conver-
gent for all x . Therefore, with a change in the order of summation and integration, the expected values are
j GO - Ra x d Fs(X)
GO
(N - k ) ~
-00
(1 - e -Rrx) dFs(X )
-(30
:
Ra T s
(N - k) ( 1 - L F s ( R r )
The generating functions of the conditional arrival probabilities Appendix
can be read from
D , page 178 , as
Ga,k(X,Z) :
I
e ' ( 1 - z ) Rax
I
Their integration with respect to
Ga~k(Z)
Pa, jlk (x)
)
!
=
Fs(X)
(
z + e'RrX(1-z)
) N-k
results in the generating functions for the total pro-
i
Lrs((1-z) Ra)
j=0 ( J )
(l-z) j LEs(JR r)
These generating functions play a role in the determination of limit probabilities. 69
If one intends to compute all transition probabilities of the queuing process with
finite population, the formulae stated in the exercise permit a recursive computation, starting from the probabilities for
j
=
0
which were stated at the end of exercise solution 67.
The relation is caused by a simple property of the binomial probabilities (1 -e'Rrx) j
=
(1 - e - R r x ) j - l (
the product of probability powers in ducts with
j-l[k+l
and
be written as
,
Pa, jIk (x) can be split into the difference of the pro-
j-l{k. Furthermore, the binomial coefficient of this product
N -k (
1 - e -Rrx)
Pa, j[k (x)" Since
N -k ) -
j
j
The integration with respect to
N -(k+l) (
Fs(X)
) , and also as
j -1
(
can
N - k N - k - j+1 )
j -1
j
can then be applied to each summand separately.
As a final consequence, all transition probabilities can be expressed by the values which the LAPLACE transform
LFs(S)
takes on for the integer multiples of
Rr .
149
The transition probabilities. For a queuing system with one server, the transition probabilities of the i m b e d d e d Markov chain are closely r e l a t e d to the p r o b a b i l i t i e s of arrivals in one service t i m e . that
In fact, given
nq( t i ) = k, the number of arrivals in the next service t i m e d e t e r m i n e s the state
nq( ti+ 1 ). If
k
=
0 , state
j
will be reached if one i t e m arrives, and if further
rivals occur in the service t i m e of the first i t e m . Pq, j]0
=
the i t e m l e a v i n g service is If
k
at
ti+ 1 , l e a v i n g
j
ar-
Thus,
Pa, j}l
In a system with finite population,
j
for
j =
'9,1, 2 . . . . .
the targest number of items that can be left behind by =
N - 1.
is different from zero, one i t e m is i m m e d i a t e l y in service. It w i l l l e a v e the system j i t e m s behind if Pq, j[k
=
j < k - 1
In consequence,
are
the m a t r i x
arrived in its service t i m e .
Pa, j - k + l l k
Obviously after only one service t i m e , bilities with
j - (k-l)
j
for
k ~ 0
cannot be less than
and
j
Thus,
= k-l,k .....
k - 1 . All transition p r o b a -
zero. Pq
of transition p r o b a b i l i t i e s for any pair of times
ti, ti+ 1
appears as
P
q
Pa, 0[1
Pa, 0 [t
Pa, l ] l
Pa, 111
Pa, 0[2
Pa, 211
Pa, 211
Pa, 112
Pa, 013
Pa,3[1
Pa, 311
~a, 212
Pa, 113
,
.
0
0
0
...
0
0
...
0
...
Pa, 014 " ' "
.
It has two i d e n t i c a l first columns; only one e l e m e n t above the diagonal in e a c h c o l u m n is different from zero, m a k i n g N
by
N
P
an ' a l m o s t triangular' matrix; and it has the finite size of
e l e m e n t s for the queuing system with finite population.
Some numerical examp-
les are considered in the next exercise. For the queue in front of a p o l l e d t e r m i n a l , matrix terminal.
Pq
an i m b e d d e d Markov chain with a similar
is defined by considering the t i m e s
ti
at which a polling message reaches the
The number of messages which is then found at the t e r m i n a l ,
is chosen as the
150
state
nq(ti) . The transition probabilities are then probabilities to have a certain number of
arrivals in the t i m e of a polling cycle
t c (instead of the service times considered above.)
If at one polling t i m e the queue is empty, the given state is ed in the next c y c l e t i m e to produce the next state polt, chapter distribution
6
assumed a distribution
Fc[l(x)
Fcl0(x )
after a positive poll. Thus,
k = 0. j
arrivats are requir-
j . For this situation of a negative
of the next c y c l e times, different from the for POISSON arrivals
130
Pq, jl0
=
Pa, jl0
=
¢~ pa, j(x) d Fc[0(x ) -03
and this first column of In fact, for any state
P k
q :/
cycle t i m e with distribution
is different from the second column. 0, the next state is F c l l ( x ). Thus,
for
j k
if there are ~
j - k+ 1
arrivals in a
0 ,
OO
Pq, ilk
=
This is the same pattern as in the
Pa, j - k + l i k Pq
=
d~
-GO
Pa, j-k+1 (x) d Fc#l(X )
stated above, with only
Fs(X)
replaced by
Fcll(X).
Thus, the imbedded chain for three queuing models has been defined, and will be analyzed in the sequel. As a note of general importance, it should be seen that the usual queuing disciplines do not affect the transition probabilities of the imbedded chain. This statement holds as long as the discipline does not create another service t i m e distribution (resp. cycle t i m e distribution) for given state
k , than assumed above. Thus, the disciplines
FIFO, LIFO, random selection
result in the same probabilities for the imbedded chain. However, a discipline which always selects from waiting items the one with the shortest service t i m e would m a k e the distribution of service times dependent on the state. The m i n i mum of
k ,~ 0
1 - (1 -Fs(X))k with varying
service times with the common distribution as stated in Appendix
Fs(X)
has the distribution
D, page 179 . This distribution may vary strongly
k .
Limit probabilities of the imbedded chain. As discussed in chapter
8 , the state probabilities for the times
tl, t2 ....
are found from
151
those assumed at
to
by repeated matrix multiplication. If the elements of Pq are known
by their numerical value, this iteration can be handled easily by programmed computations. The next exercise shows some typical results. Another problem is whether the probabilities so generated do converge towards l i m i t probabilities which are characteristic for the queuing system, and should therefore be independent of the initial probabilities at t i m e
t O.
With POISSON arrivals, the condition
Ra T s ~
i
of page 88 is sufficient for this form
of convergence. The proof is classic in the theory of Markov chains ( e . g . but involved since the matrix that
Ra Ts ~
1
Pq
Saaty 1, Takacz 1)
is of infinite size. The following derivations will show
is necessary.
The condition can be interpreted as stating that, given a state state of the Markov chain is
k - 1+
Ra T s
~
k. Exercise
k 68
#
0 , the expected next
gave the necessary c o m -
putations for this interpretation. It indicates a stabilizing effect in the queuing system. For a finite population, convergence of the iteration is assured by the fact that the value is the dominant eigenvalue of the matrix Pq.
Appendix
D , page 181 references some
related theorems of matrix analysis. In order to find the l i m i t probabilities
p'~, j
from the matrix
Pq , its eigenvector defined
by the linear equations p*q
=
Pq p*q ,
abbreviated as a matrix equation as on page 89 ments of
Pq are known by their numerical value, the almost triangular shape of Pq per-
mits a simple procedure : Assume any value for express the all
already, has to be determined. If the e l e -
p~,j
(j = 1,2 . . . . )
p'~,j (j = 0 , 1 , 2 . . . . )
by
Pq, 0 ; use one equation after the other to
Pq, 0 ; finally n o r m a l i z e to probabilities by dividing
by their sum. A similar technique was already applied in chapter
8 . The reader may use the results of the next exercise to work out an example. The same technique could be applied for a general analysis. There, however, it is more efficient to first aim at the generating function
G*q (z)
of the l i m i t probabilities. This
generating function arises if the above matrix equation is l e f t - m u l t i p l i e d by a row matrix
152 with the elements
1, z, z 2 . . . . . Z pq*
Denote this row matrix by
Z . Then
G~l(z) •
=
On the right side of the equation for the eigenvector, the product the particular form of the matrix ZP q The generating functions ed in exercise
Z Pq
appears. Due to
Pq, this product is the row matrix with the elements
= Ga|k(Z )
of arrival probabilities for given state
k
were discuss-
68, page 1 4 8 .
In the case of POISSON arrivals, the
Galk(Z)
for
k
/
0
are all equal. Then,
ZPq
can be written as the sum of I and
o
Gall(Z)
°al°(Z)
-
z
Gall(Z)
Z .
o
0
The matrix equation
I
"'"
p~
=
Pq pq*
therefore ira-
Z
plies
:
- call(Z))' P~l,o
(Galo(z)
+ Call(Z)
Z
c-~(z)
Z
Thus,
Gq(z)
:
z GalO(Z) z
Gall(Z )
P*
q, 0
Gall (z)
-
relates the generating function to its value
Pq, 0
=
G~(0)
for a particular
z, viz. O.
(30
In such a situation, the normalizing relation to determine
G~(1)
=
~
p*
=
j=o q'j
I
must suffice
Pq, 0 " In fact, with the functions
Calo(Z )
--
found in exercise
68,
6all(z)
=
LFs((l-z) R a)
=
I - (l-z) R a T s +O((l-z) 2)
z - LF((I-z) R a T s) * Pq, 0
=
lim z-~l
(z - i) LFs((1-z) R a T s) z - I + (l-z) R a T s + O((1-z) 2)
lim z-.~ 1
1
results uniquely. Since
p* q, 0
(z-1)(i-
O(l-z)
)
Ra T s
cannot be negative, the condition
Ra T s ~
1
is necessary.
153
By an analogous reasoning, p*
q, 0
1
=
Ra Tcl 1
1
Ra ( Tel I - Tcl 0 )
results as the probability that a polling message finds no message at the terminal. here,
Ra
denotes the arrival rate to the particular terminal,
Ra, m
or
Ra / M
Note that
a quantity denoted by
in chapter
6 . With this in mind, the above equation can be rearrang-
I - p*q, 0
=
* 0 Tc~0 Ra ( Pq,
=
R
ed as
reconfirming the result
for
p
T
a
of chapter
* 0 ) Tc|l ) (I -Pq,
+
,
c
6, page
67
The other state probabilities of the imbedded chain are not of practical interest, and will not be determined from the generating function. However, they are uniquely determined by it. For the finite population, the result of Takacz 1 is reported. He finds G*(z)a
=
N-1 (~". c j ) / c ' n
Pq,* 0 N'n~ 2 (Nn-1) (1 - z ) n z N - l - n =
where the
cj
are defined, as in chapter
cj At
1 - LFs(J Rr)
J
LFs(J Rr)
z = 1 , only the summand with (1)
=
as a relation which determines
11 , by
N - j -
1 p* q, 0
n =
,
l=n
=
0
c~
=
c] _I
1
, and for
j,
1,2 . . . . . N - 1 .
is not zero, leaving
N-1 Pq, 0 j~=0 c'.j equal to the
P0
already introduced in chapter
11,
page 129.
Examples for the rate of convergence: Repeated matrix multiplications as a numerical technique to find an eigenvector were already suggested by yon Mises 1, due to their relatively favorable convergence. With Markov chains, the iteration arises from the problem, but it has the same convergence properties.
154
A fast c o n v e r g e n c e i m p l i e s that the later state probabilities are not much i n f l u e n c e d by the assumed i n i t i a l probabilities, so that the l i m i t probabilities in fact describe the essential properties of the queuing system. This aspect was already discussed in chapter p r a c t i c a l interest is the e x p e c t a t i o n of an average of states l i m i t value soon, i f there is a fast convergence.
5 . Of most
nq(ti) . It again reaches its
The following exercises provide some n u -
m e r i c a l e v i d e n c e of typical situations.
Exercises. 70
C o m p u t e the transition probabilities
up to adequate
j
N =
, with such p a r a m e -
Pq, j~k
and
k , for the
four cases of constant service times, and POISSON arrivals, or a f i n i t e population of ters that the l i m i t u t i l i z a t i o n U 71
=
.5 , or
U
.8
pq(ti)
for
i
items
equals
respectively.
Starting with the probabilities
c o m p u t e the
5
=
pq(t0)
for an i n i t i a l l y empty queuing system,
1; 5, 10, 20, 50
, and their expectations.
Solutions. 70
Expressions for the
Pq, j[k
were derived in exercise
arrivals, the values appearing in any c o l u m n of =
Pa, j
u j e-U/j,
are the POISSON probabilities
' '
shifted into the right places. With the given to s a v e
Pq
67, page 174 . For POISSON
U, the values are (written in a row, in order
)
space
0
1
2
3
4
5
6
7
.5
.6065
.3033
.0758
.0126
.0016
.0002
.0000
.0000...
.8
.4493
.3595
.1438
.0383
.0077
.0012
.0002
.0000...
U
=
j
The m a t r i x
=
Pq
In order to have
for a f i n i t e population of U = .8 , or .8 , Rr Rr T s
where
R
=
N = 5
items can be c o m p u t e d if
has to be chosen properly, i . e . U/NR
...
Rr
is given.
so that
,
is the throughput ratio t a b u l a t e d in Appendix
C, page 171 . Using that table,
155
R
the values of
for g i v e n
N
and
U
can be read• T h e values for constant service t i m e 2 T s / Vs--~ co.
are not shown e x p l i c i t l y but can be found by e x t r a p o l a t i o n as l i m i t values with They are
for
U
=
R
=
hence
•5
.8687
• 8
7161
Rr T s
.868?
=
.1151
, 8 / 5 " .7161
=
.2235
.5/
These values are now substituted into the expressions for
Pa, j~k
=
5 •
derived in e x e r c i s e
67.
The recursive c o m p u t a t i o n i n d i c a t e d in exercise 69 m a k e s this substitution r e l a t i v e l y simple. As a result,
for
U
.5
=
p
q
whereas for
U
=
0
0
0
0
•
308
• 308
.708
056
• 056
259
•794
005
• 005
032
.194
.891
000
.000
00l
.012
•109
409
.409
0
0
0
410
.410
511
0
0
154
.154
384
.640
026
•026
096
.320
.800
002
•002
008
.040
.200
631
0
,8
p
--
q
71
0
631
0
A p r o g r a m m e d c o m p u t a t i o n produced the following e x a m p l e s from the sequence of
state probabilities after POISSON arrivals,
U
i =
services.
Initially,
pq, 0(t0)
=
1
is assumed•
•5 Nq(t i)
i
Pq,0(ti )
pq, l(ti)
1
.607
.303
.076
013
.002
.000
5
.512
,326
.i18
033
.008
.002
.000
10
.502
,325
.122
037
.010
.003
.001
.000
•
20
.500
.324
.123
038
.011
.008
.001
.000
• 749
50
no c h a n g e . . .
• 500 .707
741
.750
T h e individual p r o b a b i l i t i e s c o n v e r g e to the third d e c i m a l p l a c e within less than
20
itera-
156
tions. The rate of convergence for the expectations average of the first
20
expectations, i . e .
Nq(ti)
is slightly less favorable. The
the expectation of an average of the first
20
states
n (t.) , is .73 . This value is 3°]o below the l i m i t expectation• As the number of q 1 observations is increased, this bias decreases with the reciprocal value of the number of observations. This behaviour was already discussed in chapter POISSON arrivals,
U
=
5 .
.8
Nq(t i)
i
Pq, 0(ti)
Pq,l(ti )
1
.449
.359
.144
.038
.008
.001
.000
5
.282
.319
.210
.i09
.049
.020
.007
.003
.001
.000
1.434
10
.243
.288
.208
.125
.089
.036
.018
.008
.004
.002
1.748
20
.218
.265
.200
.129
.079
.047
.027
.016
.009
.005
2.040
50
.204
.249
.192
.128
.083
.053
.034
.021
.013
.008
2.305
50
iterations,
0.800
Apparently, the increased utilization slows down the convergence. Now, after Pq, 0
is still off its l i m i t value
l i m i t value
2.4
by
1 - U
=
.2
by
2°]0. The expectation differs from its
4%, and the average of the first
50
expectations is about
20% less
than this l i m i t value. Thus, the l i m i t values would have to be used with caution. However, a queuing system with POISSON arrivals will rarely be utilized to
80%0. A reason-
able ratio between service times and wait times can practically not be assured with this utilization. For this, several exercises of the earlier chapters may serve as examples. Finite population,
U
=
.5 Nq(t i)
i
pq, 0(ti)
pq, l(ti)
1
.631
.308
.056
.005
.000
.435
5
.576
.336
.078
.009
.000
.520
I0
.576
.337
.079
.009
.000
•
521
, and no further changes .
Here, convergence is much faster than with POISSON arrivals. The l i m i t values describe the queuing system very closely. Note also, that the l i m i t value
Pq, 0
=
(1 - U ) / R
is always greater than
1 - U . The
157
probability to l e a v e an e m p t y system behind at the end of a s e r v i c e is g r e a t e r than the p r o bability to find the system e m p t y at a random t i m e . F i n i t e population,
U
=
.8
Nq(t i)
i
pq, 0(ti)
Pq, l ( t i )
1
.409
.410
.154
• 026
002
5
.286
.405
.236
• 065
007
i, I01
10
.229
.403
.242
• 068
OOq
I. 121
20
.279
.403
.242
• 069
007
1. 122
, and no further changes.
the c o n v e r g e n c e is fast,
and the l i m i t v a l u e s describe
Even at this considerable u t i l i z a t i o n ,
•
801
•
the queuing system closely• T h e s a m e c o m p u t a t i o n s w e r e carried out with the assumption of an e x p o n e n t i a l distribution of the s e r v i c e times.
This slowed down the c o n v e r g e n c e to the e x t e n t that in all four cases,
very closely t w i c e as m a n y iterations w e r e required for the s a m e d e g r e e of a p p r o x i m a t i o n to the l i m i t values.
Lag correlations in the i m b e d d e d chain. In chapters
1
and
3,
c o v a r i a n c e s and correlation w e r e discussed for random variables
w h i c h o c c u r with a certain d i s t a n c e or ' l a g ' within the s a m e process.
These c o v a r i a n c e s h a v e
a significant e f f e c t on the c o n f i d e n c e in a v e r a g e s observed in the process. The a b o v e n u m e r i c a l results g i v e some e v i d e n c e of the correlation.
In fact,
the l i m i t v a l u e
of the correlation b e t w e e n
the states at t~¢o c o n s e c u t i v e t i m e s
t i, ti+ 1
t h e transition p r o b a b i l i t i e s
Pq
In the case of POISSON
and the l i m i t p r o b a b i l i t i e s
arrivals as discussed in e x e r c i s e
cI
=
67,
as derived in the next e x e r c i s e , V*(nq) results as
.85
c o r r e l a t i o n is
e1
for =
this correlation has the v a l u e
Nh(Z-u)/V*(nq)
I
pq.
can be found from
,
From the l i m i t p r o b a b i l i t i e s found above, U
0.56
= for
.5 , U
and =
.5,
5.4 and
for cI
U =
=
the v a r i a n c e
. 8 . T h e resulting
0.91
for
U
=
.8 .
158
The discussion of chapter
3
showed already that a correlation of
0.9
for the lag
1 , and
consequentially high correlations for the other tags, have a severe effect on the confidence in averages.
Exercise. 72
Derive the expression for the lag correlation
c1
in a queuing system with
POISSON arrivals and a service time distribution independent of the state.
Solution. 72
The joint probability to have state
k
at
ti
and
state
j
at
ti+ 1
is found as
the product Pq, ilk Pq, k(ti ) of a conditional probability, a n t e of the states
n ~ ti) mand ~" k=O
The sum over Exercise for
k/0.
68
J
and the probability that the condition holds. Then, nq(ti+l)
the covari-
is defined as
~ k j pq, jl k pq, k(ti) j=O
Nq(ti) Nq(ti+l) .
of the two inner factors is the expectation of the next state,
showed that this expectation equals
k - 1 + Ra T s
given
k.
k - Pq, O
This makes the covariance equal to O3
k--O
Nq(t i) Nq(ti+l)
k ( k - P'~t, 0 ) Pq, k(ti ) (l)
Since
Nq(ti+ 1)
=
Pq, 0(ti ) Nq(ti)
+
It" ( k - P ~ , o k=0
Pq, k(ti )
+ Pq, 0(ti ) - P~t, 0
the covariance is finally E
(nq2(ti) )
Nq(ti) ( Pq, * 0 =
Taking limit values for correlation
cI
+
Nq(ti)
+
V (nq(ti) )
i.-Ip~o, and dividing by the variance
as used on the previous page.
Pq, 0(ti ) - P*q, 0 ) Nq(t i) pq, 0(ti) . V*(nq), one arrives at the
159 Chapter
14
:
In this chapter,
Limit utilization and wait time distributions,
two final problems are discussed. The first problem is the relation between
the probabilities for the imbedded chain and for any time
t. It is sufficient to study this
problem with respect to the l i m i t probabilities only, since these are intended for application. A very simple result arises for POISSON arrivals, viz. identity of both sets of l i m i t probabilities. The somewhat less trivial relations for the system with finite population will be reported from Takacz 1. Their main result, the throughput ratio chapter
R , was already discussed in
11.
Secondly, the distribution of wait times, and its derivation from state probabilities, is considered. The important result of this consideration is the fact that the distribution of wait times depends also on the queuing disci~tine. The results of a simulation are used to give numerical evidence of this fact. Then, for a FIFO discipline in the classical single-server system, the wait time distribution is analyzed. This shows the POLLACZEK-KHINTCHINE formula as one result in a series of similar formulae for higher moments of the l i m i t distribution of wait times. These considerations intend to give the reader a basis from which he can start the analysis of further similar problems whenever a particular application problem might require this.
Limit probabilities at a random time. A famous argument of KHINTCHINE which Takacz 1 develops in all m a t h e m a t i c a l detail, shows a simple relation between the limit probabilities the l i m i t probabilities
pq, j
of the imbedded chain, and
for the state of the system at any time
Consider arrivals which find the system in state state
pq, j
t .
j . They bring the system from state
j + 1 . At some later time, a leaving item will cause a transition from state
to state into state
j
to
j + 1
j . Other states may have been passed in between. Anyhow, the number of arrivals j , and of departures leaving state
j behind cannot differ by more than
they are observed in one contiguous time interval.
1
if
160
Hence,
the l o n g - r u n rate of arrivals into state
rate of departures l e a v i n g state
j
behind,
Pq, j
=
j , which is
Ral j pq, j , and the l o n g - r u n
Ra pq, j , are equal.
w h i c h is
T h e relations
P~t, J Ra / Ra[j
p e r m i t to find the l i m i t probabilities for any t i m e from those of the i m b e d d e d chain. For a system with POtSSON arrivals,
all
Ra[ j
are equal to
the corresponding probability in the i m b e d d e d chain. find the system e m p t y ,
Ra , thus all
In particular,
pq, j
equal to
the probability
Pq, 0
to
and h e n c e the server not in use, has the l i m i t v a l u e Pq, 0
=
1 - Ra T s
=
1 -U.
A system with f i n i t e population leads to pq, j This d e t e r m i n e s all The relation for Ra
=
pq, j
j = 0
=
including
pq, j Ra / ( N
- j) Rr
for
j = 0,1 . . . . .
Pq, N ' since the sum of the
can be written as an equation for
pq, j
U , since
N-1 .
has to be
Pq, 0
=
1 .
1 - U , and
U / T s . T h e equation 1 - U
=
Pq, 0
U/NRrTs
=
NRrTs/(NRrTs
is e q u i v a l e n t to U as already used in chapter Thus,
11,
+
Pq, 0 )
page 129.
all l i m i t e x p e c t a t i o n s of the queuing variables are d e t e r m i n e d by the
Pq, 0
of the
i m b e d d e d Markov chain.
S o m e e v i d e n c e about wait t i m e distributions. T h e problem of finding a l i m i t distribution of w a i t t i m e s from the results about the i m b e d d e d chain is introduced by s o m e n u m e r i c a l e v i d e n c e . the s a m e queuing system as in chapter
3
A c o m p u t e r program was used to s i m u l a t e
under different disciplines.
the FIFO discipline was assumed, as e x p l a i n e d on p a g e 'last-in-first-out'
or
LIFO,
38
While in chapter
8
, two further disciplines known as
and ' r a n d o m s e l e c t i o n ' w e r e simulated.
T h e l a t t e r choses with
equal probabilities a m o n g the w a i t i n g i t e m s if there are m o r e than one at the end of a service.
181
~
e-.9 I
4,t
* : LIFO d i s c i p l i n e
¢~- -~.
*F
,R
I
*F
¢$ b-.8
Random selection
t I
¢5
I t l t
4~ ¢-.6 i
RT ,F
I
FIFO d i s c i p l i n e
average wait time
for a l l t h r e e d i s c i p l i n e s
*R
-F E m p i r i c distributions ~.,4
of s i m u l a t e d
w a i t
I l
for t h r e e d i s c i p i i n e s .
Fc/x) t i m e s
S~F, R ¢,_ 4~ 4.-
t2 4" ¢$ -t~. 1
0.5
1
1.5
2
162 The empiric distributions are shown on the previous page• Averages and sample variances of 1000 sample values were for the discipline FIFO random selection LIFO
t---~
V(tw)
.656
.693
.667
1.352
.646
2.507
The averages show some differences. In view of the confidence intervals discussed in chapter 3 , these differences can be attributed to random effects, and are n0t-significant. In fact, they are very small since all three simulations were based on the same sequence of arrival times. The difference in shape of the empiric distributions is noticeable. I.t is also reflected in the difference of sample variances which range from a smallest value, under FIFO discipline, to a value about
4
the estimate of
times as large under LIFO discipline. This variance enters as a factor in V(tw)
, hence its square root in the estimated confidence interval for
~-w"
On the other hand, the lag correlations computed with the procedure STANAL2 of appendix E page 182 , are largest under FIFO discipline, and less for the two other discipline. This is a plausible result, since the two latter disciplines remove the strong dependence between two consecutive items, if the wait line contains more than one item. Some correlations were for lag
1
2
3
6
FIFO
.79
.62
.49
• 30
random selection
.25
.27
.24
LIFO
.12
.15
.07
Discipline
20
30
16
• 05
. O0
• 18
14
• 09
.04
, O0
07
• 03
.06
10
The difference in correlations somewhat outbalances the mcrease of confidence intervals caused by the variances. With the approximation described on page 42 variance and
90% confidence intervals of
FIFO
V(F-w)
=
.007
, the estimated
{-- were for W
and
1.645 V ( ~ w )
=
•
14
random selection
.011
.18
LIFO
,008
.15
163
Wait t i m e distributions. L i m i t distributions for the wait times have been derived for different queuing disciplines. S o m e of these results are quoted by Saaty 1. A starting point for this derivation is given by the l i m i t p r o b a b i l i t i e s of the i m b e d d e d Markov chain. For the FIFO discipline, the reasoning is p a r t i c u l a r I y simple. i m b e d d e d chain to l e a v e p r o b a b i l i t i e s that
j
j
Here,
the p r o b a b i l i t i e s of the
i t e m s behind at the end of a service,
are the same as the
i t e m s arrived during the t i m e which the l e a v i n g i t e m spent in the
queuing syszem. Assume thai: all such times of exercise
68
tq
have the same (limit) distribution
can be a p p l i e d with
probabilities of arrivals in a t i m e Fq(X) still unknown.
F
tq
q
instead of
=
(1-z) Ra
and
z
= =
LFq(S) As an e x a m p l e ,
E.g.,
the result
with POISSON arrivals the L F q ( ( l - z ) Ra ) , with
But the above e q u i v a l e n c e of arrival p r o b a b i l i t i e s with p r o b a b i l i t i e s in
L F q ( ( l - z ) Ra ) s
s
have the g e n e r a t i n g function
the i m b e d d e d chain i m p l i e s equal generating function,
or, with
F
Fq(X). Then,
consider the
Gq(Z)
1 - s/R a :
Gq(Z)
viz.
, ,
G* ( 1 - s/R a ) q
found on page 152 , with a service t i m e distribution
independent of the state, viz. (z -1) G* (z) q This
Gq(Z) leads
z -
L F s ( ( 1 - z ) Ra) LFs(!l-z)Ra)
0
to LFq(S)
=
( 1 - U ) LFs(S) / ( 1
Ra ( 1 -LFs(s ) ) / s )
Finally, the t i m e s spent in the queuing system are sums of a w a i t t i m e , service time. Therefore,
and an independent
the m u l t i p l i c a t i o n rule for the LAPLACE transforms
LFq(S)
=
LFw(S) LFs(S)
=
( 1 - U ) / ( 1 - R a ( 1 - LFs(S)) / s )
applies, with the result that LFw(S)
determines the w a i t t i m e distribution c o m p l e t e l y by arrival rate and service t i m e distribution.
164
Exercises. 79
Find the series for
Ra ( 1 - LFs(S) ) / s
LFw(S) =
1 / ( 1 + c l s - c2s2/2 + O(s 3) )
=
by powers of
s
up to
O(s 3) . Use
1 - c l s + (c 2 + 2 c 2) s2/2
+
O(s 3)
to find the first two m o m e n t s and the v a r i a n c e of the w a i t t i m e distribution derived at the end of the previous page. 74
Consider the data of e x e r c i s e
times.
19 , page 49 , and c o m p u t e the v a r i a n c e of wait 2 T w ( 2/U 1 ) of the a p p r o x i m a t i n g e x p o n e n t i a l
C o m p a r e it to the v a r i a n c e
distribution suggested on p a g e 75
50 .
Find the first two m o m e n t s and the v a r i a n c e for the t i m e s
tq
spent in the
queuing system.
Solutions. 73
T h e suggested relation b e t w e e n the power series of a function and its r e c i p r o c a l
is easily proven by a m u l t i p l i c a t i o n with the d e n o m i n a t o r , If the power series of
LFs(S)
is g i v e n as
and c o l l e c t i o n of powers of s .
1 - T s s + E(ts2) s2/2 - E(t$) s3/6 + O(s 4) ,
the d e v e l o p m e n t of the expression quoted in the e x e r c i s e is Ra ( 1 -LFs(S)) / s
=
a aT s
This expression is now subtracted from
Ra E ( t s2) s /2 1, and
1 - U
% E@ LFw(S ) cI
and
c2
=
1 / ( 1 + - 2 (1-u)
can now be identified.
way,
+
R a E(t~) s 2 / 6
+ O(s 3) .
is divided by the result to find
Ra E(t ) s
- 3 (1-u)
s2/2
+
Interpreting the power series of
O(s 3) LF .(s) W
) . in the usual
Ra E(ts2) Tw
=
cI
=
(POLLACZEK-KHINTCHINE) , 2 (1-u)
and
E(tw2)
=
c2
+
Vw
=
2 E(t ) - T w
T h e v a r i a n c e of w a i t t i m e s is then
2c~
w2
=
2 c2 + Cl
T 2 w
=
Ra E(tsa) 3 (l-u)
Note that this v a r i a n c e is at least equal to
the standard d e v i a t i o n is at least as
great as the e x p e c t e d w a i t t i m e ,
=
-
T 2 . Thus, w m a i n l y because t w
+
0
has considerable probability.
165
74
As p a r a m e t e r s of the s e r v i c e t i m e distribution, Ts
=
1 . 1 9 sec ;
Vs
=
0.307 sec 2
;
In order tO avoid a c o m p u t a t i o n of a fourth m o m e n t , from the f o r m u l a at the end o f p a g e of
(23 - 1 ) / ( 2 2
-1)
suited f r o m e x e r c i s e E(t 3)
=
= 8
7/3
31
,this
E(ts2) =
19
used
1 . 7 5 sec 2.
as would be required to find
E(t 3)
E(ts3) is a p p r o x i m a t e d by adding an overhead
of the o v e r h e a d for
, p a g e 33.
exercise
E(t 2)
to the third m o m e n t which r e -
Thus,
2.46 + (7/3)'.0.84
2.46
=
3 . 0 sec 3
w i l l be used. With a l i m i t u t i l i z a t i o n Then, Vw
U
=
.75 , T w
=
2.172
+
=
2.17 sec
3.0 / 1.19
was already found in e x e r c i s e
=
7 . 3 sec 2
=
q. 8 sec 2
19.
T h e a p p r o x i m a t i o n was 2 . 1 7 2 ( 2 / . 75
1 )
a slightly m o r e p e s s i m i s t i c v a l u e if a p e r c e n t i l e c o m p u t e d from it is h e l d below s o m e bound. 75
T h e first order r e l a t i o n T
q
=
T
w
holds i n d e p e n d e n t of the discipline. and p r e c e d i n g w a i t t i m e s , Vq
+
T
s
As a c o n s e q u e n c e of the i n d e p e n d e n c e of s e r v i c e t i m e s
their v a r i a n c e s are a d d i t i v e , =
Vw
+
so that
Vs •
T h e second m o m e n t is found by 2 Tq
E(t ) =
+
V
q
,
The n u m e r i c a l data used in the previous e x e r c i s e result in T and Here,
V
q q
= --
3 . 3 6 sec 7 . 6 sec 2
the standard d e v i a t i o n is s o m e w h a t less than the e x p e c t a t i o n
Tq,
but still c o n s i d e r a -
ble. If both e x p e c t a t i o n and v a r i a n c e of a distribution are known,
its p e r c e n t i l e s can be a p p r o x i -
m a t e d by those of a G a m m a distribution with the s a m e e x p e c t a t i o n and variance.
The index
of the G a m m a distribution is found by dividing t h e squared e x p e c t a t i o n by the variance. t a b l e of Appendix D, p a g e 177 , m a y be helpful in this context.
The
APPENDICES
A : Remarks concerning the notation. 13 : C o l l e c t e d f o r m u l a e of Queuing Theory. C : Tables for some f o r m u l a e of Queuing Theory, D : Mathematical reference material. E : C o m p u t i n g procedures.
167
Appendix
A
:
Remarks concerning the notation.
The use of arithmetic operators and parentheses, exponents, functions magnitude
O(dx), and subscripts
The letters
i, j, k, re, n; 0, 1 , . .
e for the base of natural logarithms,
f(x), g(x), orders of
follows the usual rules. t for t i m e , and
T for the duration of a
t i m e interval have this meaning throughout the text. Constant natural numbers
M, N , real numbers
and ratios
R , are defined in the context.
Subscripts
m,n
are preferred for finite range,
Random variables are in general denoted by moments by
c, c ' , c " , c 0, c t . . . .
E(V~, and the variance by
i, j, k
probabilities
p
or
P,
for infinite range.
v, their probability distribution by
Fv(X), their
V(v). LFv(s) denotes the LAPLACE transform of Fv(X)
GO
,{'~e "sx dFv(x ) . F v l ( p ) denotes the inverse of a distribution, e . g .
the 100 p - t h percentile.
-00
For random variables with (non-negative) integer values, the probabilities
Prob( v = j )
are
Since random times and (integer) numbers arise in many contexts, these are denoted by
t or
O3
denoted by
Pv, j" Their generating function is
Gv(Z)
= ~0
n
with an identifying subscript. The subscripts used are :
a
:
Pv, j z j "
' b e t w e e n arrivals', 'of arrivals'
c
:
'of polling cycles', 'in a polling c y c l e '
ch :
'per character',
e
:
'between errors', 'of errors'
p
:
'to poll a t e r m i n a l ' , 'to position'
and, specific for Queuing Theory,
q
:
'in the queuing system'
r
:
'to return into the system'
s
:
'of services'
w
:
' w a i t e d ' , 'of waiting items'
'of characters'
In order to avoid t w o - l e v e l subscripts, the corresponding probabilities, distributions, LAPLACE transforms, and generating functions show only the identifying subscript sub. The expectation by
E(tsub)
is abbreviated by
Tsu b,
E(nsub)
by
Nsu b, the variance
V(tsub)
Vsu b. Rsu b denotes a corresponding rate or intensity.
The identifying subscript is in some cases extended by a condition, e . g . to random v a r i a b l e considered at GIVEN t i m e The number of servers used at t i m e expectation
t
sublt
for a
t.
is a discrete random variable
u(t), with the l i m i t
U .
A horizontal bar over a random variable denotes an average or t i m e average.
168 Appendix
B
:
C o l l e c t e d f o r m u l a e of Queuing Theory.
Sufficient condition for statistical stability : R T a
M
is less than the number
s
of servers .
General relations b e t w e e n l i m i t expectations : U T
q
Nw
=
R T a s
=
T
:
Ra T w
Nq
+
w
Nw
Ts
U
+
=
Ra T q
L i m i t expectations of w a i t t i m e s
: ii|
One server and any service t i m e distribution
POISSON arrivals.
Ra E(t 2) T
=
=
w
2 (liU) M
W
N
Ts ( 1 +
w
with
i t e m s returning with rate N(1 Tw
=
The
Ts( c'.
U (POLLACZEK-KHINTCHINE) 2 (1-U)
servers and e x p o n e n t i a l distribution
P Ts Ivl - C
--
V ....~S ) Ts
Rr.
P
=
Fs(X) .
Fs(X ) .
M-1 + (M - V ) (M - 1) ' ~ uJ-M/j:
1 / [1
One server and any
Fs(X ) .
-R) U
- 1)
with
R
=
:i
1/
N-1 j~=0 ci ) "
(I+NRrTs
are defined by a recursion on p a g e 130 , and
U
=
R.
NRr T s .
J
M (
Compute
servers and e x p o n e n t i a l distribution Nq
as the e x p e c t a t i o n of the l i m i t probabilities stated on p a g e
T h e n use the above g e n e r a l relations with
Approximation for
N
Ra
=
(N - Nq) R r . )
polled terminals with POISSON arrivals. One line, any
NTp/T s + T
Fs(X ) .
U (I+Tp/T
s) ( i + Vs/T 2)
= w
211
- U(1
+Tp/Ts) ]
For conversational t e r m i n a l use, apply the f o r m u l a e of p a g e
74 .
Fs(X) .
96 .
169
Limit e x p e c t a t i o n s of w a i t t i m e s under priority disciplines. I
II
POtSSON arrivals for e a c h priority class. One server. different priority classes
n
=
1.....
N.
Any s e r v i c e t i m e distributions for the
T h e g e n e r a l relations hold within e a c h class.
N o n - p r e e m p t i v e priority d i s c i p l i n e : Ra E(ts2) Tw, n
for
=
n = 3., . . . . N.
2 ( 1 - Sn _ l ) ( 1 - S n ) P r e e m p t - r e s u m e priority discipline : n
Ra, m Em(ts2) m=l Tw, n
= (
+ 2 (1
Sn-1 Ts, n )
/
(1 -S n_l)
-Sn) for
P r e e m p t i o n by classes up to
nO
only :
n =1 .....
As p r e c e d i n g case for
N. n {[ n O , but
R a E(ts2) Tw, n
= (
Sn 0 Ts, n ) / ( 1 - Sn _ l ) 2(1
-Sn) for
n ~
no .
V a r i a n c e of l i m i t distributions. FIFO discipline.
POISSON arrivals. 2
V V
W
q
=
Ra E(t$)
T
+ w
=
3 (l-U)
Vw
+
Vs
Approximation. 2 Vw
T,,~ ( -
P
1
Note that
P
=
U
for a single server.
170
Appendix
Table of the l i m i t expectation
C
:
Tables for some formulae of Queuing Theory.
Tw / T s ,
finite population of
N
of wait times in a single-server system with
,,
,
,
items. Service t i m e distribution is
.2
.3
.4
N
T2/V~
U : ,1
1
any
No waiting occurs since the i t e m is the only user of the server.
1 4 16 64
0.050 0.032 0.027 0.026
0. I01 0.066 0.057 0.055
0.154 0.103 0.089 0.086
0.209 0.143 0.125 0.120
0.268 0.188 0.165 0.159
0.333 0.240 0.212 0.204
0.408 0.301 0.268 0.259
0.500 0.380 0.341 0.331
0.627 0.496 0.450 0.437
1 4 16 64
0.069 0.044 0.037 0.036
0.143 0.093 0.080 0.076
0.223 0.148 0.127 0.122
0.311 0.210 0.182 0.175
0.409 0.282 0.246 0.237
0.520 0.368 0.324 0.312
0.653 0.474 0.420 0.406
0.820 0.614 0.550 0.532
1.063 0.827 0.750 0.729
1 4 16 64
0.085 0.054 0.046 0.044
0.181 0.116 0.099 0.095
0.291 0.189 0.162 0.156
0.417 0.276 0.238 0.229
0.563 0.381 0.331 0.318
0.738 0.511 0.447 0.430
0.955 0.678 0.598 0.577
1.240 0.908 0.809 0.783
1.676 1.277 1.153 1.120
1 4 16 64
0.092 0.058 0.049 0.047
0.199 0.127 0.108 0.104
0.324 0.209 0.179 0.172
0.472 0.309 0.266 0.255
0.649 0.433 0.375 0.360
0.867 0.591 0.515 0.496
1.144 0.801 0.703 0.678
1.520 1.098 0.975 0.942
2.113 1.589 1.430 1.388
I0
1 4 16 64
0.098 0.061 0.052 0.050
0.214 0.135 0.115 0. II0
0.352 0.225 0.193 0.185
0.520 0.337 0.289 0.277
0.727 0.479 0.413 0.397
0.989 0.665 0.577 0.555
1.333 0.919 0.804 0.774
1.815 1.292 1.141 1.102
2.600 1.929 1.730 1.677
15
1 4 16 64
0.102 0.064 0.055 0.052
0.225 0.142 0.121 0.116
0.375 0.239 0.204 0.195
0.562 0.361 0.309 0.296
0.799 0.520 0.447 0.429
1.109 0.735 0.635 0.609
1.529 1.038 0.903 0.869
2.142 1.500 1.319 1.272
3.183 2.326 2.076 2.010
20
1 4 16 64
0.104 0.065 0.056 0.053
0.231 0.146 0.124 0.119
0.388 0.246 0.210 0.200
0.586 0.374 0.320 0.306
0.841 0.543 0.466 0.446
1.181 0.775 0.668 0.641
1.655 1.111 0.963 0.926
2.365 1.637 1.434 1.382
3.609 2.610 2.322 2.247
POISSON arrivals. Any service t i m e distribution
1 4 16 64 constant t s :
0. iii 0.069 0.059 0.056 0.056
0.250 0.156 0.133 0.127 0.125
0.429 0.268 0.228 0.218 0.214
0.667 0.417 0.354 0.339 0.333
.5
Gamma T / / V s .
:
.6
.7
.8
.9 Tw =
0.
POLLACZEK-KHINTCHINE formula .
1.000 0.625 0.531 0.508 0.500
1.500 0.937 0.797 0.762 0.750
2.333 1.458 1.240 1.185 1.167
4.000 2.500 2.125 2.031 2.000
9.000 5.625 4.781 4.570 4.500
171
T a b l e of t h e t h r o u g h p u t r a t i o
R
=
of a s i n g l e - s e r v e r s y s t e m w i t h
U / (N Rr Ts)
I
f i n i t e p o p u l a t i o n of
N
items.
S e r v i c e t i m e d i s t r i b u t i o n is
N
Ts2/Vs U = . 1
1
any
.9000
.8000
.7000
.6000
.5000
.4000
1 4 16 64
.9475 .9484 .9486 .9487
.8899 .8934 .8943 .8945
.8270 .8346 .8366 .8372
.7582 .7714 .7750 .7760
.6830 .7030 .7088 .7103
1 4 16 64
.9644 .9652 .9654 .9655
.9238 .9272 .9280 .9283
.8777 .8852 .8873 .8878
.8252 .8387 .8424 .8433
.9783
.9226 .9286 .9302 .9306
.8867
10
20
.3
.4
.5
.6
.7
.8
.9
.3000
.2000
.I000
.6000 .6281 .6365 .6387
.5071 .5445 .5561 .5592
,4000 .4479 .4635 .4677
.2675 .3267 .3475 .3532
.7652 .7863 .7923 .7938
.6960 .7264 .7353 .7376
.6144 .6561
.5146 .5697
.6686
.5868
.6719
.5913
.3812 .4519 .4751 .4813
.9017
.8437 .8619 .8669 .8682
.7915 .8187 .8264 .8284
.7264 .7651 .7763 .7792
.6417 .6947 .7106 .7147
.5186 .5903 .6126 .6185
1 4 16 64
!.9791 9791
.9528 .9554 .9560 .9562
1 4 16 64
9844 9849 9850 9850
.9657 .9678 .9683 .9685
.9432 .9482 .9495 .9498
,9159 .9252 .9276 .9283
.8822 .8976 .9018 .9028
.8400 .8636 .8701 .8718
.7856 .8199 .8297 .8322
.7120 .7603 .7744 .7781
.5999 .6672 .6877 .6931
1 64
9890 9894 9895 9895
.9757 .9773 .9777 .9778
.9594 .9632 .9642 .9645
.9392 .9465 .9484 .9489
.9136 .9260 .9293 .9302
.8806 .9001 .9054 .9067
.8367 .8657 .8737 .8758
.7748 .8167 .8287 .8~]8
.6759 .7363 .7543 .7591
1 4 16 64
9927 9929 9930 9930
.9887 .9848 .9851 .9851
.9725 .9752 .9759 .9761
.9583 .9637 o9651 .9654
.9400 .9493 .9518 .9524
.9157 .9306
,8820 .9049
.8824 .8667
.7490 .8004
.9346
.9112
.9356
.9128
.8763 .8788
.8194
1 4 16
9945 9947 9947 9947
.9877 .9885 .9888 .9888
.9792 .9813 .9819 .9820
.9683 .9725 .9736 .9736
.9540 .9614 .9638 .9638
.9346 .9467 .9500 .9508
.9071 .9261 .9313 .9326
.8654 .8945 .9026 .9047
.7926 .8375 .8505 .8539
.9789
4 16
15
.2
G a m m a Ts2/V s •
64
.8979
.9010
.8t54
£
As
N~oo
,
the limit of
For low u t i l i z a t i o n A utilization
U
U,
R
is
1
for any
T s / V s , a n d for a l l
R is a p p r o x i m a t e l y e q u a l to
close to 1 , for given
U <
1 .
1 - U/N .
N , can only be achieved with a high return rate
Rr , and t h e r e f o r e i m p l i e s a low t h r o u g h p u t r a t i o
R.
172
T a b l e of the probability
P
to find all servers busy,
in a
M-server system with i
POISSON arrivals and the same exponential distribution of service times for all servers.
I
:
Probability values in
% .
U/M
is the expected utilization per server. i
g
=
U/M
.1
.2
.3
.4
.5
.6
i
i
.7
.8
I
i
6 7
20.00 6.67 2.47 .96 .38
30.00 13.85 7.00 3.70 2.01
40.00 22.86 14.12 9.07 5.97
50.00 33.33 23.68 17.39 13.04
60.00 45.00 35.47 28.70 23.62
70.00 57.65 49.23 42.87 37.78
64.72 59.64 55.41
90.00 85.26 81.71 78.78 76.25
.00
.16 .06 .03 .01 .00
1.11 .62 .35 .20 .12
4.00 2.71 1.85 1.27 .88
9.91 7.62 5.90 4.60 3.61
19.66 16.51 13.95 11.86 10,13
33.60 30.07 27.06 24.45 22.17
51.78 48.59 45.76 43.22 40.92
74.01 72.00 70.15 68.45 66.87
.04 .01 .00
.43 .21 .10 .05 .03
2,25 1.42 .90 .58 .37
7.47 5.57 4.19 3.17 2.41
18.39 15.39 12.97 10.99 9.36
36.88 33.45 30.49 27.90 25.61
64.00 61.45 59.13 57.02 55.08
.04
.65
4.39
17.29
47.14
12 14 16 18 20
30
i
Negative natural logarithms of use. M-U
U
The entries for =
i
I0.00 1.82 .37 .08 .02
8 9 10
II :
.9
1
P <
2
P .
e -10
3
=
M -U
I
80.00 71.11
I
is the excess of servers over the expected
4.5.10"5 4
are omitted. 5
6
7
8
9
i
i
5.565
0.674 0.590 0.532
2.398 1.749 1.443 1.256 1.127
3.892 2.818 2.311 2.002 1.788
3.016 3.280 2.829 2.519
7.397 5.337 4.3 7 3.740 3.321
9.371 6.772 5.509 4.731 4.194
8.312 6.762 5.801 5.135
9.950 8.099 6.946 6.144
9.516 8.163 7.217
6.0 7.0 8.0 9.0 10.0
0.488 0.454 0.426 0.402 ~.383
1.030 0.955 0.894 0.843 0.800
1.630 1.506 1.407 1.324 1.254
2.290 2.111 1.967 1.848 1.748
3.011 2.771 2.577 2.417 2.282
3.795 3.486 3.237 3.032 2.859
4.641 4.257 3.948 3.693 3.478
5.547 5.083 4.708 4.400 4.140
6.512 5.962 5.519 5.153 4.844
12.0 14. 0 16.0 18.0 20.0
0.350 0.325 0.305 0.288 0.274
0.730 0.676 0.633 0.596 0.566
1.142 1.055 0.985 0.927 0.878
1.587 1.462 1.362 1.280 1.210
2.066 1.900 1.767 1.657 1.565
2.582 2.369 2.199 2.059 1.942
3.134 2.871 2.660 2.487 2.343
3.724 3.405 3.150 2.942 2.767
4.351 3.972 3.670 3.423 3.217
30.0
0.224
0.462
0.712
0.977
1.257
1.552
1.863
2.190
2.534
1.0 2.0 3.0 4.0 5.0
1.099 0.811
173
T a b l e of t h e l i m i t e x p e c t a t i o n
Tw
of t h e t i m e a m e s s a g e w a i t s a t o n e of
N
cyclically
• ml
polled terminals with equal load. Cases
A : Conversational arrivals, C : T 2 /V s
Poll t i m e r a t i o N
4
Tp/T s
=
D :
.300
,
b o t h w i t h POISSON arrivals.
b o u n d for t h e p r o d u c t i v e u t i l i z a t i o n
1.022 1.242 1.293 1.446
1.217 1.661 1.745 1.996
1.455 2.383 2.521 2.939
1.753 3.945 4.202 4.972
2.160 9.996 10.703 12.793
2. ~00
1.386 1.448 1.461 1.501
1.611 1.770 1.799 1.886
1.887 2.219 2.269 2.419
2.231 2.901 2.982 3.227
2.675 4.083 4.219 4.629
3.274 6.660 6.917 7,687
4.165 16.694 17.424 19.585
5.200
2.053 2.137 2.150 2.190
2.362 2.580 2.609 2.695
2.747 3.201 3.250 3.399
3.237 4.148 4.228 4.471
3.883 5.793 5.928 6.336
4.781 9.384 9.642 10.413
6.165 23.378 24.118 26.318
7.800
2.720 2.827 2,840 2.879
3.113 3.391 3.419 3.505
3.605 4.183 4,232 4.380
4.240 5.396 5.476 5.718
5.087 7.505 7.640 8.047
6.284 12.111 12.368 13.141
8.165 30.054 30,801 33.022
10.400
3.387 3.516 3.530 3,569
3.863 4.201 4.230 4.316
4.463 5.166 5.215 5.363
5.241 6.645 6.725 6.966
6.290 9.219 9.353 9.759
7.786 14.838 15.095 15.869
10.165 36.727 37,478 39.714
13.000
C D A B
C
D A B
C D A B
C D
In this a n d t h e f o l l o w i n g t a b l e s ,
.3
.4
t h e l i m i t of
.5
Tw/T s
.6
.7
0.769 .
0.858 0.962 0.992 1,081
B
N/2
;
Vs
0.719 0.759 0.772 0.812
A
.2
T2 =
both with constant service time;
A C
29
4 ,
POISSON a r r i v a l s ,
U = .1
D
16
=
B :
Ts .
Case
B
12
T h e v a l u e s are g i v e n i n units of
for low u t i l i z a t i o n s ,
.769
U~
0 ,
is
times the poll time ratio .
For c o n v e r s a t i o n a l a r r i v a l s , lization remains finite,
t h e e x p e c t e d w a i t t i m e at t h e m a x i m a l
a n d is
T a b l e s for t h e poll t i m e ratios
possible productive uti-
N(Tp + Ts) / 2 .
. 1 5 0 , . 075 , . 025 , . 0 1 0
on t h e f o l l o w i n g p a g e s .
174
A Conversational, N
Case l
Poll t i m e ratio 4
A t3
C D 8
A B
C D 12
A B
C D 16
A B
C D 20
A B
C D
B,C,D
POISSON arrivals with .2
U=.I
0.150
.3
.4
2 Vs/T s
=
.5
0 , 1/4 , 1 .6
bound for the p r o d u c t i v e u t i l i z a t i o n
;
.7
.8
.870
0. 870 .
0.386 0.399 0.412 0.452
0.487 0.519 0,548 0.634
0.606 0.674 0.722 0.869
0.748 0.889 0.965 1.197
0.919 1.217 1.335 1.698
1.130 1.785 1.977 2.560
1.403 3.019 3.365 4.404
1.793 7.781 8.698 11.389
2.300
0.720 0.738 0.751 0.790
0.866 0.906 0.934 1.018
1.044 1.126 1.173 1.315
1.266 1.435 1.509 1.733
1.551 1.910 2.025 2.376
1.927 2.740 2.929 3.499
2.457 4.562 4.910 5.954
3.315 11.664 12.629 15.465
4.600
1.054 1.076 1.089 1.128
1,242 1.295 1.323 1.406
1.476 1.583 1.629 1.769
1.774 1.988 2.061 2.281
2.164 2.612 2,725 3.071
2.696 3.704 3,891 4.457
3.477 6.104 6.453 7.501
4.818 15.470 16.458 19.372
6.900
1.388 1.415 1.428 1.467
1.618 1.684 1.712 1.795
1.906 2.040 2.086 2.225
2.277 2. 542 2.614 2.832
2.770 3.315 3.428 3.771
3.457 4. 670 4.856 5.419
4.488 7. 644 7.995 9.046
6.318 19.250 20.252 23.213
9.200
1.721 1.754 1.767 1.806
1.993 2.074 2.101 2.184
2.336 2.497 2.543 2.682
2.780 3.096 3.168 3.385
3.375 4.020 4.133 4.473
4.213 5.637 5.822 6.383
5.494 9.184 9.536 10.588
7.812 23.019 24.029 27.022
11.500
,,,,
Poll t i m e ratio 4
8
U=.9
0. 930 .
0.220
0.302
0.399
0.514
0.652
0.821
1.036
1.327
1.808
0.224
0.311
0.420
0.569
0.786
1.135
1.784
3.416
15.675
C D
0.237 0.276
0.339 0.425
0.468 0.615
0.644 0.875
0.902 1.256
1.314 1.862
2.078 2.969
3.983 5.680
18.160 25.340
A
0.388 0.392 0.404 0.443
0.493 0.499 0.527 0.610
0.623 0.636 0.682 0.823
0.784 0.822 0.894 1.115
0.990 !.095 1.266 1.546
1.260 1.539 1.712 2.241
1.632 2.377 2.666 3.541
2.192 4.524 5.101 6.821
3.324 20.998 23.719 31.581
0.555 0.559 0.572 0.611
0.682 0.690 0.717 0.799
0.841 0.855 0.901 1.039
1.042 1.081 1.152 1.368
1.306 1.413 1.522 1.853
1.663 1.954 2.123 2.642
2.175 2.978 3.264 4.131
2.990 5.613 6.195 7.932
4.815 25.896 28.733 36.976
0.721 0.727 0.740 0.779
0.870 0.880 0.908 0.989
1.057 1.076 1.121 1.258
1.297 1.342 1.412 1.625
1.615 1.734 1.841 2.168
2.054 2.372 2.540 3.052
2.699 3.582 3.866 4,728
3.766 6.694 7.280 9.027
6.308 30.663 33.566 42.046
0.888 0.895 0.908 0.947
1.058 1.071 1.098 1.180
1.272 1.296 1.341 1.477
1.550 1.604 1.673 1.884
1.920 2.057 2.163 2.485
2.439 2.792 2.959 3.466
3.215 4.186 4.470 5.328
4.532 7.772 8.360 10.115
7.803 35.373 38.320 46.958
C A B
C D
A B
C D 20
bound for the p r o d u c t i v e u t i l i z a t i o n
A
D
16
;
B
B
12
O. 075
A B
C D
175
Cases
A Conversational,
N
Case [
Poll t i m e ratio 4
A
B,C,D
U = .1 0.025
.2 ;
POISSON arrivals with
.3
.4
Vs/T ?
.5
=
.6
bound for the p r o d u c t i v e u t i l i z a t i o n
0 , i/4 , 1
.7
.8
.9
O. 976 .
C D
0.109 0.109 0.122 0.161
0.179 0.178 0.207 0.295
0.261 0.266 0.316 0.469
0.358 0.387 0.466 0.707
0.474 0.559 0.679 1.045
0.616 0.824 1.006 1.559
0.795 1.278 1.565 2.432
1.030 2.234 2.733 4.240
1.378 5.605 6.814 10.422
8
A B C D
0.166 0.164 0.177 0.216
0.245 0.238 0.266 0.351
0.342 0.331 0.379 0.526
0.463 0.458 0.534 0.766
0.617 0.642 0.757 1.111
0.818 0.927 1.103 1.642
1.090 1.423 1.702 2.552
1.486 2.487 2.980 4.470
2.159 6.367 7.602 11.272
12
A B C D
0.222 0.222 0.232 0.271
0.309 0.309 0.327 0.411
0.417 0.417 0.447 0.590
0.555 0.555 0.610 0.836
0.735 0.735 0.846 1.191
0.977 1.042 1.213 1.740
1.320 1.582 1.855 2.691
1.843 2.752 3.240 4.718
2.804 7.070 8.322 12.040
16
A
0.277 0.277 0.288 0.326
0.372 0.372 0.389 0.472
0.491 0.491 0.517 0.657
0.643 0.643 0.689 0.911
0.845 0.845 0.939 1.277
1.122 1.162 1.330 1.848
1.525 1.747 2.017 2.841
2.161 3.022 3.507 4.975
3.393 7.749 9.013 12.767
0.383 0.333 0.344 0.382
0.435 0.435 0.452 0.534
0.563 0.563 0.587 0.726
0.730 0.730 0.770 0.988
0.952 0.952 1.036 1.3681
1.261 1.286 1.451 1.961
1.717 1.916 2.183 2.997
2.458 3.295 3.777 5.237
3.953 8.416 9.689 13.469
B
B
C D
20
A B
C D Poll t i m e ratio 4
A
O. O1
; bound for the p r o d u c t i v e u t i l i z a t i o n
O. 990
C D
0.076 0.076 0.088 0.128
0.142 0.142 0.171 0.262
0.219 0.228 0.280 0.438
0.311 0.346 0.428 0.675
0.421 0.513 0.637 1.009
0.555 0.766 0.952 1.511
0.723 1.190 1.480 2.352
0.942 2.048 2.546 4.045
1.260 4.727 5.860 9.262
8
A B C D
0.099 0.099 0. II0 0.149
0.171 0.171 0.192 0.280
0.258 0.258 0.300 0.454
0.367 0.367 0.447 0.690
0.505 0.536 0.657 1.024
0.685 0.793 0.976 1.530
0.929 1.228 1.514 2.379
1.279 2.116 2.609 4.098
1.855 4.945 6.077 9.475
12
A
0.122 0.122 0.131 0.170
0.197 0.197 0.215 0.301
0.290 0.290 0.232 0.474
0.409 0.409 0.471 0.710
0.564 0.565 0.683 1.045
0.772 0.827 1.007 1.555
1.065 1.275 1.557 2.414
1.508 2.195 2.684 4.162
2.287 5.165 6.295 9.690
0.144 0.144 0.153 0.192
0.223 0.223 0.238 0.324
0.321 0.321 0.348 0.496
0.447 0.447 0.498 0.732
0.614 0.614 0.713 1.070
0.844 0.866 1.043 1.584
1.175 1.327 1.606 2.454
1.692 2.282 2.766 4.233
2.647 5.385 6.514 9.907
0.166 0.166 0.176 0.214
0.248 0.248 0.263 0.347
0.351 0.351 0.374 0.520
0.484 0.484 0.526 0.757
0.661 0.661 0.745 1.097
0.908 0.908 1.082 1.617
1.271 1.383 1.658 2.499
1.853 2.373 2.852 4.311
2.966 5.604 6.733 10.124
B
B
C D 16
A B
C D 20
A B
C D
176 Appendix
D
:
Mathematical reference material.
S o m e probability distributions. N o r m a l distributions arise as the l i m i t distributions v a r i a b l e s with c o m m o n distribution. T h e standard n o r m a l distribution F'(x)
and has e x p e c t a t i o n
(Central L i m i t T h e o r e m ,
F(x)
for the sum of
N
random
see Brunk I )
is defined by its density
e -x2/2 / ~
0 , variance
F( has e x p e c t a t i o n
=
( N--~ m )
, for all real
x ,
1 . With a shifted origin and a c h a n g e in scale,
(x-E(v)) / V~/'~ )
E(v) , v a r i a n c e
V(v) , and is still c a l l e d a n o r m a l distribution.
P e r c e n t i l e values of the standard n o r m a l distribution are g i v e n in the t a b l e below. G a m m a - d i s t r i b u t i o n s w i t h an i n t e g e r index
n
v a r i a b l e s with c o m m o n e x p o n e n t i a l distribution. POISSON process (see chapter 1 ).
apply to the sum of Thus,
n
i n d e p e n d e n t random
they h a v e a close r e l a t i o n to the
Also, G a m m a - d i s t r i b u t i o n are r e c o m m e n d e d (Martin 1) as
a p p r o x i m a t i n g distributions for n o n - n e g a t i v e random variables.
Then,
n
is not restricted
to integers. T h e distribution
Gamman(X )
is defined,
Gamma,n(X) and r e l a t e d to the has the v a l u e Gamman(X )
=
G a m m a function
(n - 1) '.
for
n ~ ' 0 , by its density
x n-1 e ' X / 1-1 (n) T "t (n)
=
,
for
o3 ~/~ x n-1 e -x d x 0
x>O , which for integer
of a f a c t o r i a l .
has e x p e c t a t i o n and v a r i a n c e Gamman(X)
=
n . 1
-
For i n t e g e r e -x
n-1 m~__ 0= x m / m :
can be found by f o r m a l i n t e g r a t i o n of the above density. Gammal(x )
=
1
e-X
n ,
T h e e x p o n e n t i a l distribution is
n
177
Gamma-distributions, cont'd With a change in scale,
Gamma n ( n x / E(v) )
has expectation
g(v)
and variance
E(v) 2 / n , and is still called a Gamma-distribution. The choice of E(v)
and
n
=
variance
E ( v ) 2 / V(v)
now leads to the
Gamma-distribution
with expectation
V(v). The third moment of this distribution is E(v) 3 ( 1
+
3
n
+
2 / n2 ) .
Percentile values of Gamma-distributions are given in the table below.
Table of percentiles for With given
E(v)
tion. Read
y
=
=
F(x)
G a m m a - and normal distributions.
and
V(v) , find
n
=
E(v)2/V(v) , or use last row for normal distribu-
from the table. Compute the percentile as 0.01
,u,
0.05
0. i
E(v) + y ~ .
O. 25
O. 5
O. 75
O. 9
O. 95
O. 99
i
-0.707
-0.704
-0.696
-0.635
-0.386
0.228
1.206
2.009
3.9~5
-0.990 -1.309 -1.588 -1.801
-0.949 -1.163 -1.317 -1.421
-0.895 -1.038 -1.128 -1.182
-0.712 -0.735 -0.732 -0.723
-0.307 -0.227 -0.164 -0. I17
0.386 0.490 0.555 0.596
1.303 1,336 1.340 1.333
1.996 1.940 1.877 1.820
3.605 3.280 3.023 2.828
16 32 64 128
-1.955 -2.064 -2.141 -2.196
-1.491 -1.538 -1.571 -1.593
-1.216 -1.238 -1.252 -1.261
-0.712 -0.703 -0.695 -0.690
-0.083 -0.059 -0.042 -0.029
0.622 0,639 0.650 0.658
1.323 1.313 1.305 1.299
1.774 1.739 1.713 1.694
2.686 2.582 2.508 2,455
normal
-2.326
-1.645
-1.282
-0.674
0.674
1.282
1,645
2.326
0.5
0
Uniform distributions are sometimes assumed for random variables with known range. The distribution val
F(x)
=
(0, 1), and has expectation
x
for
0 ~t x
1/2 , variance
~_ 1
is uniform over the inter-
1/12 , With a shifted origin and a change
in scale, F( is uniform over
(x O,xl)
(x-
X o ) / (x 1 -Xo)
and has expectation
)
for
(x 0 + Xl) / 2
x0 ~
x ~ variance
x1 (x 1 - Xo)2 / 12 .
178 Some discrete probabilities. Binomial probabilities apply to the n u m b e r of successes in the same probability
p
N
i n d e p e n d e n t trials, each with
of success (see Brunkl). Their values are
Pn
=
( N ) pn ( 1 - p )N-n
for
n
~
0, 1 . . . . . N
,
n
i.e.
the summands in the d e v e l o p m e n t by powers of
(p + q)
with
q
=
of the
N-th power of the b i n o m i a l
1 - p . Binomial probabilities have e x p e c t a t i o n
POISSON probabilities arise as the l i m i t probabilities the p a r a m e t e r
p
E(v)
=
Np
Pn
=
( N ~ co)
N p, v a r i a n c e N p ( ] - p )
of b i n o m i a l probabilities if
is held constant (see chapter 1). Their values are g(v)n e-E(v) / n :
They have e x p e c t a t i o n and v a r i a n c e
for
n
=
0, 1
. . . . . .
E(v) .
G e o m e t r i c probabilities apply to the n u m b e r of i n d e p e n d e n t trials, each with the same probability
p
of success, which is required to have the first success. Pn
They h a v e expectation
=
)n-1
(1 -p
1/p , variance
p
for
Their values are n
=
1,2 .....
(1 - p) / p2
Generating and m o m e n t generating functions. In general,
an a n a l y t i c function is called g e n e r a t i n g function of a sequence of numbers if
the coefficients of one of its power series developments are equal to or in a simple relation with the sequence of numbers. T h e sequence and the function d e t e r m i n e each other uniquely. For discrete probabilities
Pn ' n
=
0,1 . . . . .
(3O
Gv(Z)
=
~" n=0
Pn z
the generating function
Gv(Z)
is defined as
n
I
It is a n a l y t i c at least for ]z[ < 1 . The series m a y be finite. Examples are for Binomial probabilities
POISSON probabilities
Gv(Z ) =
Gv(Z) =
(1 - p +
pz) N
e - ( 1 - z ) E(v)
..
G e o m e t r i c probabilities Gv(Z ) :
p / ( 1 -(l-p) z)
179 As m o m e n t g e n e r a t i n g function for general distributions LAPLACE transform
130
LFv(S)
=
./~
e-SX dF (x) V
-00
(see W i d d e r l ) .
Fv(X) , this course uses the
Its power series
LFv(S)
=
1
+
~ j=l
(-s) j E(v J) / j :
makes the m o m e n t - g e n e r a t i n g property evident• For constant transform is
v
E(v) , the LAPLACE
e -sE(v) • Other e x a m p l e s are for
Normal distribution
G a m m a n ( n x/E(v) )
eV(V) s2 - E(v) s
1 / ( 1 + E(v) s )n
Uniform distribution e-S x 0 _ e-S x I
n
From the LAPLACE transform E(vJ) of its
=
LFv(S) , the =
s (x 1 - x0) j - t h m o m e n t of
Fv(X)
is found as the v a l u e
(-1) j LF(vJ) (0)
j - t h derivative at s = O, (if this derivative exists) .
For the discrete probabilities m e n t i o n e d above, LFv(S)
=
so that the g e n e r a t i n g function E(v j) E(v)
Gv(Z ) =
=
Gv(e'S ) , is another m o m e n t g e n e r a t i n g function. In fact,
dJ Gv(e-S) I (-1) j -. ds j s = 0 G'(1) ,
E(v 2)
=
so that
G"(1) + G'(1)
,
etc.
Distributions of some functions of i n d e p e n d e n t r a n d o m variables. Let
v1 , v2
denote two i n d e p e n d e n t r a n d o m variables which h a v e the joint probability
distribution (see Brunk I ) vI
and
of the
v2
Fl(x) F2(Y) . Then the following distributions for functions of
can be found by integration of the joint distribution over appropriate regions
x-y-plane: CO
Sum of variables
Prob ( v 1 + v 2 ~ x )
=
¢'Fl(X
-y)
dF2(y )
-O3 130
Difference
Prob ( v I - v 2 ~ x )
=
¢" E l ( X + y ) dF2(Y ) . -(30
'convolution' .
180 Maximum
Prob ( max(v 1 , v 2 ) ~
Minimum
Prob ( m i n ( v 1, v2) ¢ x )
The sum
=
Fl(X ) V2(x )
=
1 - (1-Fi(x))
))
has a distribution (as stated above) the LAPLACE transform of which is
v 1 + v2
equal to
x )
LFI(S ) LF2(s ) . This i m p l i e s the relations
and
g(v l+v 2)
=
g(v 1)
+
E(v 2)
V(v l+v 2)
=
V(v 1)
+
V(v 2)
All above relations can be g e n e r a l i z e d to any n u m b e r
N
of i n d e p e n d e n t random variables.
Distributions derived from conditional distributions. If a random v a r i a b l e has the c o n d i t i o n a l distributions v a r i a b l e has the v a l u e value
k
variable
is v
Pk
Fvlk(X ) , given that the c o n d i t i o n i n g
k , and if the probability that the c o n d i t i o n i n g variabIe has the
, k = 0,1 . . . . .
then the total probability d i s t r i b u t i o n of the random
is Fv(X)
co '~k=O
=
Pk Fv[k (x) "
This is a consequence of the definition of
Fv[k(X)
as a conditional probability.
All m o m e n t s of Pk"
Also,
F (x) are l i n e a r c o m b i n a t i o n s of the conditional moments, with the factors v LFv(S) is a s i m i l a r c o m b i n a t i o n of the LFvlk(S).
As a particular case,
v
consider a v a r i a b l e
=
LFv(S)
=
k
F(x) , which is i n d e p e n d e n t of
variables with c o m m o n distribution LFvlk(S)
which is the sum of
LF(s)
mutually independent k, Then
k
as stated above, and
where Fv(X) i.e.
hence
G(z) are
co k ~ Pk LF(s) k=0
is the g e n e r a t i n g function of the E(v)
=
- LF'(0)
=
V
=
G(LF(s) )
Pk " As a consequence, - G'(1) LF'(0)
the m o m e n t s of
,
the expected n u m b e r of summands m u l t i p l i e d by the expectation of each s u m m a n d ; E(v 2)
=
V(v)
=
LF;(0)
=
G"(1) L F ' ( 0 ) 2 +
G'(1) LF"(0)
(G"(1) + G'(1) - G'(1) 2 ) LF'(0) 2
+
,
etc.
G'(1) (LF"(0) - LF'(0) 2 ),
181
This variance is a sum of two constituents, viz. the variance of the number of summands, multiplied by the square of the expected summand value, and
the e x p e c t e d number of summands, multiplied by the variance of each summand.
Iterated m u l t i p l i c a t i o n s with stochastic matrices. The matrices and matrix multiplications considered in this course are defined in the text. A general property of iterated matrix multiplications is the convergence of the (appropriately normalized) result to an eigenvector of the matrix, if the matrix has a dominant simple eigenvalue, (see v. Mises 1, Bodewigl). The matrices of transition probabilities which are considered in this course have the p a r t i cular property that all their columns have the same sum of elements, viz.
1 . Such m a -
trices are generally c a l l e d 'stochastic' matrices, since they arise typically in stochastic, i . e . probabilistic problems. A left m u l t i p l i c a t i o n of a stochastic matrix with a row of all ones produces a row of all column sums, i . e .
reproduces the row of all ones. Hence, this row is a left eigenvector of
the matrix, to the eigenvalue
1.
This is also the dominant eigenvalue. Due to a theorem
of L e v y - H a d a m a r d (see Bodewigl), all eigenvalues of a matrix
P
l i e in the union of all
circles (including the peripheries) of the complex plane which are centered at a diagonal e l e m e n t of
P
and have the absolute sum of non-diagonal elements of the correspond-
ing column as radius. For the stochastic matrices of our context, all diagonal elements are probabilities different from
0
and
1, and the remaining sums complement the diagonal elements to
1, Thus,
all L ¢ v y - H a d a m a r d circles l i e within the unit circle and touch it only at the point Thus, the real number
1
+ 1 ,
is the only eigenvalue of that magnitude, and dominates all
other eigenvalues. The result of the iteration is determined by the matrix only, and independent of the initial values assumed.
182
Appendix : A
ARRPROC
procedure
E
which
:
Computing
generates
and
Procedures sorts
i000
random
arrival
times. ARRPROC: PROC OPTIONSIMAIN};
DCL (J,K) FIXED,RANOOM ENTRY;D(LO00)=IO00; DCL D|IO001 FLOAT(151; DO J:=i TO 9 9 9 ; D(JI=LOOO*RANOC)M; O0 K=I TO J; IF DIJ}
CONT;
END;
DO J = lOGO TO 2 BY - 1 ; D { J I = D { J I - D { J - I ) ; END; CALL PLOTDI{D~'RANDOM ARRIVALS',95E-2);CALL STANAL2ID); DCL N(IO) I N I T ( ( I O ) ( O } ) FIXED,NN FIXED; DO J=l TO IO00;NN=HAX(I,CEILIIO*IL-EXPI-D(J)})));NINN)=NINNI+I;END; PUT SKIP EDIT('COUNTS IN PERCENTILE INTERVALS',N)(A,IO F | 6 ) ) ; PUT LIST ('CHISQUARE ~,SUM(LE-2*IN-IOO)*~2) ) SKIP; STANAL2 : A
procedure
stochastic
~r
statistical
analysis
to the
second
order
of any
process.
STANAL2: PROC(O); DCL C(~OI,RHO(4OI,(AD(Ot#O~O:Ir2)~DX(2),D(*),R,S)FLOAT | 1 5 ) , (ItJ,K,LDIFIXED; LD=DIM|D~I); J=AO; AD IS [0 HOLD K-TH SAMPLE MOMENT OF LD-[ (IJ)-SH[FTED VALUES, I* C(I) SAMPLE COVARIANCE OF LAG I , RHO AN ESTIMATE OF THE CORRELATION *I l*
FIND
DO I = [
AO : * I AD=O; AD|O~O,I)=SUMIDI;AD(O~O,2)=SUMID**2};
TO J ;
DX|II=D|HBOUND(D,I|÷I-I);DX(2)=DXIII**2;AO(I,O,*}=AO([-L,O,*)-DX; DX(I}=DILBOUND(D,I)'[+I);DX(2}=DXII)**2; ADII,I,*)=ADII-I,MIN(I-I,I),*)-DX;END; DO I=O TO J; A D ( I , ~ , * ) = A D I I , * , * ) / ( L O - I ) ; END; I* FIND C : *I DO I = I TO J; S=O; DO K=LBOUND(D,1I TO HBOUNDID,I)-I; S=S÷D(K}*D(K+[}; END; C I I ) = S / ( L D - I ) ; END; /*
ESTIMATE THE CORRELATIONS : *I DO [ = I TO J; R H O ( I ) = I C ( I ) - A D I I , O , 1 } * A D ( I , L , I ) } I SQRT((ADII,O,2)-ADIIsO,II**ZI~(AD(I,I,2|-AD(I,L,II**2I~;ENO;
/*
PUT OUT ESTIMATES : */ PUT EDITI'AVERAGE IS ' , A D ( O ~ O t L ) , ' S A M P L E VARIANCE IS | t A D ( O v O ~ Z ] - A D I O , O , L | * ~ 2 | (2 ( C O L I I | , A , C O L I 2 [ ) , F ( 1 2 , 3 ) ) ) ; PUT S K I P I 2 ) EDIT [ ' E S T I M A T E S A R E t , ' F O R THE EXPECTED VALUE : 't A D ( O , O ~ I | , ' F O R THE STANDARD DEVIATION OF THIS ESTIM&TE SQRTIIADIO,O,2I-AD(OtO~II**2|*II+Z*SUM(RHO)I/LD}, 'FOR THE CORRELATION OFW,'LAG I : ','RHOII) = 'I (A,2 |COLI[I,A,CDLIZII,FIIP,3II,SKIP,A,SKIP,A,AI; DO I=1 TO J; PUT SKIP E D I T ( I , R H O I I I I ( F I 5 1 , F ( I Z , 3 ) I ; E N D I END SIANAL2; END ARRPR~C;
183 MACK
: A procedure t e rminal s,.
computing
the
PROCEDURE COMPUTING WAITTI~E
/*
MACK:
/*
wait
time
expected
at conversational
AT CONVERSATIONAL TERMINALS
*/
PROC(M,TR,TS,TP,U,TW,NS,TCI;
M TR
= : NUMBER OF TERMINALS ON ONE LINE : : EXPECTED INTERVAL BETWEEN RESPONSE TO ONE AND ARRIVAL OF NEXT MESSAGE,
TS
.=;
TRANSMISSION
TP
=:
TRANSMISSION TIME FOR A POLL MESSAGE
TIME
FOR A MESSAGE
RETURNS U T~ NS TC DCL
=: =: =: =:
LINE UTILIZATION BY MESSAGE TRANSMISSION EXPECTED WAIT TI('4E AT A TERMINAL EXPECTED NR OF POSITIVE P(3LLS IN A CYCLE EXPECTED TIME OF A POLLING CYCLE
(I,J,M) FIXED,(TR,TS,TP,U~TW,NS,TC,A,B) FLOAF, (GIG:2} INITIAL(I,O,0)yTOtTItT2 INITII),VR) FLOAT BIN(53);
TO=TS/TR;A,TO=EXP|TO); TI=MmTP/TR;BtTI=EXP|TI); DO I = I . T O M; T2 = T 2 ~ ( T I - I ) * ( M - I + I ) / I ; TI = TI~TO; DO J=O TO 2 ; G(J) = G ( J | + T 2 * I * * J ; END; END; NS = G I I I / G ( O ) ; VR = G ( ? ) / G I O ) - NS*NS ; TC = M*TP+NS*TS;
U = NS*TSITC
;
TW = . 5 * ( T C + V R * T S * * 2 1 T C I ;
END MACK;
QSIM
: A
procedure
simulating
a single-server
queue
/*
S I M U L A T I O N OF A SINGLE SERVER QUEUE WITH RANDOM ARRIVALS OF RATE RA = I , SERVICE TIMES UNIFORMLY D I S T R I B U T E D (.4,1I, AND F I F O D I S C I P L I N E , FOR T = (O,IO00) */ QSIM: PROCEDURE O P T I O N S ( M A I N ] ; DECLARE RANDOM ENTRY, J F I X E D , (ATOIO:I500) INIT(OI / ~ SPACE FOR AT .1, (ATII) I * ARRIVAL TIMES ./, DTJTI / * DEPARTURE TIMES */ INITIO), TS(1) / * SERVICE TIMES */)CTL)FLOATII5); DO M : [ TO i O ; DO
DO
I = I TO 1500 WHILE I A T O | I - I | < I O 0 0 I ; A T O ( I } = A T O ( I - 1 1 - LOG(|RANDOM)}; END; I = I - 2 ; ALLOCATE ATIDTtTS; J = I TO I ; A T | J ! = A T O ( J ) ; T S ( J ) = .4+.6*RANDOM; D T ( J ) = M A X ( D T ( M A X ( 1 , J - I ) ) , A T ( J } ) ÷ T S ( J } ; END;
D T = D T - A T ; CALL P L O T D I I D T , I T I M E S IN QUEUING S Y S T E M ' , 9 5 E - 2 ) ; CALL S T A N A L 2 ( D T I ; D T = D T - T S ; CALL P L O T D I I D T , ' ~ A I T TIMESV,g5E-21; CALL S T A N A L 2 ( D T ) ; PUT L I S T ( ' N U M B E R IS ' , I , , UTILIZATION IS ',SUMiTS)IIOOQ); FREE A T , D T T T S ; END;
*/
184
SPITZER
: A procedure for approximate tion discussed by Spitzer I
SPITZER: PROC OPTIONSIMAIN); ON UNDERFLOW; DCL |FSAI-I6*DIlIO:D1} FSA2{-I6*DI/IO:D1-L) FWO(O:Y*D1) DFWO{YmDI} FW(O:Y*DI)
GET /* DO
I* /* l* /~ /*
iterative
solutions
of an
integral
equa-
VALUES OF F_SUB_S-A * I , ARITHMETIC MEANS TO THE RIGHT * / , INITIAL VALUES OF F_SUB_W * / , DIFFERENCES TO THE LEFT * / , NEW VALUES OF F_SUB_W * I ) CTL FLOAT{15},
( l y J , M ) FIXED; D A T A ( Y ~ D I ) ; D = I / D I ; ALLOCATE FSAvFSA2tFWOtDFWOtFW; STW :
O;
DO
PREPARATION OF THE INTEGRAND *I I = -16mDL/lO TO - D I ; FSA(I} : ( I * D + 1 . 6 } * , 2 / 2 . 4 ; END; I= - 0 1 + I TO 4 m D l / l O ; F S A I I ) = . 5 * D * I + . b S ; END; I= 4 . D 1 / I 0 + I TO D I ; FSA(1) = I - (ImD-1)mm2/2.4; END; I= -16mDl/10 TO D I - I ; F S A 2 ( 1 ) = . 5 ~ ( F S A ( I } + F S A ( I + I ) ) ; END;
DO
RECURSION OF F_SUB_W ml FWO = I ; DO M=I TO 50; J = l TO YmDI; DFWO{J)=FWO{J}-FWO{J-I); FND;
DO DO
/# DO DO
I* /* PUT
NUMERICAL INTEGRATION *I J=O TO Y * D I ; IF J < DI THEN FW(J)=FSA(J}~FWO(O); ELSE FW(J)=FWO(J-D1); I = M A X { I , J - O I + I ) TO M I N { Y * O I , J + I 6 * D I I I O ) ; FW|J} = FWIJ) + FSA2(J-I}mDFWO(1); END; END; EXPECTATIONS TW : SUM(I-FW)*D;
*I STW = STW + TW;
O U T P U T OF ONE D I S T R I B U T I O N */ EOIT{'ITERATION ',M,'FW IS 'I{FW{I) DO .I=O TO Y~DI BY Y m O l l 2 0 ),'EXPECTATION'~ T~,'AVERAGE EXPECT~TION',STWlM) (SKIP,AtF(5ITSKIPtA,21 F{5,2},SKIP~2 ( A ~ F ( 7 , 3 } ) ) ; TEST FOR CONVERGENCE IF ALL(ABS(FW-FWOI
SPITZEX:
*I THEN GOT~ S P I T Z E X ;
END S P I T Z E R ;
All procedures
use
the
PL/I
programming
language.
FWO = FW;
END;