GeekInterview.com
Series: Subject: Topic:
Question: 90 of 143

What is the difference between process and thread?

Asked by: Beena | Member Since Sep-2005 | Asked on: Sep 16th, 2005

View all questions by Beena   View all answers by Beena

Showing Answers 1 - 9 of 9 Answers
anjani

Answered On : Oct 4th, 2005

A process can have many threadsso to perform a task faster we break the process in threads.

Yes  1 User has rated as useful.
  
Login to rate this answer.
Neeraj Gulati

Answered On : Oct 24th, 2005

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.

Yes  1 User has rated as useful.
  
Login to rate this answer.
sunil1405

Answered On : Feb 24th, 2006

View all answers by sunil1405

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.

  
Login to rate this answer.
ganeshnaik2004

Answered On : Jun 2nd, 2006

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.

  
Login to rate this answer.
amit singh

Answered On : Aug 1st, 2006

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.

Yes  1 User has rated as useful.
  
Login to rate this answer.
namviet

Answered On : Jun 20th, 2007

Differences Between Threads and ProcessesThreads 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.

Yes  2 Users have rated as useful.
  
Login to rate this answer.
uspinar

Answered On : Jun 24th, 2008

View all answers by uspinar

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

Yes  1 User has rated as useful.
  
Login to rate this answer.
crazy19892002

Answered On : Jul 29th, 2009

View all answers by crazy19892002

Process is program that is in execution, but threads are the division of process in multiple task simultaneously.

  
Login to rate this answer.
sneha

Answered On : Aug 23rd, 2011

A process is a collection of one or more threads

thread is a subset of a process

multitasking of two or more process is known as process based multitasking

multitasking of two or more threads is known as thread based multitasking

process is controlled by the operating system

threads are controlled by programmer in a program

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.