This content has been marked as final. Show 4 replies
The specifics depend upon the environment, but the most conspicuous difference is that threads within a process have access to the same address space.
In practice in Java this means that the threads within a process can access each others' public fields and methods.
Processes are at the operating system level. Threads are within the JVM. Generally threads are very "lightweight" with few resources to themselves whereas processes are heavyweight, and have their own memory mapping etc..
You won't see any information about threads outside of the JVM.
You won't see any information about threads outside of the JVM.Not sure what you mean by this, but it's not really true by any of the interpretations I can think of. Only "green" threads are managed by the JVM, any other sort will be visible to the OS kernel and thus potentially or actually available to diagnostic tools "outside" the JVM.
(Edit) E.g. on Linux to see all the threads try:
ps -eLfEdited by: dcminter on 04-Aug-2008 14:23