|
| |||||||||
| Tags: process, process vs thread, thread, thread vs process, what is thread, what process |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| ||||
| ||||
| Differentiation between Process and thread
Hello friends, I am beginner in the programming field. I have too much confusion between the process and thread. For me both thread and process comprises same meaning. I am not able to get difference between process and thread. If you knows about the process and thread very well, then please share you knowledge with me. So that it will be easy for me to understand the differentiation process and thread. I would greatly appreciate your help. |
|
#2
| ||||
| ||||
| Re: Differentiation between Process and thread
Hi, Process comprises its own address space and which means that it can't access variables or data structures belonging to a different process Threads are able to make communication with other threads of its process; process uses inter process communication for to make communication with sibling processes. Threads share the same stack and same memory space. Thread is light weight process while process is an thread under execution.Thread is a part of process while each process runs one default (main) thread. New threads are easily created; new processes require duplication of the parent process. |
|
#3
| ||||
| ||||
| Re: Differentiation between Process and thread
A process has its own memory space, its own stack that does not share with others. Processes can only exercise control over child processes. Threads do not share the same cell, they share the same resources, the same open files, the same global variables. By cons each thread has its own stack. Threads have almost no overhead; processes have considerable overhead. A process is a collection of virtual memory space, code, data, and system resources. |
|
#4
| ||||
| ||||
| Re: Differentiation between Process and thread Threads unlike Share-net the same process address space, a process can contain multiple threads (at least 1) but a thread belongs to a single process. There is also a difference next synchronization for threads it should use critical sections, when a sync process between using semaphores. A process can have multiple threads and process runs in a thread. Threads can exercise considerable control over threads of the same process while the processes can only exercise control over child processes. |
|
#5
| |||
| |||
| Re: Differentiation between Process and thread
Hi friend, A process has an execution stack (storage function calls with their variables ), a data segment (global and static variables) and a segment of code (machine instructions ). For an operating system, it is faster to switch from one thread to another. It is easier to run many threads at once that many processes at once. So when you create a thread, only the stack is "copied". Single thread allows a operating systems for to perform single task at a time similarities between process and threads. |
|
#6
| ||||
| ||||
| Re: Differentiation between Process and thread
Hi, Following are some advantages as well as the disadvantages of 'Threads': Advantages: * CPU (overhead) reduced * Reduced memory consumption Disadvantages: * Much more difficult to debug * More difficult to develop |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Differentiation between Process and thread" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Synchronize a producer thread and a consumer thread in C# | Ayuka | Software Development | 6 | 10-11-2010 04:04 AM |
| Differentiation between XML and PHP | Gokul20 | Software Development | 5 | 10-03-2010 03:43 PM |
| Thread vs Process | ramsun | Software Development | 5 | 23-02-2010 08:05 PM |
| Differentiation between WAN and LAN | Dolsy_bendal | Networking & Security | 4 | 30-11-2009 10:46 AM |
| How to terminate Process and Delete the Source Program with Ultimate Process Killer | jackalz | Tips & Tweaks | 1 | 26-03-2009 07:31 PM |