in Technology by
What is the difference between Serial and Throughput Garbage collectors?

1 Answer

0 votes
by

Serial Garbage collector is a stop the world GC which stops application thread from running during both minor and major collection. Serial Garbage collector can be enabled using JVM option -XX:UseSerialGC and it's designed for Java application which doesn't have pause time requirement and has client configuration. 

The Serial Garbage collector also defaulted GC in JDK 1.4 before ergonomics was introduced in JDK 1.5. Serial GC is most suited for small applications with fewer threads while throughput GG is more suited for large applications. On the other hand Throughput garbage collector is a parallel collector where minor and major collection happens in parallel taking full advantage of all the system resources available like multiple processors. 

Though both major and minor collection runs on stop-the-world fashion and introduced pause in the application. Throughput Garbage collector can be enable using -XX:UseParallelGC or -XX:UseOldParallelGC. 

Related questions

0 votes
    Which of the following is a garbage collection technique? (a) Cleanup model (b) Mark and sweep model ... questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    What happens to the thread when garbage collection kicks off? (a) The thread continues its operation (b) ... questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    Which of these methods initiates garbage collection? (a) gc() (b) garbage() (c) garbagecollection() ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    In the transfer of file between server and client, if the transmission rates along the path is 10Mbps, 20Mbps, 30Mbps, ... ___________. A. 20Mbps B. 10Mbps C. 40Mbps D. 50Mbps...
asked Jan 8, 2023 in Technology by JackTerrance
0 votes
    What is the difference between a constructor and a method?...
asked Feb 9, 2023 in Technology by JackTerrance
0 votes
    What is the difference between method overloading and method overriding?...
asked Feb 9, 2023 in Technology by JackTerrance
0 votes
    What is the difference between length() and size() of ArrayList? (a) length() and size() return ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    What is the difference between TreeSet and SortedSet? (a) TreeSet is more efficient than SortedSet (b) ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    What is difference between dequeue() and peek() function of java? (a) dequeue() and peek() remove ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    What is the difference between Queue and Stack? (a) Stack is LIFO; Queue is FIFO (b) Queue is ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    How to get difference between two dates? (a) long diffInMilli = java.time.Duration.between(dateTime1, ... questions and answers pdf, java interview questions for beginners...
asked Oct 28, 2021 in Education by JackTerrance
0 votes
    What is the difference between ParNew and DefNew Young Generation Garbage collector?...
asked Apr 4, 2023 in Technology by JackTerrance
0 votes
    Name different types of dust collectors?...
asked Feb 3, 2021 in Technology by JackTerrance
0 votes
    What are Statistics collectors in Java 8?...
asked Nov 8, 2020 in Education by Editorial Staff
0 votes
    What are collectors in Java 8?...
asked Nov 8, 2020 in Education by Editorial Staff
...