Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Mark DURING Sweep rather than Mark then Sweep Presented by Ram Mantsour Authors: Chrisitan Queinnec, Barbara Beaudoing, Jean-Pierre Queille."— Presentation transcript:

1

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

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

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

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

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

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

8 Mark-During-Sweep - terminology (cont). n Comparisons:

9 The Algorithm - conventions. n Left(i), right(i), colour N (i), shade N (i). n Cell is :

10 The Algorithm - conventions (cont). n Shade N (i): if the cell is white turn it to Grey.

11 The Marker.

12 The Marker. (cont) n Termination is ensured. n Not the very efficient to simplify proof.

13 The sweeper.

14 The Sweeper. (cont) n Shading is necessary for (P1). n White N is necessary for the N+2 marker.

15 The collector.

16 The Mutator. n Whenever an edge is redirected the target of the edge is shade G+1 ed. n G+1 is the generation of the current marker.

17 Case Analysis.

18 Incremental GC. n Memory size (M with 2*M ptrs). n Mutator consumption speed (v E cells to unit of times) n Sweeper rate (r S ratio of reclaimed to swept cells in unit of time). n Free list length (L, and is instantenous ). n Marker rate (r M rate of marked/ visited).

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

20 Variants nFnFlip flops rather than incrementing G nBnBlackening instead of shading in the sweeper. nUnUsing a global counter of Grey cells instead of rescanning the heap (marker). nMnMark recursively as much as possible then collect left “Greys”.

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

22 The END


Download ppt "Mark DURING Sweep rather than Mark then Sweep Presented by Ram Mantsour Authors: Chrisitan Queinnec, Barbara Beaudoing, Jean-Pierre Queille."

Similar presentations


Ads by Google