Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , , , ,

Sponsored Links



Differentiation between Process and thread

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 29-01-2010
opaper's Avatar
Member
 
Join Date: May 2008
Posts: 2,362
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.
Reply With Quote
  #2  
Old 29-01-2010
MindSpace's Avatar
Member
 
Join Date: Feb 2008
Posts: 1,832
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.
Reply With Quote
  #3  
Old 29-01-2010
Modifier's Avatar
Member
 
Join Date: Jan 2008
Posts: 1,502
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.
Reply With Quote
  #4  
Old 29-01-2010
Praetor's Avatar
Member
 
Join Date: Apr 2008
Posts: 1,937
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.
Reply With Quote
  #5  
Old 29-01-2010
Member
 
Join Date: May 2008
Posts: 1,990
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.
Reply With Quote
  #6  
Old 29-01-2010
kelfro's Avatar
Member
 
Join Date: Apr 2008
Posts: 1,976
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
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


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


All times are GMT +5.5. The time now is 03:37 AM.