Samavia Fayyaz
Samavia Fayyaz
DEPARTMENT OF TELECOMMUNICATION
QUEUEING THEORY (TL431)
Lab 11: Analyse Open and Closed Queuing Networks using OMNeT++
Student ID Subject Knowledge Data Analysis and Interpretation Ability to Conduct Experiment
19TL101
1/4
MEHRAN UNIVERSITY OF ENGINEERING & TECHNOLOGY, JAMSHORO
DEPARTMENT OF TELECOMMUNICATION
QUEUEING THEORY (TL431)
Lab 11: Analyse Open and Closed Queuing Networks using OMNeT++
3.1 Task 3 One Faster versus Many Slower
1. Does the “improvement” affect the average response You are given a choice between one fast CPU of speed s,
time in the system? i.e., you replace server 1 with or n slow CPUs each of speed s/n (see Fig. 3). Your goal
a server that is twice as fast. is to minimize mean response time. To start, assume
that jobs are non-preemptible (i.e., each job must be run
2. Does this “improvement” affect the utilization of
to completion).
servers in the system? Does this answer change with
the variation in N ?
µ =1
3. Does it affect the throughput?
4. Suppose the system uses a lower value of N . Does µ =1
versus µ =4
the answer change?
µ =1
2/4
MEHRAN UNIVERSITY OF ENGINEERING & TECHNOLOGY, JAMSHORO
DEPARTMENT OF TELECOMMUNICATION
QUEUEING THEORY (TL431)
Lab 11: Analyse Open and Closed Queuing Networks using OMNeT++
@display("p=350,150"); Random Each job flips a fair coin to determine where
}
connections:
it is routed.
source.out --> passiveQueue.in++;
passiveQueue.out++ --> server1.in++;
Round-Robin The ith job goes to host i mod n, where
passiveQueue.out++ --> server2.in++; n is the number of hosts, and hosts are numbered
passiveQueue.out++ --> server3.in++;
passiveQueue.out++ --> server4.in++;
0, 1, · · · , n − 1.
server1.out --> sink.in++; Shortest-Queue Each job goes to the host with the
server2.out --> sink.in++;
server3.out --> sink.in++; fewest number of jobs.
server4.out --> sink.in++;
}
3.1 Task
1. Which of these task assignment policies yields the
3.3 Configuration File lowest mean response time?
2. Which system do you prefer when load is low and/or
[General]
network = manyslow high?
sim-time-limit = 0.5h
**.interArrivalTime = exponential(1s)
**.sendingAlgorithm = "roundRobin" To simulate this scenario, use queueinglib of om-
**.fetchingAlgorithm = "priority" netpp. As a startup hint, you can use following .ned
**.server1.serviceTime = 1s
**.server2.serviceTime = 1s and .ini file.
**.server3.serviceTime = 1s
**.server4.serviceTime = 1s
3.1 NED file
import org.omnetpp.queueing.Source;
import org.omnetpp.queueing.PassiveQueue;
4 Task Assignment import org.omnetpp.queueing.Server;
import org.omnetpp.queueing.Queue;
import org.omnetpp.queueing.Sink;
Consider a server farm with a central dispatcher and sev-
eral hosts. Each arriving job is immediately dispatched network taskassignment
{
to one of the hosts for processing. Figure 4 illustrates @display("bgb=550,350");
such a system. submodules:
source: Source {
Server farms like this are found everywhere. Web @display("p=50,150");
server farms typically deploy a front-end dispatcher like }
passiveQueue: PassiveQueue {
Cisco’s Local Director or IBM’s Network Dispatcher. @display("p=150,150");
Super-computing sites might use LoadLeveler or some }
server1: Server {
other dispatcher to balance load and assign jobs to hosts. @display("p=250,70");
For the moment, let’s assume that all the hosts are }
server2: Server {
identical (homogeneous) and that all jobs only use a @display("p=250,140");
single resource. Let’s also assume that once jobs are }
server3: Server {
assigned to a host, they are processed there in FCFS @display("p=250,210");
order and are non-preemptible. }
server4: Server {
@display("p=250,280");
Host 1 }
queue1: Queue {
@display("p=350,70");
}
Host 2 queue2: Queue {
@display("p=350,140");
Dispatcher }
Arrivals
(Load Balancer) queue3: Queue {
@display("p=350,210");
Host 3 }
queue4: Queue {
@display("p=350,280");
}
sink: Sink {
@display("p=450,150");
Figure 4: A Distributed Server System With Central }
Dispatcher connections:
source.out --> passiveQueue.in++;
passiveQueue.out++ --> server1.in++;
passiveQueue.out++ --> server2.in++;
There are many possible task assignment policies that passiveQueue.out++ --> server3.in++;
can be used for dispatching jobs to hosts. Here are a few: passiveQueue.out++ --> server4.in++;
3/4
MEHRAN UNIVERSITY OF ENGINEERING & TECHNOLOGY, JAMSHORO
DEPARTMENT OF TELECOMMUNICATION
QUEUEING THEORY (TL431)
Lab 11: Analyse Open and Closed Queuing Networks using OMNeT++
server1.out --> queue1.in++; import org.omnetpp.queueing.Queue;
server2.out --> queue2.in++; import org.omnetpp.queueing.Sink;
server3.out --> queue3.in++;
server4.out --> queue4.in++; network TandemQueue
queue1.out --> sink.in++; {
queue2.out --> sink.in++; parameters:
queue3.out --> sink.in++; @display("i=block/network");
queue4.out --> sink.in++; submodules:
} source: Source {
@display("p=32.0,74.0");
}
queue: Queue {
@display("p=127.0,74.0");
3.1 Configuration File }
queue1: Queue {
[General] @display("p=227.0,74.0");
network = taskassignment }
sim-time-limit = 0.5h queue2: Queue {
**.numJobs = 500 @display("p=328.0,74.0");
**.interArrivalTime = exponential(1s) }
**.sendingAlgorithm = "roundRobin" sink: Sink {
**.server*.serviceTime = 0s @display("p=430.0,74.0");
**.queue1.serviceTime = exponential(10s) }
**.queue2.serviceTime = exponential(10s) connections:
**.queue3.serviceTime = exponential(10s) source.out --> queue.in++;
**.queue4.serviceTime = exponential(10s) queue.out --> queue1.in++;
queue1.out --> queue2.in++;
queue2.out --> sink.in++;
}
4/4
MEHRAN UNIVERSITY OF ENGINEERING & TECHNOLOGY, JAMSHORO
DEPARTMENT OF TELECOMMUNICATION
QUEUEING THEORY (TL431)
Lab 11: Analyse Open and Closed Queuing Networks using OMNeT++
Exercise [Q.01 & Q.02]
Task: [Closed System]
Assume that the routing probabilities remain constant
at 1/2 and 1/2. You replace server 1 with a server that is
twice as fast (the new server services jobs at an average
rate of 2 jobs every 3 seconds).
1. Does this “improvement” affect the average re-
sponse time in the system?
Not really. The average response time is hardly affected.
5/4
MEHRAN UNIVERSITY OF ENGINEERING & TECHNOLOGY, JAMSHORO
DEPARTMENT OF TELECOMMUNICATION
QUEUEING THEORY (TL431)
Lab 11: Analyse Open and Closed Queuing Networks using OMNeT++
Yes.
2. Does this “improvement” affect the utilization of
servers in the system? Does this answer change with
the variation in N ?
Yes, the improvement affects the utilization of
servers in the system. The utilization of a server is the
ratio of time the server is busy to the total time. With
the new server that is twice as fast, it can handle jobs
at a faster rate, leading to an increase in server
utilization.
6/4
MEHRAN UNIVERSITY OF ENGINEERING & TECHNOLOGY, JAMSHORO
DEPARTMENT OF TELECOMMUNICATION
QUEUEING THEORY (TL431)
Lab 11: Analyse Open and Closed Queuing Networks using OMNeT++
7/4
MEHRAN UNIVERSITY OF ENGINEERING & TECHNOLOGY, JAMSHORO
DEPARTMENT OF TELECOMMUNICATION
QUEUEING THEORY (TL431)
Lab 11: Analyse Open and Closed Queuing Networks using OMNeT++
8/4
MEHRAN UNIVERSITY OF ENGINEERING & TECHNOLOGY, JAMSHORO
DEPARTMENT OF TELECOMMUNICATION
QUEUEING THEORY (TL431)
Lab 11: Analyse Open and Closed Queuing Networks using OMNeT++
3. Suppose, the network of queues use different
service times, does it affect the performance?
Different service times in nodes can affect the
performance of the network, and load balancing across
nodes through task assignment policies can improve
performance. The bottleneck node determines the
overall performance of the network.
9/4
MEHRAN UNIVERSITY OF ENGINEERING & TECHNOLOGY, JAMSHORO
DEPARTMENT OF TELECOMMUNICATION
QUEUEING THEORY (TL431)
Lab 11: Analyse Open and Closed Queuing Networks using OMNeT++
10/
4