What is the difference between the two? (Note this is not for class just curious as to what the difference is).
Marilyn de Queiroz
Joined: Jul 22, 2000
Threads are more lightweight. You can have many threads in a process.
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Joined: Jan 29, 2003
To overgeneralize ...
Processes are started by the operating system. There is quite a bit of startup and teardown overhead. They offer good safety and isolation from each other, the downside of which is it's harder to make them communicate with each other.
Threads are managed by a program running in a process. They are lighter weight to startup and teardown, but is still non-zero overhead so you can do too many and drag things down. There are many neat language-specific ways for threads to communicate; Java has things like wait, notify, join built in and the whole new concurrent package to play with.
Those definitions of process and thread are not necessarily true on every platform and language. If you talk about them in a conversation and don't seem to be saying the same thing as the other person, back up and get agreement on what you really mean. [ October 18, 2005: Message edited by: Stan James ]
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi