Friday, January 30, 2009

Processes and Threads

When ever we turn pages of a book written on Microsoft Windows operating system or we read through web sites explaining the same we always get to hear these terms.. Processes.. Threads ?

Let me start with a question..  Can processes RUN ? My view is, it cant. :-)

Lets look at the defenition for the term Process provided in the 2003 Server resource kit help.

Process

A process is a running instance of an application or executable file, along with all the system resources that have been allocated to that instance. In general, a process is equivalent to a single application or service; for example, Microsoft Word runs in the Winword.exe process.
 

Thread

Each process is composed of a set of threads. A thread is a unit of work that runs simultaneously with other units of work on the computer; each process must have at least one thread.

Threads represent the basic unit of execution in an operating system. When a thread starts, the operating system Memory Manager allocates enough physical memory and page file space to allow the thread to run. While a thread is running, it can request additional memory to enable it to complete its task. When a thread ends, it releases the memory it was using back to the Memory Manager for reallocation.

So its thread that is run.. :-)

No comments:

Post a Comment