Ravenbrook / Projects / Memory Pool System / Master Product Sources / Design Documents

Memory Pool System Project


                     THE DESIGN OF THE ROOT MANAGER
                            design.mps.root
                           incomplete design
                           richard 1995-08-25

INTRODUCTION

.intro:

.readership:


BASICS

.root.def: The root node of the object graph is the node which defines whether 
objects are accessible, and the place from which the mutator acts to change the 
graph.  In the MPS, a root is an object which describes part of the root node.  
The root node is the total of all the roots attached to the space.  [Note that 
this combines two definitions of root: the accessibility is what defines a root 
for tracing (see analysis.tracer.root.* and the mutator action for barriers 
(see analysis.async-gc.root).  pekka 1998-03-20]

.root.repr: Functionally, roots are defined by their scanning functions.  Roots 
_could_ be represented as function closures, i.e. a pointer to a C function and 
some auxillary fields.  The most general variant of roots is just that.  
However, for reasons of efficiency, some special variants are separated out.


DETAILS


Creation

.create: A root becomes "active" as soon as it is created.

.create.col: The root inherits its colour from the mutator, since it can only 
contain references copied there by the mutator from somewhere else.  If the 
mutator is grey for a trace when a root is created then that root will be used 
to determine accessibility for that trace.  More specifically, the root will be 
scanned when that trace flips.


Destruction

.destroy: It's OK to destroy a root at any time, except perhaps concurrently 
with scanning it, but that's prevented by the arena lock.  If a root is 
destroyed the references in it become invalid and unusable.


Invariants

.inv.white: Roots are never white for any trace, because they cannot be 
condemned.

.inv.rank: Roots always have a single rank.  A root without ranks would be a 
root without references, which would be pointless.  The tracer doesn't support 
multiple ranks in a single colour.


Scanning

.method: Root scanning methods are provided by the client so that the MPS can 
locate and scan the root set.  See protocol.mps.root for details.  [There are 
some more notes about root methods in meeting.qa.1996-10-16.]

A. References

B. Document History

2002-06-07 RB Converted from MMInfo database design document.

C. Copyright and License

This document is copyright © 1995-2002 Ravenbrook Limited. All rights reserved. This is an open source license. Contact Ravenbrook for commercial licensing options.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Redistributions in any form must be accompanied by information on how to obtain complete source code for the this software and any accompanying software that uses this software. The source code must either be included in the distribution or be available for no more than the cost of distribution plus a nominal fee, and must be freely redistributable under reasonable conditions. For an executable file, complete source code means the source code for all modules it contains. It does not include source code for modules or files that typically accompany the major components of the operating system on which the executable file runs.

This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement, are disclaimed. In no event shall the copyright holders and contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.


$Id: //info.ravenbrook.com/project/mps/version/1.102/design/root/index.html#1 $

Ravenbrook / Projects / Memory Pool System / Master Product Sources / Design Documents