• No se han encontrado resultados

List Processing in Real Time on a Serial Computer

N/A
N/A
Protected

Academic year: 2023

Share "List Processing in Real Time on a Serial Computer"

Copied!
31
0
0

Texto completo

A real-time list processing system has the property that the time required by each of the elementary tiling operations is bounded by a constant independent of the number of cells in use. These estimates become the limit for non-equilibrium situations as long as the ratios of the KONS rate to the marking, erasure, and displacement rates are constant. B indicates the first free word (at the end) of the free zone, which is always in space.

This nmethod of updating the pointer is equivalent to using a queue instead of a stack for the annotation, and therefore tracks a tree that includes the accessible cells in the breadth-first order. The size(p) function returns the size of the array specified in l,y p. instead of the value of 3. The user program may not "squirrel" pointers outside the R bank during a call to CONS because such pointers would become obsolete if garbage collection occurred.

To simplify the algorithm and the proof, we trick the user program into believing that garbage collection was running and finished at the time of the last turn; i.e. we avoid this waste of tracking effort by using the T pointer to point to the top of the free area and assigning all new cells there. It should be easy to see why other list operations cannot adversely affect the progress of the stack.

Using these statements, we see that the tiling mutator and the collector's marker stage essentially do the same thing: track accessible cells.

List processing in real time on a serial computer.. using MKSMW is very awkward because CONS has to search for a free cell of the right size and location before allocating a cell, since the free space is fragmented. The function READ in LISP might want to exercise the same prerogative, for the same reason.

A User Program Stack

Real-time list processing on a serial computer. during the first load of the database, because it knows that even though many records are created, none are released, and therefore continued copying of the collector will not result in compaction. The global variable "SP" is the user stack pointer and points to the current top of the user stack. scans the user stack and points to the highest stack level that has not yet been tracked by the collector. Return address of copied cell. iThe complexity involved in this conversion is essentially the complexity required to make the serial real-time method work for different spaces [27).

In such a system, each space is a contiguous region of the address space separate from the other spaces and has its own representation conventions and allocation (and deallocation) strategies. The system in this section thus has two spaces, the heap and the user stack, which must be controlled by cooperating routines.

CDR-Coding (Compact List Representation)

CONS, CAR, CDR, RPLACA, and RPLACD must be modified to retain these claims, but EQ and ATOM require no modification from their non-CDR encoded versions. Since an EXTENDED cell cannot point to another I'XTENI)DED cell, the passing of EXTENDED pointers need not be repeated. These policies appear to minimize memory references because each cell has a constant (between turns) canonical address, thus avoiding normalization [30] at each primitive list operation.

However, the tracking order of an MFYCA collector can easily be changed at the cost of an extra pointer, PB. PB keeps track of the previous value of B (ie PB points to the last copied cell), so tracing the cdr of the cell at PB will copy its successor to the next consecutive location (B), thus copying entire lists to successive contiguous placements. The mechanism of the scan pointer S is then slightly changed so that it points to the next word that he updated instead of the next cell.

PB takes priority over tracking the edge at S, and the state of the tracking loop is modified to amortize both the copy effort (measured by movements of B) and the tracking effort (measured by movements of S) over all the CONS. These modifications do not result in a depth-first tracking order, but they do result in cd.r-chaimns being tracked to the end with few interruptions. Thus, an MFYCA collector can minimize the amount of memory needed for CDR-encoded lists.

The size of the tospace needed for CDR encoding is (1+m) times the amount of space actually used in fror•space. Thus, CDR encoding has given us back the factor of 2 that the copy garbage collector took away. The real-time properties of our algorithm have not been affected in the slightest by CDR encoding; in fact, good microcode may be able to process CDR-encoded lists faster than normal lists, since fewer references to main memory are needed.

CDR encoding is not the final answer to the encoding efficiency problems of list storage, because much more compact codes can be devised to store LISP's s-expressions. For example, both the car and cdr of a .cell could be coded by relative offsets rather than full pointers [121 However, a more compact code would. Part of the problem is inherent in LISP's small cell size; small arrays can perform much better.

Vectors and Arrays

  • Hash Tables and Hash Links
  • Referenice Counting
  • The Costs of Real-Time List Processing
  • Applications
  • Conclusions and Future Work

If so, the property list can be found by looking in a hash table, using the address of the list cell as the key. In this section, we consider whether reference counting can be used as a storage reclamation method to process lists in real time; That is, reference counting seems unsuitable for real-time applications because there is a potentially unlimited amount of work to be done when a cell is released.

The amount of storage and time used by a real-time list processing system can be compared to that used by a classical list processing system using garbage collection for tasks that do not require finite response times. Comparing these expressions with those derived earlier for our real-time algorithms, we find that real-time LISP list processing does not require more space than a non-real system using DSW. If larger objects of non-uniform size such as strings . if it is managed, the real-time capability does not require more space than the MFYCA system, since a replica collector is assumed anyway.

The average time requirement for CONS in our real-time system is practically identical to that in a classical M VYCA system using the same cell representation and the same amount of storage. Real-time list processing on a serial computer .. is accounted for in our analysis of CONS. Since our system ties the collector activity to cell creation, the collector effort is almost the same as in a non-real system.

We also design 16-bit microcomputers that use this algorithm for real-time process control or simulation tasks. The average CONS time is reduced by postponing the rollover until all free space in iospace is exhausted, i.e. As a result, the average time of CONS in our real-time system is approximately the same as that in a classical system.

Our scheme is still real-time on a virtual memory computer, but the bounds on elementary list operat ions are now of the order of magnitude of secondary storage operations. We have presented a method for doing list processing on a serial computer in a real-time environment' where the minification required by all elementary list operations must be bounded by a constant which is independent of the number of list cells in use. Therefore, we consider our system to be an attractive alternative to reference counting for real-time storage management and have shown that, given sufficient storage space, our method will outperform a reference, without requiring the topological constraints of that system.

Our real-time scheme is strikingly similar to the incremental garbage collector independently proposed by Barbacci for a microcoded LISP machine [3]. The order in which the cells are traced is not important for the accuracy of the algorithm or its real-time properties.

Acknowledgements

The garbage collection algorithm can be thought of as a means of converting Von Neumann-style random access memory (with "side effects") to list memory (without "side effects")). Perhaps the list memory can be implemented directly in hardware using significantly less power if it takes advantage.

Referencias

Documento similar

48,020.00, debido a la falta de control interno lo cual afectado todo el desarrollo de las actividades y procedimientos en la organización y por ende las ventas, dio como