@MISC{Leong_snoopya, author = {Tan Kah Leong}, title = {Snoopy A New Calendar Queue Structure}, year = {} }
Bookmark
OpenURL
Abstract
Discrete event simulations need a priority queue to schedule events according to their timestamp. Up to 40% of the time may be spent on the management of the pending event set. Thus the choice of a efficient data structure is vital to the performance of discrete event simulations. A conventional Calendar Queue (CQ) and Dynamic Calendar Queue (DCQ) are two data structures that promises O(1) time complexity regardless of the size of the pending event set. CQ however performs poorly over skewed event distributions or changes in the event distribution. DCQ improves on the CQ by adding a mechanism to detect the two scenarios above and redistribute events when necessary. Both of these data structures determine their operating parameter (bucket width) by sampling of events. Sampling sometimes fails to provide a good estimate for an optimum bucket width to use. This paper proposes a novel approach to determine the optimum operating parameter of a calendar queue based on its performance statistics and guarantees O(1) performance. Henceforth, we named our calendar queue adopting this mechanism, Statistically eNhanced with Optimum Operating Parameter Calendar Queue (SNOOPy CQ). Our experiment results showed that SNOOPy CQ offers a consistent O(1) performance and, in certain scenarios, executes up to 100 times faster than DCQ and CQ.