Mark DURING Sweep rather than Mark then Sweep - PowerPoint PPT Presentation

About This Presentation
Title:

Mark DURING Sweep rather than Mark then Sweep

Description:

Mark DURING Sweep rather than Mark then Sweep Presented by Ram Mantsour Authors: Chrisitan Queinnec, Barbara Beaudoing, Jean-Pierre Queille. Introduction Mark DURING ... – PowerPoint PPT presentation

Number of Views:104
Avg rating:3.0/5.0
Slides: 22
Provided by: rami91
Category:

less

Transcript and Presenter's Notes

Title: Mark DURING Sweep rather than Mark then Sweep


1
Mark DURING Sweep rather than Mark then Sweep
  • Presented by Ram Mantsour
  • Authors
  • Chrisitan Queinnec, Barbara Beaudoing,
    Jean-Pierre Queille.

2
Introduction
  • Mark DURING Sweep is intended as a real-time GC.
  • Regular GCs introduces delays which may affect
    real time applications.
  • Features parallel collection algorithm
    (concurrent marker sweeper and application)
  • Designed for real-time applications in embedded
    systems.

3
What Mark During Sweep has to fulfill
  • Short and predictable response time
  • very short time lag between events and handler
    (approx 50 micro sec).
  • Guaranteed throughput
  • To avoid unexpected GCs.
  • Operation with Narrow memory.
  • Execution time upper bound for an allocating
    task.

4
Problems with Known schemes
  • Stop-and-Copy wastes memory and has problem with
    VM systems.
  • Mark-and-sweep in stop-and-collect mode even if
    introduces lazy sweep - has marking delay.
  • On-the-fly (concurrent mutator and collector) -
    possible mutator starvation.

5
Mark-During-Sweep - terminology.
  • Roots in their usual meaning free list.
  • Mutator and collector (marker and sweeper).
  • Tricolor marking (whether by header bit or
    bitmap. Grey bit for mutator-marker cooperation).
  • No black cell can point to a white cell holds
    for mutator and marker (P1)

6
Mark-During-Sweep - terminology (cont)
  • Marker phase is finished when all Grey cell
    vanish.
  • Sweeper claims all white cells as garbage.
  • Two generations operation - sweeping current
    while marking the next.
  • Working schemes and (P1) hold for generation of
    the marker.

7
Mark-During-Sweep - terminology (cont).
  • Comparisons

8
The Algorithm - conventions.
  • Left(i), right(i), colourN (i), shadeN(i).
  • Cell is

9
The Algorithm - conventions (cont).
  • ShadeN(i) if the cell is white turn it to Grey.

10
The Marker.
11
The Marker. (cont)
  • Termination is ensured.
  • Not the very efficient to simplify proof.

12
The sweeper.
13
The Sweeper. (cont)
  • Shading is necessary for (P1).
  • WhiteN is necessary for the N2 marker.

14
The collector.
15
The Mutator.
  • Whenever an edge is redirected the target of the
    edge is shadeG1ed.
  • G1 is the generation of the current marker.

16
Case Analysis.
17
Incremental GC .
  • Memory size (M with 2M ptrs).
  • Mutator consumption speed (vE cells to unit of
    times)
  • Sweeper rate (rS ratio of reclaimed to swept
    cells in unit of time).
  • Free list length (L, and is instantenous ).
  • Marker rate (rM rate of marked/ visited).

18
Incremental GC. (cont)
  • No mutator starvation.
  • M/L cells to visit by the marker and the sweeper.
  • L regulate the time of the GC.
  • Two kind of real-time tasks can be identified.

19
Variants
  • Flip flops rather than incrementing G
  • Blackening instead of shading in the sweeper.
  • Using a global counter of Grey cells instead of
    rescanning the heap (marker).
  • Mark recursively as much as possible then collect
    left Greys.

20
Conclusions
  • An algorithm for real-time embedded systems that
    has predictable response time, guaranteed
    throughput and can work with narrow memories.
  • Mutator marker and sweeper run concurrently.

21
The END
Write a Comment
User Comments (0)
About PowerShow.com