Friday, October 7, 2011

What is the difference between process and thread?

Both processes and threads are independent sequences of execution. The typical difference is that threads (of the same process) run in a shared memory space while processes run in separate memory spaces.

All the threads running within a process share the same address space, file descriptor, stack and other process related attributes. onthe other hand, each process has thier own virtual address space, executable code, open handles to system objects, a security context, a unique process identifier, environment variables, a priority class, minimum and maximum working set sizes, and at least one thread of execution.

No comments :