GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Operating System  >  Windows & Unix
Go To First  |  Previous Question  |  Next Question 
 Windows & Unix  |  Question 54 of 110    Print  
What is the difference between process and thread?

  
Total Answers and Comments: 7 Last Update: June 24, 2008     Asked by: Beena 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
October 04, 2005 02:34:33   #1  
anjani        

RE: What is the difference between process and thread....

A process can have many threads

so to perform a task faster we break the process in threads.


 
Is this answer useful? Yes | No
October 24, 2005 06:36:55   #2  
Neeraj Gulati        

RE: What is the difference between process and thread....

Creation of new process requires new resources and Address space whereas the thread can be created in the same address space of the process which not only saves space and resources but are also easy to create and delete,and many threads can exhists in a process.


 
Is this answer useful? Yes | No
February 24, 2006 06:32:15   #3  
sunil1405 Member Since: February 2006   Contribution: 1    

RE: What is the difference between process and thread....

Process is some job or task which is running in background.

while a thread is a single line of execution in a programs , so many threads can be there in a program.


 
Is this answer useful? Yes | No
June 02, 2006 08:48:59   #4  
ganeshnaik2004        

RE: What is the difference between process and thread....
Parent & child process have different Code, Data & Test segments. But two threads of the same process share the Code & Data segments and have separate stacks.
 
Is this answer useful? Yes | No
August 01, 2006 06:55:50   #5  
amit singh        

RE: What is the difference between process and thread....
A thread is a stream of instructions which can be scheduled independently(i.e it has its own program counter and stack).But a thread shares its resources like program code,directories and global data with the calling process.A process on the other hand has its own copy of both resources and scheduling information.A process can have many threads,basically threads are called light weight processes.
 
Is this answer useful? Yes | No
June 20, 2007 09:23:21   #6  
namviet        

RE: What is the difference between process and thread?...
Differences Between Threads and Processes

Threads share the address space of the process that created it; processes have their own address.

Threads have direct access to the data segment of its process; processes have their own copy of the data segment of the parent process.


Threads can directly communicate with other threads of its process; processes must use inter-process communication to communicate with sibling processes.

Threads have almost no overhead; processes have considerable overhead.

New threads are easily created; new processes require duplication of the parent process.

Threads can exercise considerable control over threads of the same process; processes can only exercise control over child processes.

Changes to the main thread (cancellation, priority change, etc.) may affect the behavior of the other threads of the process, changes to the parent process does not affect child processes.


Both have an id, set of registers, state, priority, and scheduling policy.

Both have attributes that describe the entity to the OS.

Both have an information block.

Both share resources with the parent process.

Both function as independent entities from the parent process.

The creator can exercise some control over the thread or process.

Both can change their attributes.

Both can create new resources.

Neither can access the resources of another process.


 
Is this answer useful? Yes | No
June 24, 2008 13:39:44   #7  
uspinar Member Since: June 2008   Contribution: 1    

RE: What is the difference between process and thread?
Operating system is aware of process, it can see the processes. But operating system is NOT aware of thread, do not see them.

Threads are only visible in processes, created by the user within user space. Think like process is a bucket for threads and a process may have multiple threads.

**And most importantly if there is no process there can not be any thread.**

Pinar Uyanik

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape