Tuesday 2 October 2012

Process vs Thread

Process vs Thread


         Put simply, a process may contain many threads.
In most multitasking operation systems, processes request their own memory space from the machine they are running on, while threads don't. Instead, they use only the amount of memory allocated to their parent process.
         For instance, a JAVA Virtual Machine runs in a single process on the operation system. Threads executed  on that Virtual Machine share the resources belonging to it. However, even though they share the same resource bank, each thread has their own stack space. This is how one thread's execution of a method is kept aside from another's.

No comments:

Post a Comment