queues with feedback for time-sharing computer system analysis

16
Queues with Feedback for Time-Sharing Computer System Analysis Author(s): Wei Chang Source: Operations Research, Vol. 16, No. 3 (May - Jun., 1968), pp. 613-627 Published by: INFORMS Stable URL: http://www.jstor.org/stable/168587 . Accessed: 09/05/2014 14:31 Your use of the JSTOR archive indicates your acceptance of the Terms & Conditions of Use, available at . http://www.jstor.org/page/info/about/policies/terms.jsp . JSTOR is a not-for-profit service that helps scholars, researchers, and students discover, use, and build upon a wide range of content in a trusted digital archive. We use information technology and tools to increase productivity and facilitate new forms of scholarship. For more information about JSTOR, please contact [email protected]. . INFORMS is collaborating with JSTOR to digitize, preserve and extend access to Operations Research. http://www.jstor.org This content downloaded from 194.29.185.41 on Fri, 9 May 2014 14:31:35 PM All use subject to JSTOR Terms and Conditions

Upload: wei-chang

Post on 05-Jan-2017

213 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Queues with Feedback for Time-Sharing Computer System Analysis

Queues with Feedback for Time-Sharing Computer System AnalysisAuthor(s): Wei ChangSource: Operations Research, Vol. 16, No. 3 (May - Jun., 1968), pp. 613-627Published by: INFORMSStable URL: http://www.jstor.org/stable/168587 .

Accessed: 09/05/2014 14:31

Your use of the JSTOR archive indicates your acceptance of the Terms & Conditions of Use, available at .http://www.jstor.org/page/info/about/policies/terms.jsp

.JSTOR is a not-for-profit service that helps scholars, researchers, and students discover, use, and build upon a wide range ofcontent in a trusted digital archive. We use information technology and tools to increase productivity and facilitate new formsof scholarship. For more information about JSTOR, please contact [email protected].

.

INFORMS is collaborating with JSTOR to digitize, preserve and extend access to Operations Research.

http://www.jstor.org

This content downloaded from 194.29.185.41 on Fri, 9 May 2014 14:31:35 PMAll use subject to JSTOR Terms and Conditions

Page 2: Queues with Feedback for Time-Sharing Computer System Analysis

QUEUES WITH FEEDBACK FOR TIME-SHARING COMPUTER SYSTEM ANALYSISt

Wei Chang International Business Machines Corporation, Yorktown Heights, New York

(Received August, 1966)

A time-sharing computer system brings the man with a problem much closer to the computer power he needs. The priority processing problems as- sociated with time-sharing computer system are described. A mathemati- cal model was developed based on queues with feedback. The queue size and its variability within the computer can be determined with the enclosed formulation. Other important system design parameters such as the system response time, etc., can also be obtained. The mathematical model complements standard simulation techniques for time-sharing computer analysis. Although the problems discussed in this paper arose in the com- puter systems, the queuing model developed is quite general and may be useful for other industrial applications.

SOME PROBLEMS in the design and analysis of time-sharing computer systems are of particular interest to operations-research workers.

Time-sharing computer systems handle a wide variety of terminals, from typewriters to graphic display equipments. Although many terminal operators may use the computer at once, each terminal operator acts as if he were the only one using the computer. This operation can only be achieved through fast computer response and complete computer control over various tasks to be performed without human intervention. In advanced time-sharing systems the computer must switch rapidly between several dozen terminals, and process service requests swiftly.

Time-sharing systems are, in fact, similar to large-scale real-time sys- tems. Time sharing is one of many ways of doing multiprogramming. Many jobs (or tasks) can be handled simultaneously by the computer processor. The effective speed of processing and throughput are increased by interleaving the individual jobs.

In a time-sharing computer system, each individual job (or entry) is serviced or processed in turn by the computer for a small time-period called a 'quantum.' If the Job is not completed in that quantum, it is placed at the end of appropriate processing queues. In some time-sharing systems, the quantum is a fixed-time interval, depending on system specifications and design considerations. However, a quantum may also be a variable

t A portion of this paper may be included in a Ph.D. thesis in System Science at the Polytechnic Institute of Brooklyn.

613

This content downloaded from 194.29.185.41 on Fri, 9 May 2014 14:31:35 PMAll use subject to JSTOR Terms and Conditions

Page 3: Queues with Feedback for Time-Sharing Computer System Analysis

614 Wei Chang

based on a certain probability distribution and operations conditions. In this paper, we shall use a variable quantum. In most time-sharing systems, a quantum ranges from a few milliseconds to a few hundred milliseconds, depending on the types of computers being used. Recent development of larger processors, large memory units, faster input and output devices, etc., has made the time-sharing concept quite attractive.

Time-sharing computers do the tasks of collecting, scheduling, handling, and returning problems to the user work that computer operators and staffs in a data center now handle. The time the computer spends on these clerical tasks represents a slice of the system processing time, which is usually called the overhead. Some of the processing time within a quantum may also be spent to update the queue lists, input/output data manage- ment, core allocations, and system control. These are often called house- keeping operations. However, these losses are more than offset by the greater problem-solving performance and convenience to the users. Fur- thermore, the input to each terminal varies from time to time. When many terminals share a fast computer, the total input to the computer is more balanced, and high machine-use may be realized. (A peak loaded terminal may be compensated by an idling terminal that results in a more balanced over-all load.)

The tasks to be processed in a time-sharing system are often arranged on a priority basis, depending upon system constraints and functional requirements. The most important tasks, such as the real-time messages from remote locations, etc., must get the highest processing priority to obtain immediate attention of the computer on their arrival. Certain types of terminals may also get a higher priority than other terminals. Debugging runs may also get a higher priority than the productive runs. In some time-sharing systems, three classes of priority assignments called A, B, and C are often encountered. Each class, based on system require- ments, can be further divided into several priority lists. The quantum size for each priority class may also be different.

There are two types of service disciplines in the priority system called preemptive and nonpreemptive. In the preemptive case, the quantum is interruptable. If during the quantum period of a low-priority task a task of higher (and preemptive) priority appears, it immediately displaces the lower-priority task and is served first. After the higher-priority task has been served and high-priority tasks that accumulated during the service have also been served, the computer returns to the service of the lower- priority task that was interrupted.

There are two possible ways that the service can be continued: (1) the service may resume at the point where it was interrupted, and (2) the serv- ice resumes with some overhead loss. The preemptive interrupts are often

This content downloaded from 194.29.185.41 on Fri, 9 May 2014 14:31:35 PMAll use subject to JSTOR Terms and Conditions

Page 4: Queues with Feedback for Time-Sharing Computer System Analysis

Queues with Feedback 615

caused by the hardware functions in a computer system, such as channel interference, I/O (input and output) Ready, data transfers, etc. The important jobs can be arranged and executed as preemptive through programming control. In the. nonpreemptive case, the quantum is not interruptable. If, during the service of an item, one of higher (but non- preemptive) priority appears, it must wait until the end of that quantum given to the lower priority. After completion of the quantum, all items of higher priority that accumulated during the period will be served ahead of the next quantum -to be given to a lower priority. Such service discipline is also often encountered in a time-sharing computer system.

Since the quantum size is normally very small (a few milliseconds, etc.,) the effect of the lower-priority item presence. on a higher-priority item is negligible even in the nonpreemptive service discipline. (A higher priority is delayed by a lower-priority item no more. than a quantum's time.) In fact, all the service requests in a time-sharing system can be treated as preemptive so as to simplify the mathematical. analysis. In. this paper, .only the preemptive priority discipline under a time-sharing environment will be studied...

An important design problem is that of estimating system response-time (often called 'turn-around' time). -For a given task, priority class and system, response time is defined as the interval between arrival of input and departure of results. In most contexts, response time is not a constant but a random variable, and the probability of this variable is a critical design criterion.

Clearly, the quantum size and its distribution are important in deter- mining the system response-time. The selection of an acceptable quantum size is one of the challenging problems in a time-sharing system design. Consider two identical multiprogramming systems. What is the advantage in using time sharing? Since additional overhead losses cannot be avoided in the time-sharing system, the system performance of the time-sharing system is slightly degraded. A longer over-all system response time is expected. If this is so, why use the time sharing? The answer is that:

- although the over-all system response time increases, a certain type of job with short processing times will get better service in terms of a fast response time from the system. The jobs with longer processing times will get poorer service in terms of extra delays. In time-sharing systems, estimat- ing an over-all system-response time is not sufficient to determine the system characteristics. Instead, one must compute the system response-time and its distribution for a given processing-time requirement, since the response time varies with a job's processing time (service time).

Certain system design problems are compounded because the system may have to perform multiple but different functions that are relatively

This content downloaded from 194.29.185.41 on Fri, 9 May 2014 14:31:35 PMAll use subject to JSTOR Terms and Conditions

Page 5: Queues with Feedback for Time-Sharing Computer System Analysis

616 Wei Chang

incompatible. System constraints must be such that either a priority scheme be introduced or a compromise be made to achieve the required performance characteristics. In a time-sharing system, a priority discipline is often used to provide different grades of services. The priority assign- ment in a time-sharing computer has further complicated the required system response-time analysis.

To estimate the core storage sizes required by the system, the queue sizes and their distributions for every priority class must be computed. The amount of core storages required to accommodate a given task may differ from one priority class to another.

This paper discusses a queuing model for a priority time-sharing com- puter. The generating function of queue sizes for each priority, and the response times for a given processing requirement can be found with the aid of the model. The study is limited to the analysis of a time-sharing com- puter processor that is the heart of the system. The queuing behavior of a system is analyzed assuming that jobs have already arrived at the computer. Delays between terminal and processing unit are not included in the model, although these delays must be considered when designing a time-sharing system.

The queuing model developed is an approximation to the physical time- sharing system, which is difficult to analyze analytically.

MATHEMATICAL FORMULATION

SEVERAL MATHEMATICAL models, which assume random input, exponential or constant service-time, and one priority class, are available. [1.2,4] For a constant quantum size, or exponentially-distributed quantum times, the number of quantum per one service demand is geometrically distributed. In this case, the model reduces to a queuing system with feedback, con- sidered by TAKkCS.13] The model for a single-service queue with feedback was originally developed to study a telephone traffic process. However, the formulation of the queue sizes, the response times, etc., are useful for the analysis of a time-shared processor. In what follows, we shall extend Takacs' model to a class of priority queues, and formulate the response times for each priority class in terms of given system parameters, such as traffic densities, quantum sizes, etc. We shall assume that the number of quantum per one service demand is geometrically distributed. For other types of serice-time and quantum-time distributions, the model can be used as an approximation, and a quantitative solution can be obtained.

Input Process

In most time-sharing systems, the number of terminals and other input devices are quite large. The inputs to the computer can be considered as

This content downloaded from 194.29.185.41 on Fri, 9 May 2014 14:31:35 PMAll use subject to JSTOR Terms and Conditions

Page 6: Queues with Feedback for Time-Sharing Computer System Analysis

Queues with Feedback 617

traffic generated from a large number of sources. The inputs are assumed to be time-homogeneous Poisson processes. In fact, the assumption may not be warranted, save during rush hours.

Let Nk be the density of a Poisson process to the priority class k, where k=1, 2, * , N. Assume for convenience that the customers with a smaller priority number have a higher priority than those with a higher-priority number. The customers of each priority form a queue to be served by the computer. The total number of these queues is N. By the definition of Poisson inputs, we have the total input to the system,

A== EkZ Xk (1)

We also define Ak- l+2 + ***+Xk. (2)

Service Process

Jobs or messages of each priority class arrive at the computer center and join the appropriate queue. They wait in turn for service. During each service, one quantum of processing time is given. Two events may occur: either the job is finished after the service of a quantum with probability of qk, or the job is not completed with probability of pk (Pk+

qk= 1, and k= 1, 2, * *, N). If the job is not completed, it will return to the queue and wait again for its turn at the next service quantum. After the completion of a service quantum, the branch process (pk or qk) is independent of its previous selection. This assumption simplifies the solution considerably.

If during the service of a lower-priority item a higher-priority item arrives, the service is interrupted and the priority item will be served (preemptive service). The high-priority item and other high-priority items that may arrive in that queue will be served in turn until the queue becomes empty. The computer is allowed to return to the service of the lower-priority item on a time-sharing basis.

The mathematical model is shown in Fig. 1. Qk(x) is the quantum size distribution for customers of priority class k, if the service is not com- pleted and the next quantum will be needed. Fk(x) is the quantum size distribution when the service is completed. All the quantum are inde- pendent random variables.

When the model is used for a time-shared processor, we must assume that the quantum sizes are either exponentially distributed, independent random variables, or are constants. In these cases, Pk will be independent of the length of the quantum. However, no such restrictions are required to solve the problem of priority queues with feedback. In fact, Qk(x) and Fk(x) can be any distribution function, provided that their Laplace trans-

This content downloaded from 194.29.185.41 on Fri, 9 May 2014 14:31:35 PMAll use subject to JSTOR Terms and Conditions

Page 7: Queues with Feedback for Time-Sharing Computer System Analysis

618 Wei Chang

High Priority Queues

Ak-i

Interrupt

k-th Queue

k

Pkq

f Qk (x) | | Fk(x)

Task is Task Feedback Exits

Fig. 1. A feedback queuing model.

forms exist. Let

( eas dQk(X), (3) Go

Ok(s)=f e-sx dr (x) (4)

Let Hk*(x) be the service-time distribution for priority class k, and Vlk*(s)

This content downloaded from 194.29.185.41 on Fri, 9 May 2014 14:31:35 PMAll use subject to JSTOR Terms and Conditions

Page 8: Queues with Feedback for Time-Sharing Computer System Analysis

Queues with Feedback 619

be its Laplace transform. Referring to the definition of the model

HI*(X) =qkIl,= n-1[Qn-1(X)]*Fk(X), (5)

where Qk'(x) is the nth folded convolution of Qk(X) with itself. The Laplace transform of the service-time distribution is

/k (S) =qkOk(8)/[l-pkPk(8)]. (6)

Effect of Priority Assignment

To find the queue size and the response time for lower-priority cus- tomers, we must first find the influence of the high-priority customers on the service times of low-priority customers. The presence of high-priority customers prolongs the quantum size for low-priority customers, which has been interrupted. Let Qk(x) and Pk(x) be the quantum-size distribu- tion of a priority-k customer, which includes the interruption time of the high-priority customers. The elongation of the service time for lower- priority customers resulting from the presence of higher-priority customers has been investigated by GAVER, 51 and AVI-ITZHAK AND NAOR.[ 1 Denoted by k(s) and Ok(s) the Laplace transforms of ok(x) and Fk(x) respectively.

Let Dk (x) be the busy period distribution for customers of priorities ? k. The busy period is defined as the time interval that the server is con- tinuously busy.'7] Define

rk(s) Ces dDk(x). (7)

Pk(s) can be determined in the next section. If we know Ok(S), pk(S), and rk,_(s), &k(S), and ' (s) for the preemptive-resume, then the preemptive- repeat can be found.-5"8" The completion times in case of preemptive- resume with additional delays can be obtained as follows:

Let Yk(x) be the distribution function of the delay for customers of priority k. This delay caused by every interruption, further prolongs the service time of a lower-priority quantum. Let

Pk(S)= e d Yk(x), (8)

and Pk (S) =pkjs+Akd1[1-rk-1(S)]. (9)

By using a similar method,"5] we have

k(s) = fk{ s+ Ak-1[1- rk-1 (s) P*-1(8)] ( )

and Ak(S) =Ok{s+Ak- P-rk-l(S)P*-1(8)I}. (11)

Let fik(x) be the total service-time distribution for priority k including

This content downloaded from 194.29.185.41 on Fri, 9 May 2014 14:31:35 PMAll use subject to JSTOR Terms and Conditions

Page 9: Queues with Feedback for Time-Sharing Computer System Analysis

620 Wei Chcang

the interruption times, and ib(s) be its Laplace transform. Then *k(s) can be obtained as qk'k(s)/[1-pk'k(s)].

Queue Sizes and Busy Periods for Priority Class k

The queue size information for priority class k is important in the time- sharing computer analysis. It influences the storage requirement for the system. To determine the dynamic nature of the core storage usage, the queue size for priority class k and its distribution must be found. One way to do this is to examine the queue size of priority class k at every departure instant of a priority-k customer. Obviously, the feedback dis- cipline considered in this paper has no effect on the queue-size distributions. Assume that each customer is served in one stretchE3' (interrupted only by a higher-priority arrival) equal in length to the total length of quantum used in the feedback system for the same customer. Obviously, the number of customers in the system at any moment will be the same in both systems. Hence, the queue-size information can be obtained from the general results of the priority queues. [5,6,8,9] Quite often, the customers in a time-sharing system are messages. During the processing of a quan- tum, one segment of the message is brought from the auxiliary storage (magnetic drum, etc.) to the core storage for processing. In terms of computer terminology, this is called 'paging.' For engineering purpose, it might be required to examine the queue size of priority class k at every completion point of a quantum."1' To find the busy-period distribution we may assume without loss of generality that the customers join the queue only once and are served in one stretch. Their service time is equal to the total service time that they would have if they were served in an ordinary priority queuing system. In this case, rk(s) is given in the form of a recursive formula. [8]

The Stationary Process of a Generalized MI/G/ Queuing Model

In a time-sharing computer system a program with a shorter processing (service) time can be completed ahead of a program with a longer service time. The response-time distribution for priority class k depends on many system parameters. For instance, it depends on the traffic densities, X1, ** *, Xk, the service time distribution of higher priorities, the service- time distribution of priority class k and the quantum-size distribution of priority class k. The analysis of the response times for priority class k will be a complicated one, because the response-time distribution depends on so many parameters. The response-time distribution for a given service- time requirement in the priority class k can be obtained by extending the method of Takacs.131 Primarily, one must consider the presence of higher-

This content downloaded from 194.29.185.41 on Fri, 9 May 2014 14:31:35 PMAll use subject to JSTOR Terms and Conditions

Page 10: Queues with Feedback for Time-Sharing Computer System Analysis

Queues with Feedback 621

priority customers in the analysis. To avoid excessive detail, only pre- emptive-resume discipline is assumed.

The interruptions caused by the higher-priority customers who arrive during the servicing periods of the customers of priority class k can be included in the service-time computations.

The ones who arrive during the idle period, when there is no customer of priority class k present in the system, can be included in the analysis as follows: Let x be the time during which there is no customer of priority class k present in the system. From the definition of a Poisson process, x has a probability density of Ak exp - Xkxj. The server-occupation time N(x) caused by the arrivals of the higher-priority customers during x, as measured at the arriving instant of a low-priority customer who termi- nates x, can be obtained from the formulation:

00

Vk (s) = f; e-(x)Ae-xk dx

= XJ~k -s-Ak-lrk-1(X7,)1/ (12) {[Ak-Ak-lrk- (Xk)[Ak -s-Ak-l~k-l (S },A

where #k-1(8) =(1/Ak-1) Zj1 3X4,*(S). (13)

Since additional customers of priority classes ? k-1 may arrive during N(x), the total occupation time that must be elapsed before the arriving customer of priority class k starts to receive its service, has the Laplace transform Pk (8),

where Vk(s) = Vk{8+Ak-l[1-rk-l(s)j.* (14)

WELCH solves the priority queue problem by reducing it to a generalized lI/GIl queuing model,19" 0 considered by FINCH.'1' In this generalized

model, the input is a Poisson process of Xk and two service-time distribu- tions are considered. An arriving customer who finds the server is busy will receive service immediately after the departure of the customer ahead of him [the service time distribution is Hk(x)]. If he arrives and finds the server idle, he must wait a random delay time before his service begins. The random delay time is characterized by the Laplace transform *k(S).

The computer system under a nontime-sharing environment (pk = 0, qk 1)

can be analyzed by this model. To find the response-time distribution under a time-sharing environment, Finch's model must be studied further to yield the following results.

Consider a single server system with a Poisson input of density X. If a customer arrives and finds the server busy, his service-time distribution is characterized by the Laplace transform t(s). If a customer arrives and finds the server free, his service-time distribution is characterized by the Laplace transform +'(s). Let as --'(0) and a.- -I'(0). A first-

This content downloaded from 194.29.185.41 on Fri, 9 May 2014 14:31:35 PMAll use subject to JSTOR Terms and Conditions

Page 11: Queues with Feedback for Time-Sharing Computer System Analysis

622 Wei Chang

come-first-serve discipline is assumed. The service is completed in one stretch and no time-sharing is involved.

Let rT, (n = 1, 2, *.*), be the arriving time of the nth customer. De- noted by i, the queue size at time r.-O, i.c., the nth arriving customer finds An customers (either waiting or being served) in the system. Let Xn be the time needed to complete the current service at time r.-O. If A n-0 then x,, =0. The vector sequence

( )n Xn ) n = 1 , 2, ...

is a Markovian stochastic sequence. The following notations are intro- duced for a stationary process:

PI ~n =jI = Pj, (j=0, 1, 2, ..* ) (15)

PI Xn , Sn =j} =Pj(X), (j=O1 1) 2) .. * * LO-) (16;) a0

and H1j(s)= e-sx dPj(x). [(R(s)_0, j=1, 2, ... ] (17)

AVe shall prove that if O<Po<l, then the stationary distribution exists. Let

U*(s, z) = _1 IHM(s)z'. (18)

To find Po and U*(s, z), we use a similar method developed by WISHART. [121

(See also rTakai 31 )

If wve assume that both (tn+l, Xn+l) and (Stn, Xn) have the same stationary distribution, and if we form the Laplace transforms, then we obtain that Po and HIj(s) (j= 1, 2, ) must satisfy the following system of linear equations:

Po-1 ob(A)+k=1 rIL X(X)X) (19)

II(8)- [b( )-(s) ]Po + ['I(X) - -F(s) (0

llj~~~~~~~~s)E ko -X(Xj-lX k ----II (S X))(X

11j8) I 11j1 () -Hi-1 (s)]t-- I h(+[ [IF-- /(- (21)

and Po+ZEjHl-lj(O)=1. (22)

To prove (19), (20), and (21), we refer to Takacs1131 anrd to the fact that twvo service-time distributions leiave been assumed.

Forminigi generating functions, we have

I.s-X( 1-z)]UZ*(s, Z)r- XzU*(,\, z) +XA[4(X\)

-'(S)]iPo+ Xz{ J*[x, v(X)V -J*(X' Z) } (23)

*[1(X) -P(s)]/[F(X) -Z].

This content downloaded from 194.29.185.41 on Fri, 9 May 2014 14:31:35 PMAll use subject to JSTOR Terms and Conditions

Page 12: Queues with Feedback for Time-Sharing Computer System Analysis

Queues with Feedback 623

If s=X(I-z) in (23) then we get

U*(X, z)+Po{4(X) -C[X(1 -z)]}

+jX(X) -[X(1 -z)]} f U*['j I(X)] (24) - U*(X, Z) I AT N - Z] =?0

The comparison of (23) and (24) gives

U*(s, z)-=Xz[Po[4 (X( 1-z) )-b(s)]

+[U*(x, *i(X) )-U*(X, z)]['F(X(1-Z)) (25)

-T(S)]/[T(X) -z]}/[S-X(1-z)].

From (19) U*[X, ,(X)] =PO[1 (X)] and from (24) that

U*(X, z) =Po{{l(X) -c[X(1-Z)]}[ [(X) -Z] (26)

From (25) and (26), we have

U*(s, z)-ozq[Vlz](s [((1z)-]()(-)) 27

- (s) ]/[z-tr(X( 1-z) )]}/[s-( 1-Z)]. (27)

(27) reduces to equation (14) of Takacstl3I if c1(s) = T(s). Since by (22) Po+ U*(O, 1) = 1, it follows that

Po= (1-Xab)/(1+Xa0--Xab). (28)

Stationary distribution exists if O<Po< 1. In this case, (27) can be uniquely determined.

Finally, we also remark that the stationary distribution of , n= 1, 2, *., is given by the following generating function

U*(z) = -o P jz=Po{zI[X(1-z)] (29)

This follows from (27), because U*(z) =Po+ U*(O, z), a result given by Welch.""01 The Laplace transform of the waiting-time distribution, Q*(s) and the Laplace transform of the response time (waiting time+service time) distribution T*(s), can be obtained easily as

2* (S)= Po+ U*[s, (S) 1/41(S) (0 = PO[8+ XT~s) - X4(s) ]/{s -1 - T(S)]},

T*(s) =P04(s) + U*[s, *F(s)]

-Po[sars)e-ni(s) +Xi(s)]/{s-M-ss)]. (31)

Results are identical with WAelch's.l010

This content downloaded from 194.29.185.41 on Fri, 9 May 2014 14:31:35 PMAll use subject to JSTOR Terms and Conditions

Page 13: Queues with Feedback for Time-Sharing Computer System Analysis

624 Wei Chang

Stationary Distribution of Response Timnes for Priority Class k

Once U*(s, z) has been derived, one can readily find the stationary dis- tribution of the response time for priority class k by using a method of Takacs. [ The following is a summary of the results. For simplification of the notations, we note the following identities.

X k2 (IS) 4k(s), (D W = 4(8) Vk(8) (32)

and let P= Pk qqk Y F (s) = ) (k(S)3

V (s) = lph(8), 0 (S)-= k () .

In a time-sharing environment, let us denote by Xn, in the time needed to complete the current service (if any) and the queue size of priority-class k at the instant immediately before the arrival of the nth customer. For a stationary process, let

Pi =PI {n =A (j=02 ly 2) ... )

P (x) = Pi xn < x n =j} , (x > 0 j= 12 22 ... )

and lI(s) feaz dPj(x), (j=1, 2,*

and let the generating function

U(s, z) = Zj2, ft;(s)z'. (34)

The U(s, z) (defined in the time-sharing environment) is the same as U*(s, z) (defined in the generalized M/G/1 model) except that in the latter Xn the remaining length of the current service at the arrival of the nth customer, is replaced by the remaining part of the total service time of the customer just being served at the arrival of the nth customer. The time added to x. is independent of the queue size and has a Laplace transform of q/[1-psp(s)]. Accordingly, we have

U* (s, z) ---U (s, z) q1 tpv (s)] or

U(s, z)=[( 1-Xab)/(1l+Xae-Xab)]ItXz[z'(X(1-z))

-zdb(s) +4(s)4 (X( 1-z)) -v (X( 1-z) ) (35)

-4(s)b (X ( 1 -z) ) + '(s)[1 -pqp(s)]} /{q[s ( 1 -z)]

* [- (X( 1-Z) ]-

Let Tm(x) be the response-time distribution for a priority-k customer whose service time requires m quantum (including the last quantum).

This content downloaded from 194.29.185.41 on Fri, 9 May 2014 14:31:35 PMAll use subject to JSTOR Terms and Conditions

Page 14: Queues with Feedback for Time-Sharing Computer System Analysis

Queues with Feedback 625

Let the Laplace transform be

Urn(S) e= dTm(x), (36)

and the moments be

T(r)f I r dT(x) (.1)rdr/(ds)rUm(S) Iso . (37)

Clearly, lI1(s) can be obtained as

U (s) Po0(8) V(s) +E, 1 H(s)[qO(s)+p'p(s)]V'(s) = -Po(s) V(s) + U[s, qO(s) +pqO(s)]{ O(s)/[qG(s) + pp0(s)]}X

where Po is given by (28) and U(s, z) by (35). Let J(s) =qG(s) +psp(s), then Ui(s) can be explicitly obtained as

Ul(s) {(l-Xab)/(l+Xa,-Xab)} {O(s)V(s)

+{ XJ(s) [J(s)I[X(i -J(s) )J - J(s>?)Qs)

+4(s)I[X (1l-J(s))]- J[X(1-J(s))] (38)

-ic(s)b[X (1- J(s) )] + (s) ][1-pp(s)J(s) } /

{qJ(s) [J(s) -'{[X(1-J(s))I1[s-X(1-J(s) )I} }. Ur(s) can be obtained by using a similar method given in Takacs.13] De- noted by Nn(m) the total time spent in the system by the nth customer in the kth priority class until the completion of the mth quantum (if he joins the queue at least m times). Denoted by Rn(m) is the queue size immedi- ately after the mth quantum.

At completion of the mth quantum, the service is not completed. Let

U.n(S, z) =-E{exp [ -sNn(m)]zrn(m)I. (39)

For a stationary sequence { n, x4 we have

U1(s, z) = Pop[s+X(1-z)]V[s+X(1-z)]

+ U~s+X(l-z) {J[s+X(l-z)I] (40)

Urn+i(s, z) =s[s+X(1-Z)]Um{s, J[s+X(1-z)]}-

The only difference between the formulation here and that of Takics131 is that two quantum distributions are considered in the time-sharing model.

Urn+i(s) can be obtained from (40) as

Um.+(S)=(S) Um(S, 1). (41)

Equation (40) is the recursive formula to determine Um+i(s, z), which in turn determines Um+2(s) given in (41). In principle, Um(s) for m= 1, 2, 3,

This content downloaded from 194.29.185.41 on Fri, 9 May 2014 14:31:35 PMAll use subject to JSTOR Terms and Conditions

Page 15: Queues with Feedback for Time-Sharing Computer System Analysis

626 Wei Chang

can be determined. However, these formulas are in the forms of complicated Laplace transforms.

Finally, the distribution of the system-response times for all customers in the priority-class k can be obtained from the Laplace transform

q Em= p Ur(S).

The average system response time can be obtained as the average-queue size for priority-class k, divided by Xk. The second moment of the system response-time distribution can be obtained by using a similar method of Takacs.131

CONCLUSION

IN THIS paper, we discuss the formulation of a queuing model for a time- sharing computer including priorities. The queue-size generating function can be obtained for every priority class. The Laplace transforms of the response times can"] also be explicitly determined.

The paper provides a basis for the study of the quantum sizes and their effect on the response times. The response-time formulas are complicated, but fortunately we are living in an era of digital computers when compli- cated formulas in the old-fashioned sense can be easily studied.

Many problems in the time-sharing computer system, such as job- scheduling, control, allocation of storage, etc., remain to be solved. As the data processing technology continues to grow, the analysis of time- sharing computers merits continued efforts in the postulation and elabora- tion of mathematical models.

ACKNOWLEDGMENT

THE AUTHOR wishes to acknowledge the pioneer work done by L. TAK:kCS on queues with feedback, which have been very helpful in pre- paring this paper. He is also indebted to the referees of the JOURNAL for their helpful comments and suggestions.

REFERENCES

1. M. GREENBERGER, "The Priority Problem and Computer Time-Sharing," Management Sci. 12, No. 11 (1966).

2. B. KRISHNAMOORTHI AND R. C. WOOD, "Time-Shared Computer Operations with Both Interarrival and Service Times Exponential," J.A.C.M. 13, No. 3 (1966).

3. L. TAKXCS, "A Single-Server Queue with Feedback," Bell Tech. J. 505-519 (1963).

4. L. KLEINROCK, "Analysis of a Time-Shared Processor," Naval Res. Log. Quart. 11, No. 1 (1964).

5. D. P. GAVER, JR., "A Waiting Line with Interrupted Service, Including Priori- ties," J. Roy Stat, Soc. Ser. B 24, 73-90 (1962).

This content downloaded from 194.29.185.41 on Fri, 9 May 2014 14:31:35 PMAll use subject to JSTOR Terms and Conditions

Page 16: Queues with Feedback for Time-Sharing Computer System Analysis

Queues with Feedback 627

6. B. AVI-ITZHAK AND P. NAOR, "Multi-Purpose Service Stations in Queuing Theory," Proc. Third IFORS Conf., Oslo (1963).

7. L. TAKACS, Introduction to the Theory of Queues, Oxford, 1962. 8. W. CHANG, "Preemptive Priority Queues," Opns. Res. 13, 820-827 (1965). 9. P. D. WELCH, "On Pre-emptive Resume Priority Queues," Ann. Math. Stat.

35, No. 2 (1964). 10. , "On a Generalized M/G/1 Queuing Process in Which the First Cus-

tomer of Each Busy Period Receives Exceptional Service," Opns. Res. 12, 736-752 (1964).

11. P. D. FINCH, "A Probability Limit Theorem with Application to a Generaliza- J tion of Queuing Theory," Acta Math. Acad, Sci, (Hungar.) 10, 1959.

12. D. M. G. WISHART, "An Application of Ergodic Theorems in the Theory of Queues," Proc. Fourth Berkeley Symposium on Math. Stat. and Probability, Vol. 2, University of California Press, Berkeley and Los Angeles, 1961.

13. L. TAKACS, "Delay Distributions for One Line with Poisson Input, General Holding Times, and Various Orders of Service," Bell System Tech. J. 42, No. 2 (1963).

14. W. CHANG, "A Queuing Model for a Simple Case of Time-Sharing," IBM Sys- tems J. 5, No. 2 (1966).

This content downloaded from 194.29.185.41 on Fri, 9 May 2014 14:31:35 PMAll use subject to JSTOR Terms and Conditions