What is the difference between process and thread?

Questions by Beena   answers by Beena

Showing Answers 1 - 12 of 12 Answers

anjani

  • Oct 4th, 2005
 

A process can have many threads

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

Neeraj Gulati

  • 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.

sunil1405

  • Feb 24th, 2006
 

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.

  Was this answer useful?  Yes

ganeshnaik2004

  • 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.

  Was this answer useful?  Yes

amit singh

  • 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.

namviet

  • Jun 20th, 2007
 

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.

uspinar

  • Jun 24th, 2008
 

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

sneha

  • 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

  Was this answer useful?  Yes

mohamed abdi ali(kurlibaax)

  • Dec 11th, 2015
 

A program has one more locus of execution.
Each execution is called a thread of execution.
the set of threads comprise a process.

  Was this answer useful?  Yes

kurlibaax

  • Dec 11th, 2015
 

A program has one more locus of execution.
Each execution is called a thread of execution.
the set of threads comprise a process.

  Was this answer useful?  Yes

kurlibaax

  • Dec 11th, 2015
 

A program has one more locus of execution.
Each execution is called a thread of execution.

  Was this answer useful?  Yes

Give your answer:

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

 

Related Answered Questions

 

Related Open Questions