Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

263
Visualizações
Java GC - Is Minor GC Collection a STW event?

Does GC need to “Stop The World” for Minor GC or only for Full GC? As I understand, a minor GC will happen when there is no space available in EDEN to allocate an object, so does that mean that for each minor GC there will be a STW event?

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

The answer is "it depends".

With most modern Java collectors, a minor (young / Eden space) collection is indeed a stop-the-world collection. This is not a direct logical consequence of minor GC's being triggered by a young space filling up. (Other strategies are possible for triggering a minor GC, or for dealing with a young space filling up.) Rather it is just ... they way that most Java GCs are implemented.

One exception is ZGC which is not generational. Hence there is no such thing as a minor collection. Instead, when the GC is triggered there is a short (less than 10ms) stop the world event while the GC roots are found. A second exception is the Shenandoah GC, which is likewise not generational.

(And of course, the original Java 1.1 GC was a mark-sweep collector, non-generational and stop-the-world.)

over 4 years ago · Santiago Trujillo Relatório

0

After reading several books I found that a Minor GC is always a Stop The World event, which will stop all the application threads and will normally have a short duration, as opposed to a GC pause for Full GC, which will take considerably much more time because it will run on Both Young and Old generations. So both Minor GC and Full GC are always Stop the World events.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda