Java Threads Question:

What is a green thread?

Tweet Share WhatsApp

Answer:

A green thread refers to a mode of operation for the Java Virtual Machine (JVM) in which all code is executed in a single operating system thread. If the Java program has any concurrent threads, the JVM manages multi-threading internally rather than using other operating system threads.

There is a significant processing overhead for the JVM to keep track of thread states and swap between them, so green thread mode has been deprecated and removed from more recent Java implementations. Current JVM implementations make more efficient use of native operating system threads.

Download Java Threads PDF Read All 38 Java Threads Questions
Previous QuestionNext Question
Which class is the wait() method defined in?What is a working thread?