Connecting Tech Pros Worldwide Forums | Help | Site Map

Threads

Newbie
 
Join Date: Jan 2007
Posts: 13
#1: Jan 13 '07
Hi all,

can u explain about threads clearly........

what is difference between thread and process?

rickumali's Avatar
Newbie
 
Join Date: Dec 2006
Location: Arlington, MA, USA
Posts: 20
#2: Jan 13 '07

re: Threads


Think of a thread as a "process within a process." It's a separate branch of your program doing other things while your main program is doing its work. For the Wiki's take on "threads", visit:

http://en.wikipedia.org/wiki/Thread_(computer_science)

It's a big topic, as you may have guessed. I'm sure others will chime in.
ramudukamudu's Avatar
Newbie
 
Join Date: Jan 2007
Posts: 16
#3: Jan 13 '07

re: Threads


Quote:

Originally Posted by Geevi

Hi all,

can u explain about threads clearly........

what is difference between thread and process?

Both threads and processes are meant for efficient resource usage. The main diffrence between them is the way they handle with data.

Process: Each process has seperate image in memory. They maintain the data independently. Processes communicate with each other using IPC methods(Interrupts,signals,pipes...etc).
Threads: Threads spawn by a process will share the data. So there could be some problem while accessing the data.(critical section problem). Semaphores, Mutexs are used to resolve these problems.
Reply