skip to main content
article
Free Access

On the external storage fragmentation produced by first-fit and best-fit allocation strategies

Published:01 August 1975Publication History
Skip Abstract Section

Abstract

Published comparisons of the external fragmentation produced by first-fit and best-fit memory allocation have not been consistent. Through simulation, a series of experiments were performed in order to obtain better data on the relative performance of first-fit and best-fit and a better understanding of the reasons underlying observed differences. The time-memory-product efficiencies of first-fit and best-fit were generally within 1 to 3 percent of each other. Except for small populations, the size of the request population had little effect on allocation efficiency. For exponential and hyperexponential distributions of requests, first-fit outperformed best-fit; but for normal and uniform distributions, and for exponential distributions distorted in various ways, best-fit out-performed first-fit. It is hypothesized that when first-fit outperforms best-fit, it does so because first-fit, by preferentially allocating toward one end of memory, encourages large blocks to grow at the other end. Sufficient contiguous space is thereby more likely to be available for relatively large requests. Results of simulation experiments supported this hypothesis and showed that the relative performance of first-fit and best-fit depends on the frequency of requests that are large compared to the average request. When the coefficient of variation of the request distribution is greater than or approximately equal to unity, first-fit outperformed best-fit.

References

  1. 1 Campbell, J.A. A note on an optimal-fit method for dynamic allocation of storage. The Computer J. 14, 1 (Jan. 1971), 7-9.Google ScholarGoogle ScholarCross RefCross Ref
  2. 2 Wald, B. Utilization of a multiprocessor in command control. Proc. IEEE 54, 12 (Dec. 1966), 1885-88.Google ScholarGoogle ScholarCross RefCross Ref
  3. 3 Thompson, R., and Wilkinson, J. The D825 automatic operating and scheduling program. Proc. AFIPS 1963 SJCC, pp 139-146, May 1963; reprinted in S. Rosen, Programming Systems and Language, McGraw-Hill, New York, 1967. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4 Anderson, J.P., et al. D825--A multiple-computer system for command and control. Proc. AFIPS 1962 FJCC, pp 86-96, Dec 1962; reprinted in C.G. Bell and A. Newell, Computer Structures-Readings and Examples, McGraw-Hill, New York, 1971.Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5 Wald, B. Private communication.Google ScholarGoogle Scholar
  6. 6 Collins, G.O. Experience in automatic storage allocation. Comm. ACM 4, 10 (Oct. 1961), 436-440. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7 Knuth, D.E. The Art of Computer Programming, Vol I Fundamental Algorithms, Addison-Wesley, Reading, Mass., 1968, pp. 435-452. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8 Randell, B. A note on storage fragmentation and program segmentation. Comm. ACM 12, 7 (July 1969), 365-372. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9 Batson, A., Ju, S., and Wood, D.C. Measurements of segment size. Comm. ACM 13, 3 (Mar. 1970), 155-159. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10 Totschek, R.A. An empirical investigation into the behavior of the SDC timesharing system. Rep. SP2191, AD 622003, System Development Corp., Santa Monica, Calif., 1965.Google ScholarGoogle Scholar
  11. 11 Margolin, B.H., Parmelee, R.P,, and Schatzoff, M. Analysis of free-storage algorithms. IBM SYST J. 4, (1971).Google ScholarGoogle Scholar
  12. 12 Wilson, S. Private communication.Google ScholarGoogle Scholar
  13. 13 Fisz, M. Probability Theory and Mathematical Statistics. Wiley, New York, 1963, Chap. 13.Google ScholarGoogle Scholar
  14. 14 Loeve, M. Probability Theory. Van Nostrand, New York, 1955, p. 159.Google ScholarGoogle Scholar
  15. 15 Shore, J.E. On the external storage fragmentation produced by first-fit and best-fit allocation strategies. Naval Research Lab. Memo. Rep. 2848, Washington, D.C., July 1974.Google ScholarGoogle Scholar
  16. 16 Fenton, J. S. and Payne, D. W. Dynamic storage allocation of arbitrary sized segments. Proc. IFIP 74, North-Holland Pub. Co., Amsterdam, 1974, pp. 344-348.Google ScholarGoogle Scholar

Index Terms

  1. On the external storage fragmentation produced by first-fit and best-fit allocation strategies

      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 Communications of the ACM
        Communications of the ACM  Volume 18, Issue 8
        Aug. 1975
        52 pages
        ISSN:0001-0782
        EISSN:1557-7317
        DOI:10.1145/360933
        Issue’s Table of Contents

        Copyright © 1975 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: 1 August 1975

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader