Monday, April 23, 2012

Differences between threads and processes

  • Threads vs. Processes


 processes are independent execution units that contain their own state information, use their own address spaces, and only interact with each other via interprocess communication mechanisms (generally managed by the operating system)

Applications are typically divided into processes during the design phase, and a master process explicitly spawns sub-processes when it makes sense to logically separate significant application functionality.
Processes, in other words, are an architectural construct.


a thread is a coding construct that doesn't affect the architecture of an application.
A single process might contains multiple threads;
all threads within a process share the same state and same memory space, and can communicate with each other directly, because they share the same variables.

http://www.cafeaulait.org/course/week11/02.html




Threads share the address space of the process that  created it; processes have their own address.

Threads can directly communicate with other threads of its process;
processes must use interprocess communication to communicate with sibling processes.

http://erpbasic.blogspot.in/2012/03/what-is-difference-between-thread-and.html?goback=.gde_118012_member_102219377

No comments:

Post a Comment