JohnnyHunter
JohnnyHunter

Reputation: 388

Priority Queues in discrete event simulation and modelling

I have been asked to write a program in Java for a single server system, where the rate of arrival is continuously distributed. I have been asked to do this using priority queues. But I don't understand the need for it. Won't a normal FCFS queue suffice. How do I go about this?

Upvotes: 1

Views: 1046

Answers (1)

Ross Bencina
Ross Bencina

Reputation: 4193

In a discrete event simulation the events usually need to be processed in timestamp order (virtual time order), not in arrival order. The priority queue is used to keep the events in timestamp order.

Upvotes: 2

Related Questions