This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Threads Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Threads" Watch "Threads" New topic
Author

Threads

Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2573

What are user, daemon, worker and green threads. I know user and daemon, but what about the other two?
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Basically, green threads are JDK-provided threads and native threads are OS-provided threads. In clear, if your JVM uses green threads, there will only be one process as far as the OS is concerned, and the JVM is responsible for simulating the different threads of your application within its own thread.
If you use native threads, there will normally be one OS process per thread in your application.
Worker threads are just threads you use to carry out some task, kind of like,...,well, a worker thread
Read a little more about that here:
http://developer.java.sun.com/developer/qow/archive/97/


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Threads
 
Similar Threads
Daemon threads
DAEMON THREAD
regarding threads
what is daemon threads
Priority of Daemon threads