This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Threads and Synchronization and the fly likes Differences between Process and Thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Differences between Process and Thread" Watch "Differences between Process and Thread" New topic
Author

Differences between Process and Thread

Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1849
Lets list down the differences between the two in this thread!!
V Srinivasan
Ranch Hand

Joined: Aug 16, 2000
Posts: 99
Can we say
Process is purely CPU's action
Thread manipulates the CPU's idle time
Marcela Blei
Ranch Hand

Joined: Jun 28, 2000
Posts: 477
Originally posted by V Srinivasan:
Process is purely CPU's action
Thread manipulates the CPU's idle time

Yes, but a Thread manages one single process
Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1849
Differences between a thread and a Process
1) It takes less overhead to create and destroy individual threads than it does individaual process which is why all modern operating systems support multithreading
2) IPC (Inter Process communication) is much slower and more restrictive than communication between threads
3) Each process has a complete set of its own variables while threads share the same data.
Regds.
Rahul P. Mahindrakar
Prabhjyot Singh
Greenhorn

Joined: Dec 28, 2000
Posts: 22
Methods like yield(),wait() are provided for IPC in java.Thus they cater to different threads inside the same ONE process.Multiple concurrent processes are supported in modern os's in process control blocks are created by the os track their addresses.Sharing of data is expensive between processes,the familiar consumer-producer processes ascompared to threads within a single process coz of faster context switching.Hope it helps.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Differences between Process and Thread
 
Similar Threads
Difference between Thread-Safe and Synchronization
Servlets Container
thread that sleeps and thread that waits
Thread vs Runnable
Thread and Process