160 likes | 281 Views
List Processing in Real Time on a Serial Computer. Cas Craven CS395T: Kathryn S. McKinley 2011. Outline. List processing languages Copying Gargage Collection Methods Minsky-Feinchel-Yochelson-Cheney-Arnborg (MFYCA) Baker’s Serial Real-Time Method Scanning and compaction Limitations.
E N D
List Processing in Real Time on a Serial Computer Cas Craven CS395T: Kathryn S. McKinley 2011
Outline • List processing languages • Copying Gargage Collection Methods • Minsky-Feinchel-Yochelson-Cheney-Arnborg (MFYCA) • Baker’s Serial Real-Time Method • Scanning and compaction • Limitations
List Processing • List elements have two cells, A and R, holding either data or a pointer • Instantiated with CONS • Accessors: CAR, CDR • Mutators: REPLCA REPLCR • Memory reclaimed by garbage collection
MYCFA: Simple GC • Single pass instead of • Mark • Sweep • Relocate • No Collector stack • Program sees addresses in To Space
Baker’s Algorithm • At each CONS, perform k iterations of the GC loop from MFYCA • Both semispaces now contain accessible cells • Pretend GC completed at time of last flip • Copy all registers immediately after flip • Modify CAR, CDR: Follow forwarding addresses, move cells found in from space and update pointers • New cells placed at top of To Space
Compaction: Breadth First Problem • Locality lost in MYCFA and Baker • Performance: modern memory hierarchy • Space: CDR coding requires linearizing gc • Solution mentioned in Baker: trace whole lists in the cdr direction • Chenney paper: A Nonrecursive List Compacting Algorithm • Details such a method
Limitations • Designed for a serial processor • Workable on multi-core? Shared memory? • Applicability to other data structures • Stack: separate space or emulate as a list in the heap? • Vectors and Arrays: loss of real-time property • Hash tables: esp. indexed by address?
Conclusion • Contributions • Real-time: bounded time, no GC pause • Doesn’t require parallel GC thread • Space/time tradeoff flexibility with k • Proven correct: no erroneous OOM • Lacking • Primarily concerned with memory space, but bandwidth usage to copy limits performance • Virtual Memory machines suffer increased working set size • Arrays break the real-time property • Empirical Results?
References • 2009 Presentation by Hadi Esmaeilzadeh • Chenney, C.J. A Nonrecursive List Compacting Algorithm. Comm ACM.13, 11 (Nov 1970), 677-678. • Baker, Henry G. List Processing in Real Time on a Serial Computer. Comm ACM 21, 4 (Apr 1978) 280-294.