JVM Architecture & Garbage Collection

C:\Users\Gaurav\Downloads\java architecture\JVM Architecture.jpg

JVM Architecture

C:\Users\Gaurav\Downloads\java architecture\classloader.jpgclass loader in detail

C:\Users\Gaurav\Downloads\java architecture\java memory areas.jpg

java memory areas

C:\Users\Gaurav\Downloads\java architecture\runtime data areas.jpgruntime data areas – 2 covered out of 5

C:\Users\Gaurav\Downloads\java architecture\runtime data areas 2.jpg runtime data areas rest 3

C:\Users\Gaurav\Downloads\java architecture\execeution engine.jpg

Execution engine

Garbage collection basic

C:\Users\Gaurav\Downloads\java architecture\garbage collection 2.jpg

compartments in heap

C:\Users\Gaurav\Downloads\java architecture\garbage collection 3.jpg

Eden space starts filling with object and ones in dark are marked for garbage collection

C:\Users\Gaurav\Downloads\java architecture\garbage collection 4.jpg

Post that the other objects in green are moved to Survivor1 space with an incremented count [for further decision on whether to put them in old gen or not]

C:\Users\Gaurav\Downloads\java architecture\garbage collection 5.jpgEden space is filled and again marking happen in all survivor spaces

C:\Users\Gaurav\Downloads\java architecture\garbage collection 6.jpg

They are then moved to another survivor space. This helps in compacting[if not done they will occupy non contiguous blocks in memory – similar to defragmentation ]

C:\Users\Gaurav\Downloads\java architecture\garbage collection 7.jpg

Again the marking process marks in eden in survivor space

C:\Users\Gaurav\Downloads\java architecture\garbage collection 8.jpg

Finally moved to another survivor space

C:\Users\Gaurav\Downloads\java architecture\garbage collection 9.jpg

After they cross this threshold they can be moved here.

C:\Users\Gaurav\Downloads\java architecture\garbage collection 10.jpg

There are majorly 4 types of GC collectors

C:\Users\Gaurav\Downloads\java architecture\garbage collection 11.jpg

G1 introduced in 1.7

C:\Users\Gaurav\Downloads\java architecture\garbage collection 12.jpg

UI – CMS , Parallel – batch processing

C:\Users\Gaurav\Downloads\java architecture\garbage collection 13.jpg

overview

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *