difference between thread and process
- From: neuneudr@xxxxxxxx
- Date: 26 Feb 2007 10:39:58 -0800
Hi,
I'd like to understand what's the difference between a
thread and a process and how this is related to Java's
threading mechanism.
For example it used to be that, under Linux, every Java
thread would appear as a single process (using the 'ps'
command that reports a snapshot of the current
processes).
One thing that I particularly don't understand is the
following: the Thread class's stop() method is
deprecated. And, sure enough, I've been able to
write quite some amount of multi-threaded Java
code without ever needing to brutally 'stop' threads.
Why does Windows provides a TerminateProcess()
and Unix a kill() facility to terminate/kill processes?
Is it bad programming style to call TerminateProcess()
and kill() ? If not, would it be bad to have in Java
a "correct" way to kill a Thread ? (not stop(), which is
broken, but something else?)
What makes these processes so fundamentally different
than Java threads that it is possible to terminate/kill
them?
.
- Follow-Ups:
- Re: difference between thread and process
- From: Eric Sosman
- Re: difference between thread and process
- Prev by Date: Re: Checking input for letters
- Next by Date: asp.net webservice j2me ?
- Previous by thread: Print Stream Manipulation:
- Next by thread: Re: difference between thread and process
- Index(es):
Relevant Pages
|