Reputation: 388
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
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