skip to main content
10.1145/1993478.1993496acmconferencesArticle/Chapter ViewAbstractPublication PagesismmConference Proceedingsconference-collections
research-article

Compartmental memory management in a modern web browser

Published:04 June 2011Publication History

ABSTRACT

Since their inception, the usage pattern of web browsers has changed substantially. Rather than sequentially navigating static web sites, modern web browsers often manage a large number of simultaneous tabs displaying dynamic web content, each of which might be running a substantial amount of client-side JavaScript code. This environment introduced a new degree of parallelism that was not fully embraced by the underlying JavaScript virtual machine architecture. We propose a novel abstraction for multiple disjoint JavaScript heaps, which we call compartments. We use the notion of document origin to cluster objects into separate compartments.

Objects within a compartment can reference each other directly. Objects across compartments can only reference each other through wrappers. Our approach reduces garbage collection pause times by permitting collection of sub-heaps (compartments), and we can use cross-compartment wrappers to enforce cross origin object access policy.

References

  1. S. M. Blackburn, R. Jones, K. S. McKinley, and J. E. B. Moss. Beltway: getting around garbage collection gridlock. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 153--164. ACM Press, 2002. 10.1145/512529.512548. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. R. S. Cox, S. D. Gribble, H. M. Levy, and J. G. Hansen. A safety-oriented platform for web applications. In Proceedings of the IEEE Symposium on Security and Privacy, pages 350--364. IEEE Computer Society, 2006. 10.1109/SP.2006.4. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. A. Gal, B. Eich, M. Shaver, D. Anderson, D. Mandelin, M. R. Haghighat, B. Kaplan, G. Hoare, B. Zbarsky, J. Orendorff, J. Ruderman, E. W. Smith, R. Reitmaier, M. Bebenita, M. Chang, and M. Franz. Trace-based just-in-time type specialization for dynamic languages. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 465--478. ACM Press, 2009. 10.1145/1542476.1542528. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. C. Grier, S. Tang, and S. T. King. Secure web browsing with the OP web browser. In Proceedings of the IEEE Symposium on Security and Privacy, pages 402--416. IEEE Computer Society, 2008. 10.1109/SP.2008.19. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. D. R. Hanson. Fast allocation and deallocation of memory based on object lifetimes. Software - Practice and Experience, 20 (1): 5--12, 1990. 10.1002/spe.4380200104. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. M. Hirzel. Connectivity-Based Garbage Collection. PhD thesis, Department of Computer Science, University of Colorado at Boulder, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. M. Hirzel, J. Henkel, A. Diwan, and M. Hind. Understanding the connectivity of heap objects. In Proceedings of the International Symposium on Memory Management, pages 36--49. ACM Press, 2002. 10.1145/512429.512435. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. H. Inoue, H. Komatsu, and T. Nakatani. A study of memory management for web-based applications on multicore processors. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 386--396. ACM Press, 2009. 10.1145/1542476.1542520. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Intel. Using the RDTSC instruction for performance monitoring, 1997.Google ScholarGoogle Scholar
  10. R. Jones and R. Lins. Garbage Collection: Algorithms for Automatic Dynamic Memory Management. John Wiley & Sons, Inc., 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. E. Jul, H. Levy, N. Hutchinson, and A. Black. Fine-grained mobility in the Emerald system. ACM Transactions on Computer Systems, 6 (1): 109--133, 1988. 10.1145/35037.42182. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. N. C. Juul and E. Jul. Comprehensive and robust garbage collection in a distributed system. In Proceedings of the International Workshop on Memory Management, pages 103--115. LNCS Volume 637, Springer-Verlag, 1992. 10.1007/BFb0017185. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. D. E. Knuth. Fundamental Algorithms, The Art of Computer Programming, chapter 2, volume 1. Addison Wesley, 2nd edition, 1973.Google ScholarGoogle Scholar
  14. S. McFarling. Program optimization for instruction caches. In Proceedings of the International Conference on Architectural Support for Programming Languages and Operating Systems, pages 183--191. ACM Press, 1989. 10.1145/70082.68200. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Microsoft. What's new in Internet Explorer 8, 2008. URL http://msdn.microsoft.com/en-us/library/cc288472.aspx.Google ScholarGoogle Scholar
  16. Mozilla. Firefox web browser and Thunderbird email client, 2011 URL http://www.mozilla.com.Google ScholarGoogle Scholar
  17. Mozilla. Kraken JavaScript benchmark, 2011. URL http://krakenbenchmark.mozilla.org/.Google ScholarGoogle Scholar
  18. Mozilla. SpiderMonkey (JavaScript-C) engine, 2011. URL http://www.mozilla.org/js/spidermonkey/.Google ScholarGoogle Scholar
  19. J. Peachey, R. Bunt, and C. Colbourn. Some empirical observations on program behavior with applications to program restructuring. IEEE Transactions on Software Engineering, 11 (2): 188--193, 1985. 10.1109/TSE.1985.232193. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. C. Reis and S. D. Gribble. Isolating web programs in modern browser architectures. In Proceedings of the European Conference on Computer Systems, pages 219--232. ACM Press, 2009. 10.1145/1519065.1519090. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. G. Richards, S. Lebresne, B. Burg, and J. Vitek. An analysis of the dynamic behavior of JavaScript programs. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 1--12. ACM Press, 2010. 10.1145/1806596.1806598. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. J. Rudermann. The same origin policy, 2001. URL https://developer.mozilla.org/En/Same_origin_policy_for_JavaScript.Google ScholarGoogle Scholar
  23. M. L. Seidl and B. G. Zorn. Segregating heap objects by reference behavior and lifetime. In Proceedings of the International Conference on Architectural Support for Programming Languages and Operating Systems, pages 12--23. ACM Press, 1998. 10.1145/291069.291012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. StatCounter. Global Stats, 2011. URL http://gs.statcounter.com/.Google ScholarGoogle Scholar
  25. C. J. Stephenson. Fast fits: New methods for dynamic storage allocation. In Proceedings of the ACM Symposium on Operating Systems Principles, pages 30--32. ACM Press, 1983. 10.1145/800217.806613. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. H. J. Wang, C. Grier, E. Moshchuk, S. T. King, P. Choudhury, and H. Venter. The multi-principal OS construction of the Gazelle web browser. In Proceedings of the USENIX Security Symposium, pages 417--432. USENIX, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Compartmental memory management in a modern web browser

      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
      • Published in

        cover image ACM Conferences
        ISMM '11: Proceedings of the international symposium on Memory management
        June 2011
        148 pages
        ISBN:9781450302630
        DOI:10.1145/1993478
        • cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 46, Issue 11
          ISMM '11
          November 2011
          135 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/2076022
          Issue’s Table of Contents

        Copyright © 2011 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: 4 June 2011

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate72of156submissions,46%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader