Incremental Copying Collection with Pinning (Progress Report) - - PowerPoint PPT Presentation

incremental copying collection with pinning progress
SMART_READER_LITE
LIVE PREVIEW

Incremental Copying Collection with Pinning (Progress Report) - - PowerPoint PPT Presentation

Incremental Copying Collection with Pinning (Progress Report) Daniel Spoonhower Carnegie Mellon University spoons+@cs.cmu.edu (Joint work with Guy Blelloch and Robert Harper) January 12, 2004 SPACE 04 Incremental Copying Collection


slide-1
SLIDE 1

Incremental Copying Collection with Pinning (Progress Report)

Daniel Spoonhower Carnegie Mellon University

spoons+@cs.cmu.edu

(Joint work with Guy Blelloch and Robert Harper) January 12, 2004

SPACE ’04 – Incremental Copying Collection with Pinning (Progress Report) – p.1

slide-2
SLIDE 2

What? Why?

  • Real-time memory management
  • explicit
  • static analysis (e.g. region inference)
  • modern garbage collection ←

− this talk

  • Real-world constraints
  • e.g. object pinning
  • Tradeoffs in GC design
  • copying vs. non-copying collection

Use mostly-copying collection to balance competing design goals

SPACE ’04 – Incremental Copying Collection with Pinning (Progress Report) – p.2

slide-3
SLIDE 3

Background

  • Extension of Cheng et al. work [PLDI ’01]
  • bounds time and space consumed by GC
  • minimum mutator utilization
  • based on copying collection
  • Real-world environment – Rotor (a.k.a. SSCLI)
  • JIT + run-time + GC
  • pinned objects, finalizers, &c.
  • Goal:
  • single framework supporting both performance

and semantics

SPACE ’04 – Incremental Copying Collection with Pinning (Progress Report) – p.3

slide-4
SLIDE 4

Mostly-Copying Collection

  • Bartlett [TR ’88]
  • ambiguous roots (i.e. untyped stack values)
  • Pinned objects are “uncooperative”
  • only roots are pinned
  • Mostly-copying collection
  • heap divided into pages
  • from- and to-space defined logically
  • ambiguous/pinned roots promoted “in-place”

SPACE ’04 – Incremental Copying Collection with Pinning (Progress Report) – p.4

slide-5
SLIDE 5

Mostly-Copying Collection

divide heap into pages. . .

SPACE ’04 – Incremental Copying Collection with Pinning (Progress Report) – p.5

slide-6
SLIDE 6

Mostly-Copying Collection

. . . allocate. . .

SPACE ’04 – Incremental Copying Collection with Pinning (Progress Report) – p.5

slide-7
SLIDE 7

Mostly-Copying Collection

. . . begin collection. . .

SPACE ’04 – Incremental Copying Collection with Pinning (Progress Report) – p.5

slide-8
SLIDE 8

Mostly-Copying Collection

. . . promote (by copy). . .

SPACE ’04 – Incremental Copying Collection with Pinning (Progress Report) – p.5

slide-9
SLIDE 9

Mostly-Copying Collection

. . . pinned. . .

SPACE ’04 – Incremental Copying Collection with Pinning (Progress Report) – p.5

slide-10
SLIDE 10

Mostly-Copying Collection

. . . page promotion!

SPACE ’04 – Incremental Copying Collection with Pinning (Progress Report) – p.5

slide-11
SLIDE 11

Tradeoffs

  • Copying collectors
  • simple / fast allocation
  • better asymptotic time
  • may improve locality
  • Non-copying collectors
  • conservative collection
  • pinning
  • less space
  • large and older objects

SPACE ’04 – Incremental Copying Collection with Pinning (Progress Report) – p.6

slide-12
SLIDE 12

Other Applications

  • Large objects
  • occupy one or more pages
  • expensive to copy, often long lived
  • promote in-place
  • Dense pages
  • many reachable objects
  • little fragmentation

⇒ little to be gained from compaction

SPACE ’04 – Incremental Copying Collection with Pinning (Progress Report) – p.7

slide-13
SLIDE 13

Page Residency

(or Density or Occupancy) = % of page that is reachable

  • Estimation
  • heuristic: measure during previous cycle
  • compacted pages → 100%
  • promoted pages as measured
  • young pages → 0%
  • Residency threshold
  • determines when to promote by copy / in-place
  • causes behavior to range from semi-space to

mark-sweep

SPACE ’04 – Incremental Copying Collection with Pinning (Progress Report) – p.8

slide-14
SLIDE 14

Preliminary Results

  • Effectiveness of promotion strategy
  • fraction of promotion in-place
  • error in estimate (as % of in-place)

Benchmark Page Promoted Estimate Error huffman 90.03% 0.04% xml 51.89% 10.36% splay 70.25% 11.86%

SPACE ’04 – Incremental Copying Collection with Pinning (Progress Report) – p.9

slide-15
SLIDE 15

Continuing Work

  • Continued analysis
  • Experiments
  • Incremental, concurrent, parallel collection
  • Impact of other language features on GC

SPACE ’04 – Incremental Copying Collection with Pinning (Progress Report) – p.10