Garbage First Garbage Collection外文翻译、在线看_第1页
Garbage First Garbage Collection外文翻译、在线看_第2页
Garbage First Garbage Collection外文翻译、在线看_第3页
Garbage First Garbage Collection外文翻译、在线看_第4页
Garbage First Garbage Collection外文翻译、在线看_第5页
已阅读5页,还剩36页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

vincew@tection©

2008

Cisco

Systems,

Inc.

All

rights

reserveCdi.sco

ConfidentialPresentation_ID1AgendaIssues

in

GCOverview

on

G1Inside

G1

(Evacuation)Inside

G1

(Concurrent

Mark,

aka

CM)Advance

TopicsIssues

in

GCLong

PauseGC

timeApplication

TimeToo

long

to

affordFragmentationHeapPopular

Garbage

Collectors

(I)GenerationalyoungoldheapYoungor

old

are

themin

GC

unit.

The

grain

sizeIs

very

large.Popular

Garbage

Collectors

(II)CMSfragmentation

CMS

with

compactionlong

pauseOverview

on

G1What

can

we

get

from

G1

(I)1.

Control

Pause

Time

2.

Control

GC

IntervalGC

timeApplication

TimeWhat

can

we

get

from

G1

(II)The

Goals

of

G1:Max

Pause

TimePause

IntervalMemory

FragmentationG1

does

not

promise

the

first

two

Goals

will

bmet,

only

try

to

meet.When

to

adopt

G1

(I)Born

forServersWhen

to

adopt

G1

(II)Heap

is

largeCan’t

afford

long

pause

timeFragmentation

is

a

concern.How

G1

looks

like?Heap

is

divided

intofixed-size

regions,Some

as

young,Some

as

old.Heapfree

youngoldInside

G1(Evacuation)How

to

identify

live

objects

in

a

region

(Remember

SetABCDRegion

1Region

2Region

3How

to

identify

live

objects

in

a

region

(

Each

heap

region

is

associated

with

a

datastructure

named

remember

set.

A

Remember

set

contains

pointers

into

thiregion

from

other

regions.How

to

collect

(evacuate)Region

ARegion

BMove

the

live

objects

in

a

region

to

anotherregion.Remember

the

third

goal

of

G1

?Which

regions

will

be

evacuated

(I)Garbage

FirstThe

regions

with

the

largest

garbagewill

be

evacuated.Which

regions

will

be

evacuated

(II)Full

YoungAll

and

Only

youngregions

are

put

intocollection

setCollectionSetWhich

regions

will

be

evacuated

(3)Partial

YoungAll

young

regionsand

some

old

regionswith

largest

garbageare

put

intocollection

set.CollectionSetWhen

to

Full

YoungWhen

the

garbagein

old

region

is

littlegarbageold

regionsWhen

to

Partial

YoungWhen

the

live

objectsin

old

region

is

littlelive

objectsold

regionsWhen

to

evacuateYoungRegions>=

MAX_YOUNG?How

much

MAX_YOUNG

should

be

(I)MAX_YOUNG

determine:1.

Pause

Time2.

GC

intervalGC

timeApplication

TimeHow

much

MAX_YOUNG

should

be

(I)Remember

the

first

two

goals

of

G1?Have

you

already

knowhow

much

MAX_YOUNG

should

be?How

much

MAX_YOUNG

should

be

(III)Partial

YoungAs

small

as

possible,

but

not

violate1.

Pause

Time2.

GC

intervalGC

timeApplication

TimeHow

much

MAX_YOUNG

should

be

(IV)Full

YoungAs

large

as

possible,

but

not

violate1.

Pause

Time2.

GC

intervalGC

timeApplication

TimeHow

much

MAX_YOUNG

should

be

(V)Conflict

between

Pause

Time

and

GC

IntervalIf

Conflict,

meet

GC

Interval

firstl1.

Pause

Time2.

GC

intervalGC

timeApplication

TimeInside

G1(Concurrent

Mark,aka

CM)Why

CM

needed

(I)Is

Live?ABCDRegion

1Region

2Region

3Why

CM

needed

(I)Update

remember

setCount

live

objects

for

each

regionsHow

CM

looks

like

(I)initial

markconcurrent

markremarkApplication

ThreadGC

ThreadHow

CM

looks

like

(II)Initial

(stop

the

world)mark

objects

that

is

reachable

directly

from

root

setConcurrentconcurrent

mark

live

objectsFinal

(stop

the

world)follow

references

changed

in

phase

2When

to

CM

(I)

Used

memory

exceedsthe

thresholdUSEDFREEInitiatingHeapOccupancyPercent*

HeapCapacityWhen

to

CM

(II)

And

used

memoryis

larger

than

usedmemory

after

lastcollectioncurrentlastUSEDFREEUSEDFREEAdvance

TopicsCard

Tablecardcard

tablefind

the

first

object

in

a

cardForward

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论