Sunday, January 8, 2012

Difference Between Process and Threads

May be you are trying to understand the concept of multithreading and multiprocessing and you have come across these two terms, process and threads. It might be confusing to understand these two but they differ. There is a difference between threads and process.

Usually in concurrent programming or mainly known as multitasking programming, we come across two units of execution and they are process and threads. They both are different but they relate to each other.

A process is an unit of execution. It can execute by itself in its own environment. This means that a process has its own and private resources that are required to execute. It has its own memory space. Multiprocess in different programming languages may be difficult to perform, so we perform multithreading.

A thread is also an unit of execution of a program. It provides the execution environment of a program. Threads has not enough resources to execute a program such as memory spaces and open files so it shares the resources provided by process. Threads, they always lie inside a process. Each process at-least has one thread and can contain as many.

process and Threads

As shown in this picture, a process can contain numerous threads. So whether you are studying Java or Visual basic or any other programming language, you must be aware of these concepts.

0 comments:

Post a Comment

You can Comment here. Please make some reasonable Comments. This Blog is Dofollow so get a backlink as a Gift.
Be Sure you use Name@Keywords
Using Keywords directly may make your comments difficult to get approved.

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Enter your email address: