next up previous
Next: The design space Up: Data Structures for Previous: The piece table

A General Model of Sequence Data Structures

 

The discussions in the previous two sections suggest that it is possible to characterize all sequence data structures given the following assumptions:

  1. The computer has main memory with sequentially addressed cells and has disk memory with sequentially addressed blocks of sequentially addressed cells.
  2. Items have a fixed size in memory and on disk.
  3. Items are stored directly in the memory or on disk, that is, they are not encoded. Hence every item must exist somewhere in memory or on disk.
  4. The main memory is of limited size and hence cannot hold all the items in large sequences.gif
  5. The environment provides dynamic memory allocation (although some sequence data structures will do their own and not use the environment's dynamic memory allocation).
  6. The environment provides a reasonably efficient file system for item storage that provides files of (for all practical purposes) unlimited size.

The following concepts are used in the model.

A sequence data structure is either

This model is recursive in that to implement a sequence of items it is necessary to implement a sequence of descriptors. This recursion is usually only one step, that is, the sequence of descriptors in implemented with a basic sequence data structure. The deficiencies of the basic sequence data structures for implementing character sequences are less critical for sequences of descriptors since there are usually far fewer descriptors and so sophisticated methods are not required.




next up previous
Next: The design space Up: Data Structures for Previous: The piece table

Charlie Crowley
Thu Jun 27 15:36:10 MDT 1996