skip to main content
article

Twol-amalgamated priority queues

Published:31 December 2004Publication History
Skip Abstract Section

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.]] Google ScholarGoogle Scholar
  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.]] Google ScholarGoogle Scholar
  3. Comfort, J. C. 1984. The simulation of a master-slave event set processor. Simulation 42, 3 (Mar.), 117--124.]]Google ScholarGoogle Scholar
  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.]] Google ScholarGoogle Scholar
  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.]] Google ScholarGoogle Scholar
  6. Fall, K. and Varadhan, K. 2002. The ns Manual. UCB/LBNL/VINT Network simulator v2. http://www.isi.edu/nsnam/ns/.]]Google ScholarGoogle Scholar
  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.]] Google ScholarGoogle Scholar
  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.]]Google ScholarGoogle Scholar
  9. Henriksen, J. O. 1977. An improved events list algorithm. In Proceedings of the 1977 Winter Simulation Conference, 547--557.]] Google ScholarGoogle Scholar
  10. Henriksen, J. O. and Crain, R. C. 1996. GPSS/H Reference Manual, 4th ed. Wolverine Software Corporation, Annandale, VA.]]Google ScholarGoogle Scholar
  11. Henriksen, J. O. 1997. An introduction to SLX. In Proceedings of the 1997 Winter Simulation Conference, 559--566.]] Google ScholarGoogle Scholar
  12. Jones, D. W. 1986. An empirical comparison of priority-queue and event-set implementations. Commun. ACM 29, 4 (Apr.), 300--311.]] Google ScholarGoogle Scholar
  13. Jones, D. W. 1989. Concurrent operations on priority queues. Commun. ACM 32, 1 (Jan.), 132--137.]] Google ScholarGoogle Scholar
  14. Kingston, J. 1986. Analysis of Henriksen's queue for the simulation event set. SIAM J. Comput. 15, 3 (Aug.), 887--902.]] Google ScholarGoogle Scholar
  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.]] Google ScholarGoogle Scholar
  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.]] Google ScholarGoogle Scholar
  17. Oh, S. and Ahn, J. 1998. Dynamic calendar queue. In Proceedings of the 32nd Annual Simulation Symposium, 20--25.]] Google ScholarGoogle Scholar
  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.]] Google ScholarGoogle Scholar
  19. Pritsker, A. and Pegden, C. 1979. Introduction to Simulation and SLAM, 3rd ed. Wiley, New York.]] Google ScholarGoogle Scholar
  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.]]Google ScholarGoogle Scholar
  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.]] Google ScholarGoogle Scholar
  22. Schwetman, H. 1996. CSIM18 User's Guide. Mesquite Software, Inc, Austin, TX.]]Google ScholarGoogle Scholar
  23. Sleator, D. D. and Tarjan, R. E. 1985. Self-adjusting binary search trees. J. ACM 32, 3 (July), 652--686.]] Google ScholarGoogle Scholar
  24. Sleator, D. D. and Tarjan, R. E. 1986. Self-adjusting heaps. SIAM J. Comput. 15, 1 (Feb.), 52--69.]] Google ScholarGoogle Scholar
  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.]] Google ScholarGoogle Scholar
  26. Tarjan, R. E. 1985. Amortized computational complexity. SIAM J. Algebraic Discrete Meth. 6, 2 (Apr.), 306--318.]]Google ScholarGoogle Scholar
  27. Thng, I. L. J. and Goh, R. S. M. 2004. Swan---Simulator without a name. http://swan.nus.edu.sg/.]]Google ScholarGoogle Scholar
  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.]] Google ScholarGoogle Scholar

Index Terms

  1. Twol-amalgamated priority queues

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in

            Full Access

            • Article Metrics

              • Downloads (Last 12 months)2
              • Downloads (Last 6 weeks)0

              Other Metrics

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader