Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Algorithms used by JDK 8 until JDK 12

Sumit Rawal answered on May 21, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers


Algorithms used by JDK 8 until JDK 12

0

Java Development Kit (JDK) 8 to 12 comes with different garbage collection algorithms that can be used depending on the application requirements. The default GC algorithm changed from JDK 8 to JDK 12. Here is a summary of the algorithms used by JDK 8 to JDK 12:

JDK 8:

Serial GC: This is the default GC algorithm in JDK 8. It is a simple, single-threaded, stop-the-world algorithm that uses a mark-sweep-compact approach. It is suitable for small applications or applications with a small amount of data.

Parallel GC: This is a multi-threaded GC algorithm that uses a similar approach to the Serial GC but with multiple threads to perform marking, sweeping, and compacting. It is suitable for applications that require higher throughput and can benefit from parallelism.

CMS GC: The Concurrent Mark Sweep (CMS) GC is a concurrent GC algorithm that performs garbage collection concurrently with the application’s execution. It uses a mark-sweep approach and is suitable for applications that require low latency and can tolerate some fragmentation.

JDK 9:

G1 GC: Garbage First (G1) is a parallel, concurrent, and compacting GC algorithm that is designed to provide high throughput and low latency. It divides the heap into regions and performs GC on each region separately. It is suitable for large applications with a large amount of data and can handle applications with mixed types of objects.

JDK 10:

G1 GC (default): Starting from JDK 10, the G1 GC became the default GC algorithm.

JDK 11:

Epsilon GC: This is a no-op GC algorithm that can be used for testing or performance benchmarking. It does not perform any garbage collection and allows applications to run without any memory management overhead.

JDK 12:

Shenandoah GC: This is a concurrent, low-pause-time GC algorithm that uses a unique approach called “concurrent evacuation.” It is designed to provide low latency for large heap sizes and is suitable for applications that require predictable and consistent response times.

G1 GC (default): Starting from JDK 12, the default GC algorithm is still G1 GC.

It is important to note that JDK also offers different GC tuning options that can affect the GC algorithm’s behavior and performance. 

Popularity 1/10 Helpfulness 1/10 Language java
Source: Grepper
Tags: java
Link to this answer
Share Copy Link
Contributed on May 21 2023
Sumit Rawal
0 Answers  Avg Quality 2/10


X

Continue with Google

By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
X
Grepper Account Login Required

Oops, You will need to install Grepper and log-in to perform this action.