skip to main content
article

Twol-amalgamated priority queues

Published: 31 December 2004 Publication History

Abstract

Priority queues are essential function blocks in numerous applications such as discrete event simulations. This paper describes and exemplifies the ease of obtaining high performance priority queues using a two-tier list-based structure. This new implementation, called the Twol structure, is amalgamated with three priority queues, namely, the Henriksen's queue, splay tree and skew heap, to enhance the efficiency of these basal priority queue structures. Using a model that combines traditional average case and amortized complexity analysis, Twol-amalgamated priority queues that maintain N active events are theoretically proven to offer O(1) expected amortized complexity under reasonable assumptions. They are also demonstrated empirically to offer stable near O(1) performance for widely varying priority increment distributions and for queue sizes ranging from 10 to 10 million. Extensive empirical results show that the Twol-amalgamated priority queues consistently outperform those basal structures (i.e., without the Twol structure) with an average speedup of about three to five times on widely different hardware architectures. These results provide testimony that the Twol-amalgamated priority queues are suitable for implementation in sizeable application scenarios such as, but not limited to, large-scale discrete event simulation.

References

[1]
Bentley, J. 1985. Thanks, heaps. Commun. ACM 28, 3 (Mar.), 245--250.]]
[2]
Brown, R. 1988. Calendar queues: A fast O(1) priority queue implementation for the simulation event set problem. Commun. ACM 24, 12 (Dec.), 825--829.]]
[3]
Comfort, J. C. 1984. The simulation of a master-slave event set processor. Simulation 42, 3 (Mar.), 117--124.]]
[4]
Das, S., Fujimoto, R., Panesar, K., Allison, D., and Hybinette, M. 1994. GTW: A time warp system for shared memory multiprocessors. In Proceedings of the 1994 Winter Simulation Conference, 1332--1339.]]
[5]
Erickson, K. B., Ladner, R. E., and LaMarca, A. 2000. Optimizing static calendar queues. ACM Trans. Model. Comput. Simul. 10, 3 (July) 179--214.]]
[6]
Fall, K. and Varadhan, K. 2002. The ns Manual. UCB/LBNL/VINT Network simulator v2. http://www.isi.edu/nsnam/ns/.]]
[7]
Gomes, F., Franks, S., Unger, B., Xiao, Z., Cleary, J., and Covington, A. 1995. SimKit: A high performance logical process simulation class library in C++. In Proceedings of the 1995 Winter Simulation Conference, 706--713.]]
[8]
Hagai, A. and Patt-Shamir, B. 2001. Multiple priority, per flow, dual GCRA rate controller for ATM switches. In IEEE Workshop on High Performance Switching and Routing, 169--174.]]
[9]
Henriksen, J. O. 1977. An improved events list algorithm. In Proceedings of the 1977 Winter Simulation Conference, 547--557.]]
[10]
Henriksen, J. O. and Crain, R. C. 1996. GPSS/H Reference Manual, 4th ed. Wolverine Software Corporation, Annandale, VA.]]
[11]
Henriksen, J. O. 1997. An introduction to SLX. In Proceedings of the 1997 Winter Simulation Conference, 559--566.]]
[12]
Jones, D. W. 1986. An empirical comparison of priority-queue and event-set implementations. Commun. ACM 29, 4 (Apr.), 300--311.]]
[13]
Jones, D. W. 1989. Concurrent operations on priority queues. Commun. ACM 32, 1 (Jan.), 132--137.]]
[14]
Kingston, J. 1986. Analysis of Henriksen's queue for the simulation event set. SIAM J. Comput. 15, 3 (Aug.), 887--902.]]
[15]
L'Ecuyer, P. and Champoux, Y. 2001. Estimating small cell-loss ratios in ATM switches via importance sampling. ACM Trans. Model. Comput. Simul. 11, 1 (Jan.), 76--105.]]
[16]
Narlikar, G. and Zane, F. 2001. Performance modeling for fast IP lookups. In Proceedings of the 2001 ACM SIGMETRICS International Conference on Measurement and Modeling of Computer Systems, 1--12.]]
[17]
Oh, S. and Ahn, J. 1998. Dynamic calendar queue. In Proceedings of the 32nd Annual Simulation Symposium, 20--25.]]
[18]
Park, S. K. and Miller, K. W. 1988. Random number generators: Good ones are hard to find. Commun. ACM 31, 10 (Oct.), 1192--1201.]]
[19]
Pritsker, A. and Pegden, C. 1979. Introduction to Simulation and SLAM, 3rd ed. Wiley, New York.]]
[20]
Rönngren, R., Riboe, J., and Ayani, R. 1993. Lazy queue: New approach to implementing the pending event set. Int. J. Comput. Simul. 3, 303--332.]]
[21]
Rönngren, R. and Ayani, R. 1997. A comparative study of parallel and sequential priority queue algorithms. ACM Trans. Model. Comput. Simul. 7, 2 (Apr.), 157--209.]]
[22]
Schwetman, H. 1996. CSIM18 User's Guide. Mesquite Software, Inc, Austin, TX.]]
[23]
Sleator, D. D. and Tarjan, R. E. 1985. Self-adjusting binary search trees. J. ACM 32, 3 (July), 652--686.]]
[24]
Sleator, D. D. and Tarjan, R. E. 1986. Self-adjusting heaps. SIAM J. Comput. 15, 1 (Feb.), 52--69.]]
[25]
Stoica, I., Zhang, H., and Ng, T. S. E. 2000. A hierarchical fair service curve algorithm for link-sharing, real-time, and priority services. IEEE/ACM Trans. Networking 8, 2 (Apr.), 185--199.]]
[26]
Tarjan, R. E. 1985. Amortized computational complexity. SIAM J. Algebraic Discrete Meth. 6, 2 (Apr.), 306--318.]]
[27]
Thng, I. L. J. and Goh, R. S. M. 2004. Swan---Simulator without a name. http://swan.nus.edu.sg/.]]
[28]
Yugo, K. I. R., Moffat, A., and Ngai, C. H. A. 2002. Enhanced word-based block-sorting text compression. In Proceedings of the 25th Australasian Conference on Computer Science, 129--137.]]

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Journal of Experimental Algorithmics
ACM Journal of Experimental Algorithmics  Volume 9, Issue
2004
189 pages
ISSN:1084-6654
EISSN:1084-6654
DOI:10.1145/1005813
Issue’s Table of Contents

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 31 December 2004
Published in JEA Volume 9

Author Tags

  1. Algorithm analysis
  2. Henriksen's
  3. calendar queue
  4. discrete event simulation
  5. future event list
  6. pending event set
  7. priority queue
  8. simulator
  9. skew heap
  10. splay tree
  11. tree

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 816
    Total Downloads
  • Downloads (Last 12 months)2
  • Downloads (Last 6 weeks)0
Reflects downloads up to 02 Mar 2025

Other Metrics

Citations

View Options

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media