A Large Object-Oriented Virtual Memory: Grouping Strategies, Measurements, and Performance

A Large Object-Oriented Virtual Memory: Grouping Strategies, Measurements, and Performance

A Large Object-Oriented Virtual Memory: Grouping Strategies, Measurements, and Performance James William Stamos A Large Object-Oriented Virtual Memory: Grouping Strategies, Measu rements, and Pe rfo rmance by James William Stamos SCG-82-2 May 1982 Corporate Accession P82-00053 © Copyright James William Stamos 1982. All Rights Reserved. Abstract: See page 2. This report is a slightly revised version of a thesis submitted to the Department of Electrical Engineering and Computer Science at MIT in partial fulfillment of the requirements for the degrees of Bachelor of Science and Master of Science. CR Categories: 4.35, 4.6, 6.34. Key words and phrases: virtual memory, paging, object-oriented system, program restructuring, initial placement, static grouping, measurement, reference behavior, Smalltalk. XEROX PALO ALTO RESEARCH CENTERS 3333 Coyote Hill Road / Palo Alto / California 94304 2 Abstract The Smalltalk-80 system is an object-oriented programming environment for which a novel virtual memory is being constructed. This Large Object-Oriented Memory (LOOM) maintains two distinct address spaces and compresses pointers when an object is swapped from disk to core. Although objects are the logical unit of transfer between disk and core, LOOM swaps disk pages between the disk and the in-core disk buffer. The grouping of objects on disk pages can be a critical factor in the determination of speed of Smalltalk application programs. An examination of the reference behavior of Smalltalk-80 provides useful insights for designing grouping strategies and explaining virtual memory performance. After reviewing the experimental methodology and the Large Object-Oriented Memory, this thesis describes nine static grouping techniques and a reference stream compression algorithm. Performance measurements taken from simulations of LOOM and a conventional page-swapping virtual memory are discussed and compared. The effects on the page fault rate of modifying parameters and policies of LOOM are described and an evaluation of LOOM-like virtual memories is offered. In terms of the number of page faults, an object-oriented virtual memory generally outperforms a page-swapping virtual memory for a range of small memory sizes that depends on the particular grouping strategy. The existence and stability of good groupings also impact the choice of a virtual memory design. 3 Acknowledgments This thesis came into reality only with the guidance. support, and encouragement of numerous friends. I must thank the XEROX Palo Alto Research Centers (PARe) for their extraordinary facilities. [am deeply indebted to the entire Software Concepts Group at PARCo for both their technical assistance and their pleasant working environment. Special thanks go to Peter Deutsch and Dan Ingalls for asking probing questions. making invaluable suggestions. and suffering through the first draft of this thesis. My faculty supervisor, David Reed. provided key insights and helped me transform a jumble of ideas into a coherent whole. Finally, I must thank my friend and supervisor at PARCo Ted Kaehler. for his continued support. assistance. and guidance throughout this endeavor. 4 Table of Contents Abstract ................................................................. 2 Acknowledgments .......................................................... 3 Table of Contcnl<; ......................................................... _ .. 4 Ijst of f;'igurcs ............................................................. 6 I. Preliminaries .......................................................... 7 1.1 [n troduction . ................... 7 1.2 Background ................................................... 8 1.3 Novel Extensions .............................................. 9 1.4 Some Resull'i ..... : ........................................... 9 1.5 A H.. oad Map . 11 II. Swapping Strategies and Grouping ......................................... 12 2.1 Logical versus Physical Swapping .................................. 12 2.2 Effectiveness of Grouping ....................................... 12 2.3· A Hierarchy of Groupings ...................................... 13 2.4 LOOM .................................................... 15 2.4.1 Object Swapping ......................................... 15 2.4.2 Pointer Compression ...................................... 17 2.4.3 Storage Management ...................................... 20 2.4.4 Relevant Smalltalk Tenninology .............................. 20 IlL Virtual Machine Emulation .............................................. 23 3.1 Empirical Data versus Mathematical Models .......................... 23 3.2 Emulation of Smalltalk-80 ....................................... 24 3.3 Execution Trace Validity ........................................ 24 [V. Detailed Reference Behavior ............................................. 26 4.1 Definitions .................................................. 26 4.2 'rrace Data .................................................. 27 4.3 Object Size ................................................. 28 4.4 Fractional Utilization .......................................... 30 4.4.1 Discussion ............................................. 31 4.4.2 Incremental Analysis ...................................... 34 4.4.3 Effect of Object Size ...................................... 36 4.4.4 Conclusions ............................................ 38 4.5 Interreference Headway ........................................ 39 4.6 Instance to Class Compression .................................... 42 4.7 Access Frequency ............................................. 45 4.7.1 Discussion ............................................. 45 4.7.2 Effect of Object Size ...................................... 47 4.7.3 Implications for Caches .................................... 49 4.8 Reference Counts ............................................. 49 4.9 Selectors as a Percentage of Literals ................................ 51 4.10 Summary and Conclusions ...................................... 53 V. Static Grouping Algorithms .............................................. 55 5.1 Nine Algorithms .............................................. 55 5.2 Static Pointer Distance ......................................... 57 5.3 Neighbor Relation ............................................ 60 5.3.1 Effect of a Continuous Displacement .......................... 60 5.3.2 Discussion ............................................. 61 5.3.3 Effect of Page Size ....................................... 62 5.4 Conclusions and Predictions ..................................... 64 V L Reference String Compression ............................................ 66 6.1 Developing the Algorithm ....................................... 66 6.1.1 A Simple Compression Scheme ............................... 66 6.1.2 A More Detailed Algorithm ................................. 68 6.1.3 Loom Requirements ...................................... 69 6.1.4 Equivalence ............................................ 70 5 6.2 Three Execution Sequences ...................................... 70 6.3 Reference Spread ........... 0 0 • 0 0 0 0 0 0 0 0 •••••••• 0 •••••••••••••• 71 VIl. Grouping and a Paged Virtual Memory ............. 0 ••••••••••••••••••••••• 74 7.1 Simulating a Paged Virtual Memory ................................ 74 7.2 Results .................................................... 74 7.3 Analysis of Predictions .......... 0 •••••••••••••••••••••••••••••• 77 VIIL Grouping and LOOM ..................... 0 ••••• 0 •••••••••••••••••••••• 79 8.1 Simulating LOOM .......... 0 •• 0 •••••••••••••••••••••••••••••• 79 8.2 Differences l1etween the Simulation and r,OOM ....................... 81 8.3 Result~ ............................ 0 ••••••••••••••••••••••• 81 8.3.1 Results Independent of Grouping ... 0 ••••••••••••••••••••••••• 82 8.3.2 Paging Performance ........ 0 ••• 0 •••••••••••••••• 0 ••••••••• 83 8.3.3 Page Utilization and Cleanliness. 0 ••• 0 •••••••••••• 0 ••••••••••• 85 8.3.4 Effect of Core Purging Policy. 0 •••• 0 ••••••••••••••••••••••••• 87 8.3.5 Variable Buffer Size ................ 0 ••••••••••• 0 •••••••••• 90 8.3.6 Effect of Disk Buffer Purging Policy. 0 ••••••••••••••••••••••••• 94 8.3.7 In-Core Residence Times .... 0 •••••••••••••••••••• 0 ••••••••• 94 8.4 Analysis of Predictions .... 0 •••• 0 0 • 0 •••••••••••••••••••••••••••• 98 IX. LOOM versus a Paged Virtual Memory ...... 0 ••• 0 ••••••••••••••••••••••••• 100 9.1 Equivalence and the Compression Algorithm. 0 • 0 •••••••••••••••••••• 101 9.2 A Naive Comparison ........... 0 ••••••••••••••••••••••••••••• 103 9.3 LeafiNo-Leaf Comparisons ............................ 0 •••••••• 106 9.4 Warm-Start Comparisons ....................................... 109 9.5 A Note Concerning Page Faults ................... 0 • : ••••••• 0 •••• 112 9.6 Extending These Results .... 0 •••••••••••••••••••••••••••••••••• ll2 9.7 An Evaluation of LOOM ....... 0 ••••••••••••••••••••••••••••••• ll5 X. Dynamic Characteristics and Degradation of Initial Placements ........... 0 •••••••• 118 10.1 Introduction ... 0 ••••••• 0 •••••••••••••••••••••••••••••••••••• 118 10.2 Stack-like Allocation and Deallocation 0 •••••••••••••••••• 0 ••••••••• 119 10.3 Object Lifetime ... 0 •••••••• 0 • 0 0 •••• 0 •••••••••••••• 0 ••••••••• 120 10.4 Dynamic Pointer Distance ............ 0 ••••••••••••••••••••••••• 120 10.5 Degradation of an Initial Placement ..... 0 ••• 0 ••••••••••••••••••••• 122 XI. Conclusions ....................... 0 •••• 0 •••••••••••••••••••••••••••

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    165 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us