Skip to main content

Packing trees

  • Session 2. Chair: Josep Diaz
  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 979))

Abstract

In a virtual memory system, the address space is partitioned into pages, and main memory serves as a cache to the disk. The problem we address is: Given a tree T, find a packing, an allocation of its nodes to pages, which optimizes the cache performance. We investigate a model for tree access in which a node is accessed only via the path leading to it from the root. Two cost functions are considered: the total number of different pages visited in the search, and the number of page faults incurred. It is shown that both functions can be optimized simultaneously. An efficient dynamic programming algorithm to find an optimal packing is presented. The problem of finding an optimal packing which also uses the minimum number of pages, is shown to be NP-complete. However, an efficient approximation algorithm is presented. This algorithm finds a packing that uses the minimum number of pages, and requires at most one extra page fault per search. Finally, we study dynamic trees which allow insertions and deletions.

This is a preview of subscription content, log in via an institution.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A. Aggarwal, B. Alpern, A. K. Chandra, and M. Snir. A model for hierarchical memory. In Proceedings of the 19th Annual Symposium on Computing, pages 305–314, New York, 1987.

    Google Scholar 

  2. A. V. Aho, R. Sethi, and J. D. Ullman. Compilers: principles, techniques, and tools. Addison-Wesley, Reading, Massachusetts, 1988.

    Google Scholar 

  3. T. Cormen, C. Leiserson, and R. Rivest. Introduction to Algorithms. McGraw Hill and The MIT Press, 1990.

    Google Scholar 

  4. B. Farizon. Local and global memory for the implementation of ray tracing on a parallel machine. Master's thesis, Computer Science Dept., Technion — Israel Institute of Technology, 1995.

    Google Scholar 

  5. J. D. Foley and A. V. Dam. Fundamental of Interactive Computer Graphics. The Systems Programming Series. Addison-Wesley, Reading, Massachusetts, 1984.

    Google Scholar 

  6. S. Gal, Y. Hollander, and A. Itai. Optimal mappings in a direct mapped cache environment. Math. Programming B, 63:371–387, 1994.

    Google Scholar 

  7. M. R. Garey and D. S. Johnson. Computers and Intractability, A Guide to the Theory of NP-Completeness. W.H. Freeman and Company, 1979.

    Google Scholar 

  8. C. F. Goldfarb. The SGML Handbook. Clarendon Press, Oxford, 1990.

    Google Scholar 

  9. M. S. Lam, E. Rothberg, and M. E. Wolf. The cache performance and optimizations of blocked algorithms. In Fourth International Conference on Architectural Support for Programming Languages and Operation Systems (ASPLOS IV), 1991.

    Google Scholar 

  10. M. E. Wolf and M. S. Lam. A data locality optimizing algorithm. In Proceedings of the ACM SIGPLAN'91 Conference on Programming Language Design and Implementation, 1991.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Paul Spirakis

Rights and permissions

Reprints and permissions

Copyright information

© 1995 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Gil, J., Itai, A. (1995). Packing trees. In: Spirakis, P. (eds) Algorithms — ESA '95. ESA 1995. Lecture Notes in Computer Science, vol 979. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-60313-1_138

Download citation

  • DOI: https://doi.org/10.1007/3-540-60313-1_138

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-60313-9

  • Online ISBN: 978-3-540-44913-3

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics