<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="m10820">
  <name>Priority M/G/1 Queue with and without Preemption</name>
  <metadata>
  <md:version>2.2</md:version>
  <md:created>2002/08/19</md:created>
  <md:revised>2002/11/04</md:revised>
  <md:authorlist>
      <md:author id="bs">
      <md:firstname>Bart</md:firstname>
      
      <md:surname>Sinclair</md:surname>
      <md:email>bs@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="charlet">
      <md:firstname>Charlet</md:firstname>
      
      <md:surname>Reedstrom</md:surname>
      <md:email>charlet@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="bs">
      <md:firstname>Bart</md:firstname>
      
      <md:surname>Sinclair</md:surname>
      <md:email>bs@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>job class</md:keyword>
    <md:keyword>M/G/1</md:keyword>
    <md:keyword>non-preemptive</md:keyword>
    <md:keyword>preemption</md:keyword>
    <md:keyword>preemptive resume</md:keyword>
    <md:keyword>priority scheduling</md:keyword>
  </md:keywordlist>

  <md:abstract>(Blank Abstract)</md:abstract>
</metadata>


  <content>
    <section id="main">
      <name>M/G/1 Queue with Priority</name>
      <para id="para1">
	Another useful extension to the classical M/G/1 queue is the
	priority M/G/1 queue.  The workload for the queue consists of two
	or more classes of jobs.  Each job belongs to a single class.
	Jobs receive service in an order that is based on a predetermined
	priority ranking among the classes of jobs.  Each class of job may
	have its own, distinct arrival rate (with exponentially
	distributed interarrival times) and service time distribution.
      </para>

      <para id="para2">
	The objective is to determine the average waiting time for jobs
	of each class and the average number of jobs of each class in
	the queue.  These will depend on whether the queueing discipline
	is <term>preemptive</term> or <term>non-preemptive</term>.  A
	non-preemptive queueing discipline requires a job that begins
	service to complete its service without interruption.  In a
	preemptive priority queue, if a job arriving at the queue finds
	a job of lower priority in service, the arriving job preempts
	the job being served and begins service immediately.  A
	preempted job will resume service, at the point at which its
	service was suspended, as soon as there are no higher priority
	jobs remaining in the queue.  We call a preemptive scheduling
	policy with this latter property <term>preemptive resume</term>.
      </para>

      <para id="para3">
	Notation:
	<list id="prelist">
	  <item>
	    <m:math>
	      <m:ci><m:msub>
		  <m:mi>X</m:mi>
		  <m:mi>i</m:mi>
		</m:msub></m:ci>
	    </m:math> = service time random variable for priority
	    <m:math><m:ci>i</m:ci></m:math> jobs
	  </item>
	  <item>
	    <m:math>
	      <m:ci><m:msub>
		  <m:mi>R</m:mi>
		  <m:mi>i</m:mi>
		</m:msub></m:ci>
	    </m:math> = residual service time random variable for
	    priority <m:math><m:ci>i</m:ci></m:math> jobs
	  </item>
	  <item>
	    <m:math>
	      <m:ci><m:msub> 
		  <m:mi>λ</m:mi> 
		  <m:mi>i</m:mi>
		</m:msub></m:ci> 
	    </m:math>
	    = arrival rate for priority <m:math><m:ci>i</m:ci></m:math>
	    jobs (Poisson arrivals)
	  </item>
	  <item>
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:ci><m:msub> 
		    <m:mi>ρ</m:mi> 
		    <m:mi>i</m:mi>
		  </m:msub></m:ci>
		<m:apply>
		  <m:times/>
		  <m:ci><m:msub> 
		      <m:mi>λ</m:mi> 
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>X</m:mi>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	    = utilization of the server by jobs of priority
	    <m:math><m:ci>i</m:ci></m:math>
	  </item>
	  <item>
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:ci><m:msub> 
		    <m:mi>σ</m:mi> 
		    <m:mi>i</m:mi>
		  </m:msub></m:ci>
		<m:apply>
		  <m:sum/>
		  <m:bvar><m:ci>j</m:ci></m:bvar>
		  <m:lowlimit><m:cn>1</m:cn></m:lowlimit>
		  <m:uplimit><m:ci>i</m:ci></m:uplimit>
		  <m:ci><m:msub> 
		      <m:mi>ρ</m:mi> 
		      <m:mi>j</m:mi>
		    </m:msub></m:ci>
		</m:apply>
	      </m:apply>
	    </m:math>
	    = utilization of the server by jobs of priority 1 to
	    <m:math><m:ci>i</m:ci></m:math>
	  </item>
	  <item>
	    <m:math>
	      <m:ci><m:msub>
		  <m:mi>W</m:mi>
		  <m:mi>i</m:mi>
		</m:msub></m:ci>
	    </m:math>
	    = random variable for the time a job of priority
	    <m:math><m:ci>i</m:ci></m:math> spends waiting from arrival
	    until service begins
	  </item>
	  <item>
	    <m:math>
	      <m:ci><m:msub>
		  <m:mi>N</m:mi>
		  <m:mi>i</m:mi>
		</m:msub></m:ci>
	    </m:math>
	    = random variable for the number of jobs in queue
	    <m:math><m:ci>i</m:ci></m:math> (not counting jobs for which
	    service has already begun)
	  </item>
	  <item>
	    <m:math>
	      <m:ci><m:msub>
		  <m:mi>T</m:mi>
		  <m:mi>i</m:mi>
		</m:msub></m:ci>
	    </m:math>
	    = random variable for the time a job of priority
	    <m:math><m:ci>i</m:ci></m:math> spends in the system from
	    arrival until the completion of service
	  </item>
	</list>
      </para>

      <para id="para4">
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:ci><m:msub>
		<m:mi>W</m:mi>
		<m:mi>i</m:mi>
	      </m:msub></m:ci>
	    <m:apply>
	      <m:plus/>
	      <m:ci><m:msubsup>
		  <m:mi>W</m:mi>
		  <m:mi>i</m:mi>
		  <m:mi>q</m:mi>
		</m:msubsup></m:ci>
	      <m:ci><m:msubsup>
		  <m:mi>W</m:mi>
		  <m:mi>i</m:mi>
		  <m:mi>a</m:mi>
		</m:msubsup></m:ci>
	      <m:ci><m:msubsup>
		  <m:mi>W</m:mi>
		  <m:mi>i</m:mi>
		  <m:mi>r</m:mi>
		</m:msubsup></m:ci>
	    </m:apply>
	  </m:apply>
	</m:math>
	where
	<list id="listr">
	  <item>
	    <m:math>
	      <m:ci><m:msubsup>
		  <m:mi>W</m:mi>
		  <m:mi>i</m:mi>
		  <m:mi>q</m:mi>
		</m:msubsup></m:ci>
	    </m:math>
	    = random variable for the delay seen by an arriving class
	    <m:math><m:ci>i</m:ci></m:math> job due to other jobs in
	    the system which have not yet begun service
	  </item>
	  <item>
	    <m:math>
	      <m:ci><m:msubsup>
		  <m:mi>W</m:mi>
		  <m:mi>i</m:mi>
		  <m:mi>a</m:mi>
		</m:msubsup></m:ci>
	    </m:math>
	    = random variable for the delay seen by an arriving class
	    <m:math><m:ci>i</m:ci></m:math> job due to jobs which
	    arrive after it but before it begins service
	  </item>
	  <item>
	    <m:math>
	      <m:ci><m:msubsup>
		  <m:mi>W</m:mi>
		  <m:mi>i</m:mi>
		  <m:mi>r</m:mi>
		</m:msubsup></m:ci>
	    </m:math>
	    = random variable for the delay seen by an arriving class
	    <m:math><m:ci>i</m:ci></m:math> job due to jobs whose
	    service is in progress (either actually in service or
	    preempted) at the time of the arrival
	  </item>
	</list>
	We want to know
	<m:math>
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:mean/>
	      <m:ci><m:msub>
		  <m:mi>W</m:mi>
		  <m:mi>i</m:mi>
		</m:msub></m:ci>
	    </m:apply>
	    <m:apply>
	      <m:plus/>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msubsup>
		    <m:mi>W</m:mi>
		    <m:mi>i</m:mi>
		    <m:mi>q</m:mi>
		  </m:msubsup></m:ci>
	      </m:apply>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msubsup>
		    <m:mi>W</m:mi>
		    <m:mi>i</m:mi>
		    <m:mi>a</m:mi>
		  </m:msubsup></m:ci>
	      </m:apply>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msubsup>
		    <m:mi>W</m:mi>
		    <m:mi>i</m:mi>
		    <m:mi>r</m:mi>
		  </m:msubsup></m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>.
      </para>

      <para id="para5">
	The first two terms depend only on the priority of the arriving
	job and not on whether queueing is preemptive or
	non-preemptive. 
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:mean/>
	      <m:ci><m:msubsup>
		  <m:mi>W</m:mi>
		  <m:mi>i</m:mi>
		  <m:mi>q</m:mi>
		</m:msubsup></m:ci>
	    </m:apply>
	    <m:apply>
	      <m:sum/>
	      <m:bvar><m:ci>j</m:ci></m:bvar>
	      <m:lowlimit><m:cn>1</m:cn></m:lowlimit>
	      <m:uplimit><m:ci>i</m:ci></m:uplimit>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>N</m:mi>
		      <m:mi>j</m:mi>
		    </m:msub></m:ci>
		</m:apply>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>X</m:mi>
		      <m:mi>j</m:mi>
		    </m:msub></m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:sum/>
	      <m:bvar><m:ci>j</m:ci></m:bvar>
	      <m:lowlimit><m:cn>1</m:cn></m:lowlimit>
	      <m:uplimit><m:ci>i</m:ci></m:uplimit>
	      <m:apply>
		<m:times/>
		<m:ci><m:msub>
		    <m:mi>λ</m:mi>
		    <m:mi>j</m:mi>
		  </m:msub></m:ci>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>W</m:mi>
		      <m:mi>j</m:mi>
		    </m:msub></m:ci>
		</m:apply>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>X</m:mi>
		      <m:mi>j</m:mi>
		    </m:msub></m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:sum/>
	      <m:bvar><m:ci>j</m:ci></m:bvar>
	      <m:lowlimit><m:cn>1</m:cn></m:lowlimit>
	      <m:uplimit><m:ci>i</m:ci></m:uplimit>
	      <m:apply>
		<m:times/>
		<m:ci><m:msub>
		    <m:mi>ρ</m:mi>
		    <m:mi>j</m:mi>
		  </m:msub></m:ci>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>W</m:mi>
		      <m:mi>j</m:mi>
		    </m:msub></m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>

	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:mean/>
	      <m:ci><m:msubsup>
		  <m:mi>W</m:mi>
		  <m:mi>i</m:mi>
		  <m:mi>a</m:mi>
		</m:msubsup></m:ci>
	    </m:apply>
	    <m:apply>
	      <m:sum/>
	      <m:bvar><m:ci>j</m:ci></m:bvar>
	      <m:lowlimit><m:cn>1</m:cn></m:lowlimit>
	      <m:uplimit>
		<m:apply>
		  <m:minus/>
		  <m:ci>i</m:ci>
		  <m:cn>1</m:cn>
		</m:apply>
	      </m:uplimit>
	      <m:apply>
		<m:times/>
		<m:ci><m:msub>
		    <m:mi>λ</m:mi>
		    <m:mi>j</m:mi>
		  </m:msub></m:ci>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>W</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		</m:apply>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>X</m:mi>
		      <m:mi>j</m:mi>
		    </m:msub></m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:sum/>
	      <m:bvar><m:ci>j</m:ci></m:bvar>
	      <m:lowlimit><m:cn>1</m:cn></m:lowlimit>
	      <m:uplimit>
		<m:apply>
		  <m:minus/>
		  <m:ci>i</m:ci>
		  <m:cn>1</m:cn>
		</m:apply>
	      </m:uplimit>
	      <m:apply>
		<m:times/>
		<m:ci><m:msub>
		    <m:mi>ρ</m:mi>
		    <m:mi>j</m:mi>
		  </m:msub></m:ci>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>W</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
	Substituting these two expressions gives

	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:mean/>
	      <m:ci><m:msub>
		  <m:mi>W</m:mi>
		  <m:mi>i</m:mi>
		</m:msub></m:ci>
	    </m:apply>
	    <m:apply>
	      <m:plus/>
	      <m:apply>
		<m:sum/>
		<m:bvar><m:ci>j</m:ci></m:bvar>
		<m:lowlimit><m:cn>1</m:cn></m:lowlimit>
		<m:uplimit><m:ci>i</m:ci></m:uplimit>
		<m:apply>
		  <m:times/>
		  <m:ci><m:msub>
		      <m:mi>ρ</m:mi>
		      <m:mi>j</m:mi>
		    </m:msub></m:ci>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>W</m:mi>
			<m:mi>j</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:sum/>
		<m:bvar><m:ci>j</m:ci></m:bvar>
		<m:lowlimit><m:cn>1</m:cn></m:lowlimit>
		<m:uplimit>
		  <m:apply>
		    <m:minus/>
		    <m:ci>i</m:ci>
		    <m:cn>1</m:cn>
		  </m:apply>
		</m:uplimit>
		<m:apply>
		  <m:times/>
		  <m:ci><m:msub>
		      <m:mi>ρ</m:mi>
		      <m:mi>j</m:mi>
		    </m:msub></m:ci>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>W</m:mi>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msubsup>
		    <m:mi>W</m:mi>
		    <m:mi>i</m:mi>
		    <m:mi>r</m:mi>
		  </m:msubsup></m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
	which we can manipulate into two slightly different forms:
	
	<equation id="eqn1">
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>W</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		</m:apply>
		<m:apply>
		  <m:minus/>
		  <m:cn>1</m:cn>
		  <m:ci><m:msub>
		      <m:mi>σ</m:mi>
		      <m:mrow>
			<m:mi>i</m:mi>
			<m:mo>-</m:mo>
			<m:mn>1</m:mn>
		      </m:mrow>
		    </m:msub></m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:plus/>
		<m:apply>
		  <m:sum/>
		  <m:bvar><m:ci>j</m:ci></m:bvar>
		  <m:lowlimit><m:cn>1</m:cn></m:lowlimit>
		  <m:uplimit><m:ci>i</m:ci></m:uplimit>
		  <m:apply>
		    <m:times/>
		    <m:ci><m:msub>
			<m:mi>ρ</m:mi>
			<m:mi>j</m:mi>
		      </m:msub></m:ci>
		    <m:apply>
		      <m:mean/>
		      <m:ci><m:msub>
			  <m:mi>W</m:mi>
			  <m:mi>j</m:mi>
			</m:msub></m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msubsup>
		      <m:mi>W</m:mi>
		      <m:mi>i</m:mi>
		      <m:mi>r</m:mi>
		    </m:msubsup></m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>

	<equation id="eqn2">
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>W</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		</m:apply>
		<m:apply>
		  <m:minus/>
		  <m:cn>1</m:cn>
		  <m:ci><m:msub>
		      <m:mi>σ</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:plus/>
		<m:apply>
		  <m:sum/>
		  <m:bvar><m:ci>j</m:ci></m:bvar>
		  <m:lowlimit><m:cn>1</m:cn></m:lowlimit>
		  <m:uplimit>
		    <m:apply>
		      <m:minus/>
		      <m:ci>i</m:ci>
		      <m:cn>1</m:cn>
		    </m:apply>
		  </m:uplimit>
		  <m:apply>
		    <m:times/>
		    <m:ci><m:msub>
			<m:mi>ρ</m:mi>
			<m:mi>j</m:mi>
		      </m:msub></m:ci>
		    <m:apply>
		      <m:mean/>
		      <m:ci><m:msub>
			  <m:mi>W</m:mi>
			  <m:mi>j</m:mi>
			</m:msub></m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msubsup>
		      <m:mi>W</m:mi>
		      <m:mi>i</m:mi>
		      <m:mi>r</m:mi>
		    </m:msubsup></m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>
	(we define
	<m:math>
	  <m:ci><m:msub>
	      <m:mi>σ</m:mi>
	      <m:mn>0</m:mn>
	    </m:msub></m:ci>
	</m:math>
	to be 0).
      </para>

      <para id="para6">
	From <cnxn target="eqn1" strength="5"/>, we get (for
	<m:math>
	  <m:apply>
	    <m:geq/>
	    <m:ci>i</m:ci>
	    <m:cn>2</m:cn>
	  </m:apply>
	</m:math>)

	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:times/>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msub>
		    <m:mi>W</m:mi>
		    <m:mrow>
		      <m:mi>i</m:mi>
		      <m:mo>-</m:mo>
		      <m:mn>1</m:mn>
		    </m:mrow>
		  </m:msub></m:ci>
	      </m:apply>
	      <m:apply>
		<m:minus/>
		<m:cn>1</m:cn>
		<m:ci><m:msub>
		    <m:mi>σ</m:mi>
		    <m:mrow>
		      <m:mi>i</m:mi>
		      <m:mo>-</m:mo>
		      <m:mn>2</m:mn>
		    </m:mrow>
		  </m:msub></m:ci>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:plus/>
	      <m:apply>
		<m:sum/>
		<m:bvar><m:ci>j</m:ci></m:bvar>
		<m:lowlimit><m:cn>1</m:cn></m:lowlimit>
		<m:uplimit>
		  <m:apply>
		    <m:minus/>
		    <m:ci>i</m:ci>
		    <m:cn>1</m:cn>
		  </m:apply>
		</m:uplimit>
		<m:apply>
		  <m:times/>
		  <m:ci><m:msub>
		      <m:mi>ρ</m:mi>
		      <m:mi>j</m:mi>
		    </m:msub></m:ci>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>W</m:mi>
			<m:mi>j</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msubsup>
		    <m:mi>W</m:mi>
		    <m:mrow>
		      <m:mi>i</m:mi>
		      <m:mo>-</m:mo>
		      <m:mn>1</m:mn>
		    </m:mrow>
		    <m:mi>r</m:mi>
		  </m:msubsup></m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>

	<m:math display="block">
	  <m:ci>⇒</m:ci>
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:sum/>
	      <m:bvar><m:ci>j</m:ci></m:bvar>
	      <m:lowlimit><m:cn>1</m:cn></m:lowlimit>
	      <m:uplimit>
		<m:apply>
		  <m:minus/>
		  <m:ci>i</m:ci>
		  <m:cn>1</m:cn>
		</m:apply>
	      </m:uplimit>
	      <m:apply>
		<m:times/>
		<m:ci><m:msub>
		    <m:mi>ρ</m:mi>
		    <m:mi>j</m:mi>
		  </m:msub></m:ci>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>W</m:mi>
		      <m:mi>j</m:mi>
		    </m:msub></m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:minus/>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>W</m:mi>
		      <m:mrow>
			<m:mi>i</m:mi>
			<m:mo>-</m:mo>
			<m:mn>1</m:mn>
		      </m:mrow>
		    </m:msub></m:ci>
		</m:apply>
		<m:apply>
		  <m:minus/>
		  <m:cn>1</m:cn>
		  <m:ci><m:msub>
		      <m:mi>σ</m:mi>
		      <m:mrow>
			<m:mi>i</m:mi>
			<m:mo>-</m:mo>
			<m:mn>2</m:mn>
		      </m:mrow>
		    </m:msub></m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msubsup>
		    <m:mi>W</m:mi>
		    <m:mrow>
		      <m:mi>i</m:mi>
		      <m:mo>-</m:mo>
		      <m:mn>1</m:mn>
		    </m:mrow>
		    <m:mi>r</m:mi>
		  </m:msubsup></m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
	Substituting the in <cnxn target="eqn2" strength="5"/> gives

	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:times/>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msub>
		    <m:mi>W</m:mi>
		    <m:mi>i</m:mi>
		  </m:msub></m:ci>
	      </m:apply>
	      <m:apply>
		<m:minus/>
		<m:cn>1</m:cn>
		<m:ci><m:msub>
		    <m:mi>σ</m:mi>
		    <m:mi>i</m:mi>
		  </m:msub></m:ci>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:plus/>
	      <m:apply>
		<m:minus/>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>W</m:mi>
			<m:mrow>
			  <m:mi>i</m:mi>
			  <m:mo>-</m:mo>
			  <m:mn>1</m:mn>
			</m:mrow>
		    </m:msub></m:ci>
		  </m:apply>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mrow>
			  <m:mi>i</m:mi>
			  <m:mo>-</m:mo>
			  <m:mn>2</m:mn>
			</m:mrow>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msubsup>
		      <m:mi>W</m:mi>
		      <m:mrow>
			<m:mi>i</m:mi>
			<m:mo>-</m:mo>
			<m:mn>1</m:mn>
		      </m:mrow>
		      <m:mi>r</m:mi>
		    </m:msubsup></m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msubsup>
		    <m:mi>W</m:mi>
		    <m:mi>i</m:mi>
		    <m:mi>r</m:mi>
		  </m:msubsup></m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>

	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:mean/>
	      <m:ci><m:msub>
		  <m:mi>W</m:mi>
		  <m:mi>i</m:mi>
		</m:msub></m:ci>
	    </m:apply>
	    <m:apply>
	      <m:divide/>
	      <m:apply>
		<m:minus/>
		<m:apply>
		  <m:plus/>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:mean/>
		      <m:ci><m:msub>
			  <m:mi>W</m:mi>
			  <m:mrow>
			    <m:mi>i</m:mi>
			    <m:mo>-</m:mo>
			    <m:mn>1</m:mn>
			  </m:mrow>
			</m:msub></m:ci>
		    </m:apply>
		    <m:apply>
		      <m:minus/>
		      <m:cn>1</m:cn>
		      <m:ci><m:msub>
			  <m:mi>σ</m:mi>
			  <m:mrow>
			    <m:mi>i</m:mi>
			    <m:mo>-</m:mo>
			    <m:mn>2</m:mn>
			  </m:mrow>
			</m:msub></m:ci>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msubsup>
			<m:mi>W</m:mi>
			<m:mi>i</m:mi>
			<m:mi>r</m:mi>
		      </m:msubsup></m:ci>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msubsup>
		      <m:mi>W</m:mi>
		      <m:mrow>
			<m:mi>i</m:mi>
			<m:mo>-</m:mo>
			<m:mn>1</m:mn>
		      </m:mrow>
		      <m:mi>r</m:mi>
		    </m:msubsup></m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:minus/>
		<m:cn>1</m:cn>
		<m:ci><m:msub>
		    <m:mi>σ</m:mi>
		    <m:mi>i</m:mi>
		  </m:msub></m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
	Now we need to consider the effects of what happens when a job
	first arrives.
      </para>

      <section id="none">
	<name>No Preemption</name>
	<para id="nop1">
	  If an arrival never preempts a job in service, the time that
	  a class <m:math><m:ci>i</m:ci></m:math> job expects to wait
	  on the job in service must be the same as the time that a
	  class 
	  <m:math>
	    <m:apply>
	      <m:minus/>
	      <m:ci>i</m:ci>
	      <m:cn>1</m:cn>
	    </m:apply>
	  </m:math>
	  job expects to wait:
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msubsup>
		    <m:mi>W</m:mi>
		    <m:mi>i</m:mi>
		    <m:mi>r</m:mi>
		  </m:msubsup></m:ci>
	      </m:apply>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msubsup>
		    <m:mi>W</m:mi>
		    <m:mrow>
		      <m:mi>i</m:mi>
		      <m:mo>-</m:mo>
		      <m:mn>1</m:mn>
		    </m:mrow>
		    <m:mi>r</m:mi>
		  </m:msubsup></m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math>.  Hence,

	  <equation id="eqn3">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>W</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		</m:apply>
		<m:apply>
		  <m:divide/>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:mean/>
		      <m:ci><m:msub>
			  <m:mi>W</m:mi>
			  <m:mrow>
			    <m:mi>i</m:mi>
			    <m:mo>-</m:mo>
			    <m:mn>1</m:mn>
			  </m:mrow>
			</m:msub></m:ci>
		    </m:apply>
		    <m:apply>
		      <m:minus/>
		      <m:cn>1</m:cn>
		      <m:ci><m:msub>
			  <m:mi>σ</m:mi>
			  <m:mrow>
			    <m:mi>i</m:mi>
			    <m:mo>-</m:mo>
			    <m:mn>2</m:mn>
			  </m:mrow>
			</m:msub></m:ci>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </equation>
	  for all 
	  <m:math>
	    <m:apply>
	      <m:geq/>
	      <m:ci>i</m:ci>
	      <m:cn>2</m:cn>
	    </m:apply>
	  </m:math>.  For
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:ci>i</m:ci>
	      <m:cn>1</m:cn>
	    </m:apply>
	  </m:math>,

	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msub>
		    <m:mi>W</m:mi>
		    <m:mn>1</m:mn>
		  </m:msub></m:ci>
	      </m:apply>
	      <m:apply>
		<m:plus/>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msubsup>
		      <m:mi>W</m:mi>
		      <m:mn>1</m:mn>
		      <m:mi>r</m:mi>
		    </m:msubsup></m:ci>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>N</m:mi>
			<m:mn>1</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>X</m:mi>
			<m:mn>1</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>

	      <m:apply>
		<m:plus/>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msubsup>
		      <m:mi>W</m:mi>
		      <m:mn>1</m:mn>
		      <m:mi>r</m:mi>
		    </m:msubsup></m:ci>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:ci><m:msub>
		      <m:mi>λ</m:mi>
		      <m:mn>1</m:mn>
		    </m:msub></m:ci>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>W</m:mi>
			<m:mn>1</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>X</m:mi>
			<m:mn>1</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>

	      <m:apply>
		<m:plus/>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msubsup>
		      <m:mi>W</m:mi>
		      <m:mn>1</m:mn>
		      <m:mi>r</m:mi>
		    </m:msubsup></m:ci>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:ci><m:msub>
		      <m:mi>ρ</m:mi>
		      <m:mn>1</m:mn>
		    </m:msub></m:ci>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>X</m:mi>
			<m:mn>1</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>

	      <m:apply>
		<m:divide/>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msubsup>
		      <m:mi>W</m:mi>
		      <m:mn>1</m:mn>
		      <m:mi>r</m:mi>
		    </m:msubsup></m:ci>
		</m:apply>
		<m:apply>
		  <m:minus/>
		  <m:cn>1</m:cn>
		  <m:ci><m:msub>
		      <m:mi>ρ</m:mi>
		      <m:mn>1</m:mn>
		    </m:msub></m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	  With this as a starting point, we can solve the recurrence
	  (<cnxn target="eqn3" strength="5"/>).

	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msub>
		    <m:mi>W</m:mi>
		    <m:mn>2</m:mn>
		  </m:msub></m:ci>
	      </m:apply>
	      <m:apply>
		<m:divide/>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>W</m:mi>
			<m:mn>1</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mn>0</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:minus/>
		  <m:cn>1</m:cn>
		  <m:ci><m:msub>
		      <m:mi>σ</m:mi>
		      <m:mn>2</m:mn>
		    </m:msub></m:ci>
		</m:apply>
	      </m:apply>

	      <m:apply>
		<m:divide/>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msubsup>
		      <m:mi>W</m:mi>
		      <m:mn>1</m:mn>
		      <m:mi>r</m:mi>
		    </m:msubsup></m:ci>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mn>2</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mn>1</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>

	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msub>
		    <m:mi>W</m:mi>
		    <m:mn>3</m:mn>
		  </m:msub></m:ci>
	      </m:apply>
	      <m:apply>
		<m:divide/>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>W</m:mi>
			<m:mn>1</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mn>1</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mn>3</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mn>2</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mn>1</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>

	      <m:apply>
		<m:divide/>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msubsup>
		      <m:mi>W</m:mi>
		      <m:mn>1</m:mn>
		      <m:mi>r</m:mi>
		    </m:msubsup></m:ci>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mn>3</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mn>2</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	  and in general

	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msub>
		    <m:mi>W</m:mi>
		    <m:mi>i</m:mi>
		  </m:msub></m:ci>
	      </m:apply>

	      <m:apply>
		<m:divide/>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msubsup>
		      <m:mi>W</m:mi>
		      <m:mn>1</m:mn>
		      <m:mi>r</m:mi>
		    </m:msubsup></m:ci>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mrow>
			  <m:mi>i</m:mi>
			  <m:mo>-</m:mo>
			  <m:mn>1</m:mn>
			</m:mrow>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>

	  The expected time an arrival waits on a class
	  <m:math><m:ci>i</m:ci></m:math> job in service at the time
	  of arrival is the probability of a job seeing a class
	  <m:math><m:ci>i</m:ci></m:math> job in service at its
	  arrival times the expected residual service time for a class
	  <m:math><m:ci>i</m:ci></m:math> job.  Therefore,

	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msubsup>
		    <m:mi>W</m:mi>
		    <m:mn>1</m:mn>
		    <m:mi>r</m:mi>
		  </m:msubsup></m:ci>
	      </m:apply>

	      <m:apply>
		<m:sum/>
		<m:bvar><m:ci>i</m:ci></m:bvar>
		<m:lowlimit><m:cn>1</m:cn></m:lowlimit>
		<m:uplimit><m:ci>M</m:ci></m:uplimit>
		<m:apply>
		  <m:times/>
		  <m:ci><m:msub>
		      <m:mi>ρ</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>R</m:mi>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>

	      <m:apply>
		<m:sum/>
		<m:bvar><m:ci>i</m:ci></m:bvar>
		<m:lowlimit><m:cn>1</m:cn></m:lowlimit>
		<m:uplimit><m:ci>M</m:ci></m:uplimit>
		<m:apply>
		  <m:times/>
		  <m:ci><m:msub>
		      <m:mi>λ</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>X</m:mi>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:mean/>
		      <m:apply>
			<m:power/>
			<m:ci><m:msub>
			    <m:mi>X</m:mi>
			    <m:mi>i</m:mi>
			  </m:msub></m:ci>
			<m:cn>2</m:cn>
		      </m:apply>
		    </m:apply>
		    <m:apply>
		      <m:times/>
		      <m:cn>2</m:cn>
		      <m:apply>
			<m:mean/>
			<m:ci><m:msub>
			    <m:mi>X</m:mi>
			    <m:mi>i</m:mi>
			  </m:msub></m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>

	      <m:apply>
		<m:sum/>
		<m:bvar><m:ci>i</m:ci></m:bvar>
		<m:lowlimit><m:cn>1</m:cn></m:lowlimit>
		<m:uplimit><m:ci>M</m:ci></m:uplimit>
		<m:apply>
		  <m:divide/>
		  <m:apply>
		    <m:times/>
		    <m:ci><m:msub>
			<m:mi>λ</m:mi>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		    <m:apply>
		      <m:mean/>
		      <m:apply>
			<m:power/>
			<m:ci><m:msub>
			    <m:mi>X</m:mi>
			    <m:mi>i</m:mi>
			  </m:msub></m:ci>
			<m:cn>2</m:cn>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		  <m:cn>2</m:cn>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	  where <m:math><m:ci>M</m:ci></m:math> is the number of
	  classes.  Then

	  <equation id="eqn4">
	    <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msub>
		    <m:mi>W</m:mi>
		    <m:mi>i</m:mi>
		  </m:msub></m:ci>
	      </m:apply>

	      <m:apply>
		<m:divide/>
		  <m:apply>
		    <m:sum/>
		    <m:bvar><m:ci>j</m:ci></m:bvar>
		    <m:lowlimit><m:cn>1</m:cn></m:lowlimit>
		    <m:uplimit><m:ci>M</m:ci></m:uplimit>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:times/>
			<m:ci><m:msub>
			    <m:mi>λ</m:mi>
			    <m:mi>j</m:mi>
			  </m:msub></m:ci>
			<m:apply>
			  <m:mean/>
			  <m:apply>
			    <m:power/>
			    <m:ci><m:msub>
				<m:mi>X</m:mi>
				<m:mi>j</m:mi>
			      </m:msub></m:ci>
			    <m:cn>2</m:cn>
			  </m:apply>
			</m:apply>
		      </m:apply>
		      <m:cn>2</m:cn>
		    </m:apply>
		  </m:apply>

		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:minus/>
		      <m:cn>1</m:cn>
		      <m:ci><m:msub>
			  <m:mi>σ</m:mi>
			  <m:mi>i</m:mi>
			</m:msub></m:ci>
		    </m:apply>
		    <m:apply>
		      <m:minus/>
		      <m:cn>1</m:cn>
		      <m:ci><m:msub>
			  <m:mi>σ</m:mi>
			  <m:mrow>
			    <m:mi>i</m:mi>
			    <m:mo>-</m:mo>
			    <m:mn>1</m:mn>
			  </m:mrow>
			</m:msub></m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </equation>

	  <equation id="eqn5">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>T</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		</m:apply>
		
		<m:apply>
		  <m:plus/>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:sum/>
		      <m:bvar><m:ci>j</m:ci></m:bvar>
		      <m:lowlimit><m:cn>1</m:cn></m:lowlimit>
		      <m:uplimit><m:ci>M</m:ci></m:uplimit>
		      <m:apply>
			<m:divide/>
			<m:apply>
			  <m:times/>
			  <m:ci><m:msub>
			      <m:mi>λ</m:mi>
			      <m:mi>j</m:mi>
			    </m:msub></m:ci>
			  <m:apply>
			    <m:mean/>
			    <m:apply>
			      <m:power/>
			      <m:ci><m:msub>
				  <m:mi>X</m:mi>
				  <m:mi>j</m:mi>
				</m:msub></m:ci>
			      <m:cn>2</m:cn>
			    </m:apply>
			  </m:apply>
			</m:apply>
			<m:cn>2</m:cn>
		      </m:apply>
		    </m:apply>
		    
		    <m:apply>
		      <m:times/>
		      <m:apply>
			<m:minus/>
			<m:cn>1</m:cn>
			<m:ci><m:msub>
			    <m:mi>σ</m:mi>
			    <m:mi>i</m:mi>
			  </m:msub></m:ci>
		      </m:apply>
		      <m:apply>
			<m:minus/>
			<m:cn>1</m:cn>
			<m:ci><m:msub>
			    <m:mi>σ</m:mi>
			    <m:mrow>
			      <m:mi>i</m:mi>
			      <m:mo>-</m:mo>
			      <m:mn>1</m:mn>
			    </m:mrow>
			  </m:msub></m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>X</m:mi>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </equation>
	</para>
      </section>

      <section id="preempt">
	<name>Preemption</name>
	<para id="prep1">
	  Let
	  <m:math>
	    <m:ci><m:msub>
		<m:mi>C</m:mi>
		<m:mi>i</m:mi>
	      </m:msub></m:ci>
	  </m:math>
	  be the random variable for the time it takes a class
	  <m:math><m:ci>i</m:ci></m:math> job to complete service
	  (that is, the time between starting service and finishing,
	  including the time that the job is preempted).  Then during
	  an average service completion interval for a class
	  <m:math><m:ci>i</m:ci></m:math> job,
	  <m:math>
	    <m:apply>
	      <m:times/>
	      <m:ci><m:msub>
		  <m:mi>λ</m:mi>
		  <m:mi>j</m:mi>
		</m:msub></m:ci>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msub>
		    <m:mi>C</m:mi>
		    <m:mi>i</m:mi>
		  </m:msub></m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math> class <m:math><m:ci>j</m:ci></m:math> jobs arrive,
	  and hence

	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msub>
		    <m:mi>C</m:mi>
		    <m:mi>i</m:mi>
		  </m:msub></m:ci>
	      </m:apply>
	      <m:apply>
		<m:plus/>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>X</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		</m:apply>
		<m:apply>
		  <m:sum/>
		  <m:bvar><m:ci>j</m:ci></m:bvar>
		  <m:lowlimit><m:cn>1</m:cn></m:lowlimit>
		  <m:uplimit>
		    <m:apply>
		      <m:minus/>
		      <m:ci>i</m:ci>
		      <m:cn>1</m:cn>
		    </m:apply>
		  </m:uplimit>
		  <m:apply>
		    <m:times/>
		    <m:ci><m:msub>
			<m:mi>λ</m:mi>
			<m:mi>j</m:mi>
		      </m:msub></m:ci>
		    <m:apply>
		      <m:mean/>
		      <m:ci><m:msub>
			  <m:mi>C</m:mi>
			  <m:mi>i</m:mi>
			</m:msub></m:ci>
		    </m:apply>
		    <m:apply>
		      <m:mean/>
		      <m:ci><m:msub>
			  <m:mi>X</m:mi>
			  <m:mi>j</m:mi>
			</m:msub></m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:plus/>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>X</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:ci><m:msub>
		      <m:mi>σ</m:mi>
		      <m:mrow>
			<m:mi>j</m:mi>
			<m:mo>-</m:mo>
			<m:mn>1</m:mn>
		      </m:mrow>
		    </m:msub></m:ci>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>C</m:mi>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>

	  <m:math display="block">
	    <m:ci>⇒</m:ci>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msub>
		    <m:mi>C</m:mi>
		    <m:mi>i</m:mi>
		  </m:msub></m:ci>
	      </m:apply>
	      <m:apply>
		<m:divide/>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>X</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		</m:apply>
		<m:apply>
		  <m:minus/>
		  <m:cn>1</m:cn>
		  <m:ci><m:msub>
		      <m:mi>σ</m:mi>
		      <m:mrow>
			<m:mi>i</m:mi>
			<m:mo>-</m:mo>
			<m:mn>1</m:mn>
		      </m:mrow>
		    </m:msub></m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	  The probability that a class <m:math><m:ci>j</m:ci></m:math>
	  job service is in progress (either a class
	  <m:math><m:ci>j</m:ci></m:math> job is in service or is
	  preempted) is just the fraction of time such a job is in the
	  system, or 
	  <m:math>
	    <m:apply>
	      <m:times/>
	      <m:ci><m:msub>
		  <m:mi>λ</m:mi>
		  <m:mi>j</m:mi>
		</m:msub></m:ci>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msub>
		    <m:mi>C</m:mi>
		    <m:mi>j</m:mi>
		  </m:msub></m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math>, since only one class
	  <m:math><m:ci>j</m:ci></m:math> job can be in service or
	  preempted at a time.  Therefore,

	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#probability"/>
		<m:mtext>class j service in progress at an arrival</m:mtext>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:ci><m:msub>
		    <m:mi>λ</m:mi>
		    <m:mi>j</m:mi>
		  </m:msub></m:ci>
		<m:apply>
		  <m:divide/>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>X</m:mi>
			<m:mi>j</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mrow>
			  <m:mi>j</m:mi>
			  <m:mo>-</m:mo>
			  <m:mn>1</m:mn>
			</m:mrow>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:divide/>
		<m:ci><m:msub>
		    <m:mi>ρ</m:mi>
		    <m:mi>j</m:mi>
		  </m:msub></m:ci>
		<m:apply>
		  <m:minus/>
		  <m:cn>1</m:cn>
		  <m:ci><m:msub>
		      <m:mi>σ</m:mi>
		      <m:mrow>
			<m:mi>j</m:mi>
			<m:mo>-</m:mo>
			<m:mn>1</m:mn>
		      </m:mrow>
		    </m:msub></m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	  and

	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msubsup>
		    <m:mi>W</m:mi>
		    <m:mi>i</m:mi>
		    <m:mi>r</m:mi>
		  </m:msubsup></m:ci>
	      </m:apply>

	      <m:apply>
		<m:sum/>
		<m:bvar><m:ci>j</m:ci></m:bvar>
		<m:lowlimit><m:cn>1</m:cn></m:lowlimit>
		<m:uplimit><m:ci>i</m:ci></m:uplimit>
		<m:apply>
		  <m:divide/>
		  <m:apply>
		    <m:times/>
		    <m:ci><m:msub>
			<m:mi>ρ</m:mi>
			<m:mi>j</m:mi>
		      </m:msub></m:ci>
		    <m:apply>
		      <m:mean/>
		      <m:ci><m:msub>
			  <m:mi>R</m:mi>
			  <m:mi>j</m:mi>
			</m:msub></m:ci>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mrow>
			  <m:mi>j</m:mi>
			  <m:mo>-</m:mo>
			  <m:mn>1</m:mn>
			</m:mrow>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	  From this we see that 

	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:minus/>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msubsup>
		      <m:mi>W</m:mi>
		      <m:mi>i</m:mi>
		      <m:mi>r</m:mi>
		    </m:msubsup></m:ci>
		</m:apply>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msubsup>
		      <m:mi>W</m:mi>
		      <m:mrow>
			<m:mi>i</m:mi>
			<m:mo>-</m:mo>
			<m:mn>1</m:mn>
		      </m:mrow>
		      <m:mi>r</m:mi>
		    </m:msubsup></m:ci>
		</m:apply>
	      </m:apply>

	      <m:apply>
		<m:divide/>
		<m:apply>
		  <m:times/>
		  <m:ci><m:msub>
		      <m:mi>ρ</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>R</m:mi>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:minus/>
		  <m:cn>1</m:cn>
		  <m:ci><m:msub>
		      <m:mi>σ</m:mi>
		      <m:mrow>
			<m:mi>i</m:mi>
			<m:mo>-</m:mo>
			<m:mn>1</m:mn>
		      </m:mrow>
		    </m:msub></m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	  Substituting this into the previous expression for 
	  <m:math>
	    <m:apply>
	      <m:mean/>
	      <m:ci><m:msub>
		  <m:mi>W</m:mi>
		  <m:mi>i</m:mi>
		</m:msub></m:ci>
	    </m:apply>
	  </m:math>
	  leads to the following simple recurrence equation:

	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msub>
		    <m:mi>W</m:mi>
		    <m:mi>i</m:mi>
		  </m:msub></m:ci>
	      </m:apply>
	      <m:apply>
		<m:divide/>
		<m:apply>
		  <m:plus/>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:minus/>
		      <m:cn>1</m:cn>
		      <m:ci><m:msub>
			  <m:mi>σ</m:mi>
			  <m:mrow>
			    <m:mi>i</m:mi>
			    <m:mo>-</m:mo>
			    <m:mn>2</m:mn>
			  </m:mrow>
			</m:msub></m:ci>
		    </m:apply>
		    <m:apply>
		      <m:mean/>
		      <m:ci><m:msub>
			  <m:mi>W</m:mi>
			  <m:mrow>
			    <m:mi>i</m:mi>
			    <m:mo>-</m:mo>
			    <m:mn>1</m:mn>
			  </m:mrow>
			</m:msub></m:ci>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:times/>
		      <m:ci><m:msub>
			  <m:mi>ρ</m:mi>
			  <m:mi>i</m:mi>
			</m:msub></m:ci>
		      <m:apply>
			<m:mean/>
			<m:ci><m:msub>
			    <m:mi>R</m:mi>
			    <m:mi>i</m:mi>
			  </m:msub></m:ci>
		      </m:apply>
		    </m:apply>
		    <m:apply>
		      <m:minus/>
		      <m:cn>1</m:cn>
		      <m:ci><m:msub>
			  <m:mi>σ</m:mi>
			  <m:mrow>
			    <m:mi>i</m:mi>
			    <m:mo>-</m:mo>
			    <m:mn>1</m:mn>
			  </m:mrow>
			</m:msub></m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:minus/>
		  <m:cn>1</m:cn>
		  <m:ci><m:msub>
		      <m:mi>σ</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		</m:apply>
	      </m:apply>

	      <m:apply>
		<m:divide/>
		<m:apply>
		  <m:plus/>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:minus/>
		      <m:cn>1</m:cn>
		      <m:ci><m:msub>
			  <m:mi>σ</m:mi>
			  <m:mrow>
			    <m:mi>i</m:mi>
			    <m:mo>-</m:mo>
			    <m:mn>1</m:mn>
			  </m:mrow>
			</m:msub></m:ci>
		    </m:apply>
		    <m:apply>
		      <m:minus/>
		      <m:cn>1</m:cn>
		      <m:ci><m:msub>
			  <m:mi>σ</m:mi>
			  <m:mrow>
			    <m:mi>i</m:mi>
			    <m:mo>-</m:mo>
			    <m:mn>2</m:mn>
			  </m:mrow>
			</m:msub></m:ci>
		    </m:apply>
		    <m:apply>
		      <m:mean/>
		      <m:ci><m:msub>
			  <m:mi>W</m:mi>
			  <m:mrow>
			    <m:mi>i</m:mi>
			    <m:mo>-</m:mo>
			    <m:mn>1</m:mn>
			  </m:mrow>
			</m:msub></m:ci>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:times/>
		      <m:ci><m:msub>
			<m:mi>ρ</m:mi>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		    <m:apply>
		      <m:mean/>
		      <m:ci><m:msub>
			  <m:mi>R</m:mi>
			  <m:mi>i</m:mi>
			</m:msub></m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mrow>
			  <m:mi>i</m:mi>
			  <m:mo>-</m:mo>
			  <m:mn>1</m:mn>
			</m:mrow>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>

	  Solving the recurrence:

	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msub>
		    <m:mi>W</m:mi>
		    <m:mn>1</m:mn>
		  </m:msub></m:ci>
	      </m:apply>
	      <m:apply>
		<m:plus/>
		<m:apply>
		  <m:times/>
		  <m:ci><m:msub>
		      <m:mi>ρ</m:mi>
		      <m:mn>1</m:mn>
		    </m:msub></m:ci>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>R</m:mi>
			<m:mn>1</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:ci><m:msub>
		      <m:mi>λ</m:mi>
		      <m:mn>1</m:mn>
		    </m:msub></m:ci>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>W</m:mi>
			<m:mn>1</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>X</m:mi>
			<m:mn>1</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>

	      <m:apply>
		<m:divide/>
		<m:apply>
		  <m:times/>
		  <m:ci><m:msub>
		      <m:mi>ρ</m:mi>
		      <m:mn>1</m:mn>
		    </m:msub></m:ci>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>R</m:mi>
			<m:mn>1</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:minus/>
		  <m:cn>1</m:cn>
		  <m:ci><m:msub>
		      <m:mi>σ</m:mi>
		      <m:mn>1</m:mn>
		    </m:msub></m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>

	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msub>
		    <m:mi>W</m:mi>
		    <m:mn>2</m:mn>
		  </m:msub></m:ci>
	      </m:apply>

	      <m:apply>
		<m:divide/>
		<m:apply>
		  <m:plus/>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:minus/>
		      <m:cn>1</m:cn>
		      <m:ci><m:msub>
			  <m:mi>σ</m:mi>
			  <m:mn>1</m:mn>
			</m:msub></m:ci>
		    </m:apply>
		    <m:apply>
		      <m:minus/>
		      <m:cn>1</m:cn>
		      <m:ci><m:msub>
			  <m:mi>σ</m:mi>
			  <m:mn>0</m:mn>
			</m:msub></m:ci>
		    </m:apply>
		    <m:apply>
		      <m:mean/>
		      <m:ci><m:msub>
			  <m:mi>W</m:mi>
			  <m:mn>1</m:mn>
			</m:msub></m:ci>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:times/>
		      <m:ci><m:msub>
			<m:mi>ρ</m:mi>
			<m:mn>2</m:mn>
		      </m:msub></m:ci>
		    <m:apply>
		      <m:mean/>
		      <m:ci><m:msub>
			  <m:mi>R</m:mi>
			  <m:mn>2</m:mn>
			</m:msub></m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mn>2</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mn>1</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>

	      <m:apply>
		<m:divide/>
		<m:apply>
		  <m:plus/>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:minus/>
		      <m:cn>1</m:cn>
		      <m:ci><m:msub>
			  <m:mi>σ</m:mi>
			  <m:mn>1</m:mn>
			</m:msub></m:ci>
		    </m:apply>
		    <m:cn>1</m:cn>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:times/>
			<m:ci><m:msub>
			    <m:mi>ρ</m:mi>
			    <m:mn>1</m:mn>
			  </m:msub></m:ci>
			<m:apply>
			  <m:mean/>
			  <m:ci><m:msub>
			      <m:mi>R</m:mi>
			      <m:mn>1</m:mn>
			    </m:msub></m:ci>
			</m:apply>
		      </m:apply>
		      <m:apply>
			<m:minus/>
			<m:cn>1</m:cn>
			<m:ci><m:msub>
			    <m:mi>σ</m:mi>
			    <m:mn>1</m:mn>
			  </m:msub></m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:times/>
		    <m:ci><m:msub>
			<m:mi>ρ</m:mi>
			<m:mn>2</m:mn>
		      </m:msub></m:ci>
		    <m:apply>
		      <m:mean/>
		      <m:ci><m:msub>
			  <m:mi>R</m:mi>
			  <m:mn>2</m:mn>
			</m:msub></m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>

		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mn>2</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mn>1</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>

	      <m:apply>
		<m:divide/>
		<m:apply>
		  <m:plus/>
		  <m:apply>
		    <m:times/>
		    <m:ci><m:msub>
			<m:mi>ρ</m:mi>
			<m:mn>1</m:mn>
		      </m:msub></m:ci>
		    <m:apply>
		      <m:mean/>
		      <m:ci><m:msub>
			  <m:mi>R</m:mi>
			  <m:mn>1</m:mn>
			</m:msub></m:ci>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:times/>
		    <m:ci><m:msub>
			<m:mi>ρ</m:mi>
			<m:mn>2</m:mn>
		      </m:msub></m:ci>
		    <m:apply>
		      <m:mean/>
		      <m:ci><m:msub>
			  <m:mi>R</m:mi>
			  <m:mn>2</m:mn>
			</m:msub></m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mn>2</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mn>1</m:mn>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	  and in general,

	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msub>
		    <m:mi>W</m:mi>
		    <m:mi>i</m:mi>
		  </m:msub></m:ci>
	      </m:apply>

	      <m:apply>
		<m:divide/>
		<m:apply>
		  <m:sum/>
		  <m:bvar><m:ci>j</m:ci></m:bvar>
		  <m:lowlimit><m:cn>1</m:cn></m:lowlimit>
		  <m:uplimit><m:ci>i</m:ci></m:uplimit>
		  <m:apply>
		    <m:times/>
		    <m:ci><m:msub>
			<m:mi>ρ</m:mi>
			<m:mi>j</m:mi>
		      </m:msub></m:ci>
		    <m:apply>
		      <m:mean/>
		      <m:ci><m:msub>
			  <m:mi>R</m:mi>
			  <m:mi>j</m:mi>
			</m:msub></m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mrow>
			  <m:mi>i</m:mi>
			  <m:mo>-</m:mo>
			  <m:mn>1</m:mn>
			</m:mrow>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	  which can be verified by substitution into the recurrence
	  equation.

	  <equation id="eqn6">
	    <m:math display="block">
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>W</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		</m:apply>
		<m:apply>
		  <m:divide/>
		  <m:apply>
		    <m:plus/>
		    <m:apply>
		      <m:times/>
		      <m:apply>
			<m:minus/>
			<m:cn>1</m:cn>
			<m:ci><m:msub>
			    <m:mi>σ</m:mi>
			  <m:mrow>
			      <m:mi>i</m:mi>
			      <m:mo>-</m:mo>
			      <m:mn>1</m:mn>
			    </m:mrow>
			  </m:msub></m:ci>
		      </m:apply>
		      <m:apply>
			<m:minus/>
			<m:cn>1</m:cn>
			<m:ci><m:msub>
			    <m:mi>σ</m:mi>
			  <m:mrow>
			      <m:mi>i</m:mi>
			      <m:mo>-</m:mo>
			      <m:mn>2</m:mn>
			    </m:mrow>
			  </m:msub></m:ci>
		      </m:apply>
		      <m:apply>
			<m:mean/>
			<m:ci><m:msub>
			    <m:mi>W</m:mi>
			    <m:mrow>
			      <m:mi>i</m:mi>
			      <m:mo>-</m:mo>
			      <m:mn>1</m:mn>
			    </m:mrow>
			  </m:msub></m:ci>
		      </m:apply>
		    </m:apply>
		    <m:apply>
		      <m:times/>
		      <m:ci><m:msub>
			  <m:mi>ρ</m:mi>
			  <m:mi>i</m:mi>
			</m:msub></m:ci>
		      <m:apply>
			<m:mean/>
			<m:ci><m:msub>
			    <m:mi>R</m:mi>
			    <m:mi>i</m:mi>
			  </m:msub></m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:minus/>
		      <m:cn>1</m:cn>
		      <m:ci><m:msub>
			  <m:mi>σ</m:mi>
			  <m:mi>i</m:mi>
			</m:msub></m:ci>
		    </m:apply>
		    <m:apply>
		      <m:minus/>
		      <m:cn>1</m:cn>
		      <m:ci><m:msub>
			  <m:mi>σ</m:mi>
			  <m:mrow>
			    <m:mi>i</m:mi>
			    <m:mo>-</m:mo>
			    <m:mn>1</m:mn>
			  </m:mrow>
		      </m:msub></m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
		
		<m:apply>
		  <m:divide/>
		  <m:apply>
		  <m:plus/>
		    <m:apply>
		      <m:times/>
		      <m:apply>
			<m:minus/>
			<m:cn>1</m:cn>
			<m:ci><m:msub>
			    <m:mi>σ</m:mi>
			    <m:mrow>
			      <m:mi>i</m:mi>
			      <m:mo>-</m:mo>
			      <m:mn>1</m:mn>
			    </m:mrow>
			  </m:msub></m:ci>
		      </m:apply>
		      <m:apply>
			<m:minus/>
			<m:cn>1</m:cn>
			<m:ci><m:msub>
			  <m:mi>σ</m:mi>
			    <m:mrow>
			      <m:mi>i</m:mi>
			      <m:mo>-</m:mo>
			      <m:mn>2</m:mn>
			    </m:mrow>
			  </m:msub></m:ci>
		      </m:apply>
		      <m:apply>
			<m:divide/>
			<m:apply>
			  <m:sum/>
			  <m:bvar><m:ci>j</m:ci></m:bvar>
			  <m:lowlimit><m:cn>1</m:cn></m:lowlimit>
			  <m:uplimit><m:ci>i</m:ci></m:uplimit>
			  <m:apply>
			    <m:times/>
			    <m:ci><m:msub>
				<m:mi>ρ</m:mi>
				<m:mi>j</m:mi>
			    </m:msub></m:ci>
			    <m:apply>
			    <m:mean/>
			      <m:ci><m:msub>
				  <m:mi>R</m:mi>
				  <m:mi>j</m:mi>
				</m:msub></m:ci>
			    </m:apply>
			  </m:apply>
			</m:apply>
			<m:apply>
			  <m:times/>
			  <m:apply>
			    <m:minus/>
			    <m:cn>1</m:cn>
			    <m:ci><m:msub>
				<m:mi>σ</m:mi>
				<m:mrow>
				  <m:mi>i</m:mi>
				  <m:mo>-</m:mo>
				  <m:mn>1</m:mn>
				</m:mrow>
			      </m:msub></m:ci>
			  </m:apply>
			  <m:apply>
			    <m:minus/>
			    <m:cn>1</m:cn>
			    <m:ci><m:msub>
				<m:mi>σ</m:mi>
				<m:mrow>
				  <m:mi>i</m:mi>
				  <m:mo>-</m:mo>
				  <m:mn>2</m:mn>
				</m:mrow>
			      </m:msub></m:ci>
			  </m:apply>
			</m:apply>
		      </m:apply>
		    </m:apply>
		    <m:apply>
		      <m:times/>
		      <m:ci><m:msub>
			  <m:mi>ρ</m:mi>
			  <m:mi>i</m:mi>
			</m:msub></m:ci>
		      <m:apply>
			<m:mean/>
			<m:ci><m:msub>
			    <m:mi>R</m:mi>
			    <m:mi>i</m:mi>
			  </m:msub></m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:minus/>
		      <m:cn>1</m:cn>
		      <m:ci><m:msub>
			  <m:mi>σ</m:mi>
			  <m:mi>i</m:mi>
			</m:msub></m:ci>
		    </m:apply>
		    <m:apply>
		      <m:minus/>
		      <m:cn>1</m:cn>
		      <m:ci><m:msub>
			  <m:mi>σ</m:mi>
			  <m:mrow>
			    <m:mi>i</m:mi>
			    <m:mo>-</m:mo>
			    <m:mn>1</m:mn>
			  </m:mrow>
			</m:msub></m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
		
		<m:apply>
		  <m:divide/>
		  <m:apply>
		    <m:plus/>
		    <m:apply>
		      <m:sum/>
		      <m:bvar><m:ci>j</m:ci></m:bvar>
		      <m:lowlimit><m:cn>1</m:cn></m:lowlimit>
		      <m:uplimit><m:ci>i</m:ci></m:uplimit>
		      <m:apply>
			<m:times/>
			<m:ci><m:msub>
			    <m:mi>ρ</m:mi>
			    <m:mi>j</m:mi>
			  </m:msub></m:ci>
			<m:apply>
			  <m:mean/>
			  <m:ci><m:msub>
			      <m:mi>R</m:mi>
			      <m:mi>j</m:mi>
			    </m:msub></m:ci>
			</m:apply>
		      </m:apply>
		    </m:apply>
		    <m:apply>
		      <m:times/>
		      <m:ci><m:msub>
			  <m:mi>ρ</m:mi>
			  <m:mi>i</m:mi>
			</m:msub></m:ci>
		      <m:apply>
			<m:mean/>
			<m:ci><m:msub>
			    <m:mi>R</m:mi>
			    <m:mi>i</m:mi>
			  </m:msub></m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:minus/>
		      <m:cn>1</m:cn>
		      <m:ci><m:msub>
			  <m:mi>σ</m:mi>
			  <m:mi>i</m:mi>
			</m:msub></m:ci>
		    </m:apply>
		    <m:apply>
		      <m:minus/>
		      <m:cn>1</m:cn>
		      <m:ci><m:msub>
			<m:mi>σ</m:mi>
			  <m:mrow>
			    <m:mi>i</m:mi>
			    <m:mo>-</m:mo>
			    <m:mn>1</m:mn>
			  </m:mrow>
			</m:msub></m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </equation>
	  Finally, the response time for a class
	  <m:math><m:ci>i</m:ci></m:math> job in a preemptive resume
	  system is the waiting time plus the completion (not
	  execution!) time: 
	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msub>
		    <m:mi>T</m:mi>
		    <m:mi>i</m:mi>
		  </m:msub></m:ci>
	      </m:apply>
		
	      <m:apply>
		<m:plus/>
		<m:apply>
		  <m:divide/>
		  <m:apply>
		    <m:sum/>
		    <m:bvar><m:ci>j</m:ci></m:bvar>
		    <m:lowlimit><m:cn>1</m:cn></m:lowlimit>
		    <m:uplimit><m:ci>i</m:ci></m:uplimit>
		    <m:apply>
		      <m:times/>
		      <m:ci><m:msub>
			  <m:mi>ρ</m:mi>
			  <m:mi>j</m:mi>
			</m:msub></m:ci>
		      <m:apply>
			<m:mean/>
			<m:ci><m:msub>
			    <m:mi>R</m:mi>
			    <m:mi>j</m:mi>
			  </m:msub></m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		    
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:minus/>
		      <m:cn>1</m:cn>
		      <m:ci><m:msub>
			  <m:mi>σ</m:mi>
			  <m:mi>i</m:mi>
			</m:msub></m:ci>
		    </m:apply>
		    <m:apply>
		      <m:minus/>
		      <m:cn>1</m:cn>
		      <m:ci><m:msub>
			  <m:mi>σ</m:mi>
			  <m:mrow>
			    <m:mi>i</m:mi>
			    <m:mo>-</m:mo>
			    <m:mn>1</m:mn>
			  </m:mrow>
			</m:msub></m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:divide/>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>X</m:mi>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>σ</m:mi>
			<m:mrow>
			  <m:mi>i</m:mi>
			  <m:mo>-</m:mo>
			  <m:mn>1</m:mn>
			</m:mrow>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	  We can rewrite the equations for waiting time and response
	  time in terms of the first and second principal moments of
	  the service time distribution:

	  <equation id="eqn7">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>W</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		</m:apply>

		<m:apply>
		  <m:divide/>
		  <m:apply>
		    <m:sum/>
		    <m:bvar><m:ci>j</m:ci></m:bvar>
		    <m:lowlimit><m:cn>1</m:cn></m:lowlimit>
		    <m:uplimit><m:ci>i</m:ci></m:uplimit>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:times/>
			<m:ci><m:msub>
			    <m:mi>λ</m:mi>
			    <m:mi>j</m:mi>
			  </m:msub></m:ci>
			<m:apply>
			  <m:mean/>
			  <m:apply>
			    <m:power/>
			    <m:ci><m:msub>
				<m:mi>X</m:mi>
				<m:mi>j</m:mi>
			      </m:msub></m:ci>
			    <m:cn>2</m:cn>
			  </m:apply>
			</m:apply>
		      </m:apply>
		      <m:cn>2</m:cn>
		    </m:apply>
		  </m:apply>

		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:minus/>
		      <m:cn>1</m:cn>
		      <m:ci><m:msub>
			  <m:mi>σ</m:mi>
			  <m:mi>i</m:mi>
			</m:msub></m:ci>
		    </m:apply>
		    <m:apply>
		      <m:minus/>
		      <m:cn>1</m:cn>
		      <m:ci><m:msub>
			  <m:mi>σ</m:mi>
			  <m:mrow>
			    <m:mi>i</m:mi>
			    <m:mo>-</m:mo>
			    <m:mn>1</m:mn>
			  </m:mrow>
			</m:msub></m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </equation>

	  <equation id="eqn8">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>T</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		</m:apply>
		
		<m:apply>
		  <m:plus/>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:sum/>
		      <m:bvar><m:ci>j</m:ci></m:bvar>
		      <m:lowlimit><m:cn>1</m:cn></m:lowlimit>
		      <m:uplimit><m:ci>i</m:ci></m:uplimit>
		      <m:apply>
			<m:divide/>
			<m:apply>
			  <m:times/>
			  <m:ci><m:msub>
			      <m:mi>λ</m:mi>
			      <m:mi>j</m:mi>
			    </m:msub></m:ci>
			  <m:apply>
			    <m:mean/>
			    <m:apply>
			      <m:power/>
			      <m:ci><m:msub>
				  <m:mi>X</m:mi>
				  <m:mi>j</m:mi>
				</m:msub></m:ci>
			      <m:cn>2</m:cn>
			    </m:apply>
			  </m:apply>
			</m:apply>
			<m:cn>2</m:cn>
		      </m:apply>
		    </m:apply>
		    
		    <m:apply>
		      <m:times/>
		      <m:apply>
			<m:minus/>
			<m:cn>1</m:cn>
			<m:ci><m:msub>
			    <m:mi>σ</m:mi>
			    <m:mi>i</m:mi>
			  </m:msub></m:ci>
		      </m:apply>
		      <m:apply>
			<m:minus/>
			<m:cn>1</m:cn>
			<m:ci><m:msub>
			    <m:mi>σ</m:mi>
			    <m:mrow>
			      <m:mi>i</m:mi>
			      <m:mo>-</m:mo>
			      <m:mn>1</m:mn>
			    </m:mrow>
			  </m:msub></m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:mean/>
		      <m:ci><m:msub>
			  <m:mi>X</m:mi>
			  <m:mi>i</m:mi>
			</m:msub></m:ci>
		    </m:apply>
		    <m:apply>
		      <m:minus/>
		      <m:cn>1</m:cn>
		      <m:ci><m:msub>
			  <m:mi>σ</m:mi>
			  <m:mrow>
			    <m:mi>i</m:mi>
			    <m:mo>-</m:mo>
			    <m:mn>1</m:mn>
			  </m:mrow>
			</m:msub></m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </equation>

	</para>
      </section>

    </section>
  </content>
  
</document>
