skip to main content
research-article

Sum-of-squares heuristics for bin packing and memory allocation

Published:12 June 2008Publication History
Skip Abstract Section

Abstract

The sum-of-squares algorithm (SS) was introduced by Csirik, Johnson, Kenyon, Shor, and Weber for online bin packing of integral-sized items into integral-sized bins. First, we show the results of experiments from two new variants of the SS algorithm. The first variant, which runs in time O(nBlogB), appears to have almost identical expected waste as the sum-of-squares algorithm on all the distributions mentioned in the original papers on this topic. The other variant, which runs in O(nlogB) time, performs well on most, but not on all of those distributions. We also apply SS to the online memory-allocation problem. Our experimental comparisons between SS and Best Fit indicate that neither algorithm is consistently better than the other. If the amount of randomness in item sizes is low, SS appears to have lower waste than Best Fit, whereas, if the amount of randomness is high Best Fit appears to have lower waste than SS. Our experiments suggest that in both real and synthetic traces, SS does not seem to have an asymptotic advantage over Best Fit, in contrast with the bin-packing problem.

References

  1. Berger, E. D., McKinley, K. S., Blumofe, R. D., and Wilson, P. R. 2000. Hoard: a scalable memory allocator for multithreaded applications. SIGPLAN Not. 35, 11, 117--128. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Berger, E. D., Zorn, B. G., and McKinley, K. S. 2002. Reconsidering custom memory allocation. In OOPSLA '02: Proceedings of the 17th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications. ACM Press, New York. 1--12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Coffman, E.G., Courcoubetis, C., Garey, M. R., Johnson, D. S., McGeogh, L. A., Shor, P. W., Weber, R. R., and Yannakakis, M. 1991. Fundamental discrepancies between average-case analyses under discrete and continuous distributions. In Proceedings of the 23rd Annual Symposium on Theory of Computing. 230--240.Google ScholarGoogle Scholar
  4. Coffman, E. G., Garey, M. R., and Johnson, D. S. 1996. Approximation Algorithm for NP-Hard Problems, Approximation Algorithms for Bin Packing: A Survey. 46--93. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Coffman, E. G., Courcoubetis, C., Garey, M. R., Johnson, D. S., Shor, P. W., Weber, R. R., and Yannakakis, M. 2000. Bin packing with discrete item sizes, part I: Perfect packing theorems and average case behavior of optimal packings. SIAM Journal on Discrete Math. 13, 384--402. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Coffman, E. G. Jr. and Leung, J. Y. 1977. Combinatorial analysis of an efficient algorithm for processor and storage allocation. In Proceedings of the 18th Annual Symposium on Foundations of Computer Science. 214--221.Google ScholarGoogle Scholar
  7. Coffman, E. G. Jr. and Leighton, F. T. 1986. A provably efficient algorithm for dynamic storage allocation. In Proceedings of the 18th Annual ACM Symposium on Theory of Computing. 77--90.Google ScholarGoogle Scholar
  8. Coffman, E. G., Jr. Johnson, D. S., Shor, P. W., and Weber, R. R. 1993. Markov chains, computer proofs, and average-case analysis of best fit bin packing. In STOC'93: Proceedings of the 25th Annual ACM Symposium on Theory of Computing. ACM Press, New York. 412--421.Google ScholarGoogle Scholar
  9. Coffman, E. G. Jr., Johnson, D. S., Shor, P. W., and Weber, R. R. 1997. Bin packing with discrete item sizes, part ii: Tight bounds on first fit. Random Structures and Algorithms 10, 1--2, 69--101. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Csirik, J., Johnson, D. S., Kenyon, C., Shor, P. W., and Weber, R. R. 1999. A self organizing bin packing heuristic. In Proceedings of ALENEX Workshop. 246--265. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Csirik, J., Johnson, D. S., Kenyon, C., Orlin, J., Shor, P. W., and Weber, R. R. 2000. On the sum-of-squares algorithm for bin packing. In Proceedings of the 32nd Annual ACM Symp. on the Theory of Computing. 208--217. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Csirik, J., Johnson, D. S., Kenyon, C., Orlin, J. B., Shor, P. W., and Weber, R. R. 2006. On the sum-of-squares algorithm for bin packing. J. ACM 53, 1, 1--65. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Dyckhoff, H. 1990. A typology of cutting and packing problem sacking. European Journal of Operational Research 44, 145--159.Google ScholarGoogle ScholarCross RefCross Ref
  14. Garey, M. R. and Johnson, D. S. 1979. Computers and Intractability. A Guide to the Theory of NP-Completeness. W. H. Freeman and Company. New York, NY, USA.Google ScholarGoogle Scholar
  15. Horowitz, E., Mehta, D., and Sahni, S. 2006. Fundamentals of Data Structures in C++. W. D. Freeman, San Fransisco, CA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Johnstone, M. S. 1997. Non-Compacting Memory Allocation and Real-Time Garbage Collection. PhD thesis. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Johnstone, M. S. and Wilson, P. R. 1998. The memory fragmentation problem: solved? In ISMM'98: Proceedings of the 1st International Symposium on Memory Management. ACM Press, New York. 26--36. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Kenyon, C. and Mitzenmacher, M. 2002. Linear waste of best fit bin packing on skewed distributions. Random Struct. Algorithms 20, 3, 441--464. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Lea, D. A memory allocator. http://g.oswego.edu/dl/html/malloc.html.Google ScholarGoogle Scholar
  20. Luby, M. G., Naor, J., and Orda, A. 1996. Tight bounds for dynamic storage allocation. SIAM Journal on Discrete Math. 9, 155--1660. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Robson, J. M. 1974. Bounds for some functions concerning dynamic storage allocation. Journal of the ACM 12, 491--499.Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Wilson, P. R., Johnstone, M. S., Neely, M., and Boles, D. 1995. Dynamic storage allocation: A survey and critical review. In Proc. Int. Workshop on Memory Management, Kinross Scotland (UK). Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Zorn, B. and Grunwald, D. 1994. Evaluating models of memory allocation. ACM Trans. Model. Comput. Simul. 4, 1, 107--131.Google ScholarGoogle ScholarDigital LibraryDigital Library

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

  • Published in

    cover image ACM Journal of Experimental Algorithmics
    ACM Journal of Experimental Algorithmics  Volume 12, Issue
    2008
    507 pages
    ISSN:1084-6654
    EISSN:1084-6654
    DOI:10.1145/1227161
    Issue’s Table of Contents

    Copyright © 2008 ACM

    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 12 June 2008
    • Accepted: 1 December 2006
    • Revised: 1 September 2006
    • Received: 1 May 2004
    Published in jea Volume 12, Issue

    Qualifiers

    • research-article
    • Research
    • Refereed

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader