Question 6 of 8: Non-Preemptive Priority Queue: Hand Simulation
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer) · Last updated
Notes on this paper
Common Discrete/Continuous Distribution tables, Student-t and Chi-square tables were supplied with the exam; the values below are the same table values obtained by direct computation.
Reference texts: Banks, Carson, Nelson & Nicol, Discrete-Event System Simulation (5th ed., Pearson) — random-number/random-variate generation, input data analysis, output analysis (replications), comparing alternative systems, queueing simulation, and the simulation study life cycle.
Question 6 — Non-Preemptive Priority Queue: Hand Simulation (10 marks)
Given. A single server, non-preemptive priority: whenever the server frees up, it picks the highest-priority customer currently waiting (FCFS within a priority class). Five arriving customers:
Customer
Priority
Interarrival
Arrival
Service Time
1
High
—
0
0.7
2
Low
0.3
—
1.0
3
Low
0.5
—
0.8
4
High
0.3
—
1.0
5
Low
1.2
—
0.5
Find. (a) the completed Start/End-Service table; (b) mean waiting time for the two High-priority customers; (c) time-average queue length (waiting only, both priorities pooled in one physical line).
Approach. Chain the interarrival times into absolute arrival times, then hand-step the single server: at each service completion, serve the highest-priority customer among those already arrived and waiting (ties broken by earliest arrival).
Customer 1 (High, arrives at 0, server idle). Starts immediately: Start$=0.0$, End$=0.0+0.7=0.7$.
Server frees at 0.7. Only Customer 2 (Low) has arrived and is waiting $\Rightarrow$ served next: Start$=0.7$, End$=0.7+1.0=1.7$.
Server frees at 1.7. Waiting: Customer 3 (Low, arrived 0.8) and Customer 4 (High, arrived 1.1). High priority pre-empts the queue order (not the customer in service) $\Rightarrow$ Customer 4 served next: Start$=1.7$, End$=1.7+1.0=2.7$.
Server frees at 2.7. Waiting: Customer 3 (Low, since 0.8) and Customer 5 (Low, arrived 2.3). Both Low $\Rightarrow$ FCFS $\Rightarrow$ Customer 3 next: Start$=2.7$, End$=2.7+0.8=3.5$.
Server frees at 3.5. Only Customer 5 remains: Start$=3.5$, End$=3.5+0.5=4.0$.
Customer
Priority
Arrival
Start Service
End Service
1
High
0.0
0.0
0.7
2
Low
0.3
0.7
1.7
3
Low
0.8
2.7
3.5
4
High
1.1
1.7
2.7
5
Low
2.3
3.5
4.0
(b) Average waiting time, High-priority. Customer 1 waits $0.0-0.0=0$; Customer 4 waits $1.7-1.1=0.6$.
$$\overline{W}_{High} = \frac{0+0.6}{2} = \boxed{0.3}.$$
(c) Average queue length (both priorities, single physical line, waiting only). Tracking the number of customers waiting (excludes whoever is currently in service) against the clock over the whole $[0,4.0]$ run and time-weighting:
Check: "average queue length" is computed as the time-weighted number WAITING (excluding whoever is in service), the standard $L_q$ definition; the number IN SYSTEM ($L$, including the one in service) would instead average $1.025 + 700/4000\cdot1 \approx$ a higher figure since the server is busy for the full run — $L_q$ is used here since the question asks specifically about the shared "queue".