• Post Reply Bookmark Topic Watch Topic
  • New Topic

process & thread

 
eswar kumar
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the difference between a Process and a Thread?
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In common usage (but not legally binding, so you will find exceptions) a process is a large-grained thing started by the operating system. When we start a Java program, the OS starts the JVM as a process. A thread is a finer grained thing inside the process, managed by the process. So the JVM can manage many threads inside its process.
Another thing you hear about thread & process is that a process is "heavyweight" meaning the OS uses a lot of setup and resources and time to get one going, while threads are "lightweight" and can be managed with much less memory and time cost.
Did that help?
 
eswar kumar
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanQ James
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!