Discrete time simulation of a queue, Data Structure & Algorithms

Assignment Help:

In this project you will write a program to produce a discrete time simulation of a queue as shown in Fig. 1. Time is slotted on the input and the output. Each input packet follows a Bernoulli process. In a given time slot the independent probability that a packet arrives in a time slot is p, while the probability that the packet will be serviced is q. One packet fills one time slot.        

1775_Queue element.png

The queue can store up to four packets (not the five shown in the diagram above). All packets are processed on a first come - first served basis. Assume that when a packet is serviced all other packets in a queue (if any) are shifted instantaneously towards the output. Each slot departures from the queue are processed before arrivals. 

In your discrete event simulation the program will mimic the operation of the queue and collect statistics. More specifically, you will need to collect (a) throughput and (b) delay statistics for different values of p (p = 0.02, 0.04 up to 1.0 in steps of 0.02), and for a fixed value of q = 0.75. To obtain an accurate statistics you should simulate at least ten thousand time slots for each value of p. Note that you ARE NOT allowed to implement the model equation in the program - but you can use them as a check.

The average throughput is just the number of serviced packets divided by the number of time slots. The average delay of the queue is an average number of time slots a packet is waiting in a queue before it gets serviced (i.e., it is the total number of time slots which all serviced packets spend in the queue divided by the total number of serviced packets). For the delay statistics, it is convenient to store your packets in a linked list and associate the time slot tag with each packet.


Related Discussions:- Discrete time simulation of a queue

Time required to delete a node x from a doubly linked list, The time needed...

The time needed to delete a node x from a doubly linked list having n nodes is O (1)

Algorithm, write an algorithm for the gpa of six students

write an algorithm for the gpa of six students

Basic organization of computer system, what happen''s in my computer when ...

what happen''s in my computer when i input any passage

A full binary tree with 2n+1 nodes, A full binary tree with 2n+1 nodes have...

A full binary tree with 2n+1 nodes have n non-leaf nodes

Pest control program, PART- Pest Control Program Prepare a Pest Contro...

PART- Pest Control Program Prepare a Pest Control Program for the facility that will address the management of Rodents, Insects and Birds. Your Pest Control Program should

Psedocodes, write a pseudocode to input the top speed (in km''s/hours) of 5...

write a pseudocode to input the top speed (in km''s/hours) of 5000 cars output the fastest speed and the slowest speed output the average (mean) speed of all the 5000 cars answers

How does an array differ from an ordinary variable, Normal 0 fa...

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

Splay trees, Addition of new records in a Binary tree structure always occu...

Addition of new records in a Binary tree structure always occurs as leaf nodes, which are further away from the root node making their access slower. If this new record is to be ac

Consistent heuristic function - graph search, Consistent Heuristic Function...

Consistent Heuristic Function - Graph Search Recall the notions of consistency and admissibility for an A* search heuristic. a. Consider a graph with four nodes S, A, B, C,

Technique for direct search, Technique for direct search is    Hashing ...

Technique for direct search is    Hashing is the used for direct search.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd