What is the difference between a Thread and a Process in the Java context? How is inter-Process communication and inter-Thread communication achieved in Java? Please point m
A thread can access memory inside a process, even memory that could be manipulated by another thread within the same process. Since all threads are internal to the same running process, they can communicate more quickly (because they don't need the operating system to referee).
A process cannot access memory inside another process, although you can communicate between processes through various means like:
The important thing to remember with process to process communication is that the communication must be managed through the operating system, and like all things which require a middle man, that adds overhead.
On the downside, if a thread misbehaves, it does so within the running process, and odds are high it will be able to take down all the well behaving threads. If a process misbehaves, it can't directly write into the memory of the other processes, and odds are that only the misbehaving process will die.