garbage collection for edge computing
play

Garbage Collection for Edge Computing Andrs Amaya Garca David May - PowerPoint PPT Presentation

Garbage Collection for Edge Computing Andrs Amaya Garca David May Ed Nutting sourcecodeartisan.com bristol.ac.uk Introduction Modern programming languages provide a high-level view of data and control Python, C#, JavaScript,


  1. Garbage Collection for Edge Computing Andrés Amaya García David May Ed Nutting sourcecodeartisan.com bristol.ac.uk

  2. Introduction § Modern programming languages provide a high-level view of data and control – Python, C#, JavaScript, etc... – Productivity – Trust § Modern languages are not used in embedded systems because software garbage collectors: – Impose high performance and memory overheads – Cannot be used in real-time systems sourcecodeartisan.com bristol.ac.uk

  3. Objectives § Efficiently support modern languages in embedded systems – think small IoT edge devices e.g. ARM Cortex-M processors. § Investigate hardware –instead of software– collectors – High run-time performance – Low memory requirements – Capable of hard real-time sourcecodeartisan.com bristol.ac.uk

  4. Integrated Hardware Garbage Collection (IHGC) § Exact collector Register File – Every word has a 1-bit tag: pointer vs data § Indirection through handles Processor Garbage – Directory memory contains object’s metadata Pipeline Collector – Tightly integrated with processor § Hardware state machine for collector – Each state transition performed in one memory cycle – Collector operates when the processor is not Directory Main Memory accessing memory § Allocations via an instruction Private bus Shared Shared memory bus bus bus sourcecodeartisan.com bristol.ac.uk

  5. IHGC – Indirection Through Handles Directory Pointer Handle Offset Address Size Mark Deep List Allocated object + Free Memory sourcecodeartisan.com bristol.ac.uk

  6. IHGC – Indirection Through Handles Directory Pointer Handle Offset Address Size Mark Deep List Pointers are not physical Allocated object + memory Free Memory addresses sourcecodeartisan.com bristol.ac.uk

  7. IHGC – Indirection Through Handles Directory Pointer Handle Offset Address Size Mark Deep List Pointers are not physical Allocated object + memory Directory has Free Memory addresses object metadata and collection information sourcecodeartisan.com bristol.ac.uk

  8. IHGC – Indirection Through Handles Directory Pointer Handle Offset Address Size Mark Deep List Pointers are not physical Allocated object + memory Directory has Free Memory addresses object metadata and collection information Memory access in two steps: 1. Calculate main memory address 2. Access main memory sourcecodeartisan.com bristol.ac.uk

  9. IHGC – Garbage Collection State Machine Check Scan & Mark Root Root § Mark-Compact collector Pop Scan Check § Roots are pointers in the registers Next Object & Mark Object Word Pointer § Each state transition is performed in one memory cycle Load Read Clear Object Word Word Info Zero Write Word Word Mark Objects Compact Mark Roots sourcecodeartisan.com bristol.ac.uk

  10. IHGC – Coordination § Mark stage – Pointers loaded from main memory are processed for marking – Conceptually similar to a traditional read barrier § Compact stage – Redirect memory access to the correct location when the object accessed is being compacted § Transparent from the program’s point of view § Does not incur pauses or performance penalties sourcecodeartisan.com bristol.ac.uk

  11. Experimental Setup § Modelled an ARM Cortex-M0 alongside the IHGC § Benchmarks: – BEEBS – Python 3 scripts running on MicroPython § LLVM compiler sourcecodeartisan.com bristol.ac.uk

  12. Results – BEEBS sourcecodeartisan.com bristol.ac.uk

  13. Results – BEEBS Comparable performance in programs that do NOT use dynamic memory sourcecodeartisan.com bristol.ac.uk

  14. Results – BEEBS Better performance in programs that use dynamic memory sourcecodeartisan.com bristol.ac.uk

  15. Results – MicroPython sourcecodeartisan.com bristol.ac.uk

  16. Results – Pauses sourcecodeartisan.com bristol.ac.uk

  17. Results – Pauses x1.5 larger heap sourcecodeartisan.com bristol.ac.uk

  18. Results – Pauses Up to 20% reduction in pauses when data width increases sourcecodeartisan.com bristol.ac.uk

  19. Conclusion § IHGC splits collection work at the granularity of a memory cycle § Collection worked performed when the processor is not using the memory § Comparable or better performance when running C programs § Python scripts run 1.5-7 faster in IHGC system § Hard real-time sourcecodeartisan.com bristol.ac.uk

  20. Thank You! Questions? Andrés Amaya García andres.amayagarcia@bristol.ac.uk sourcecodeartisan.com sourcecodeartisan.com bristol.ac.uk

Recommend


More recommend