What is Difference between thread and process?




Answers were Sorted based on User's Feedback



What is Difference between thread and process?..

Answer / swetcha

The major difference between threads and processes is
1.Threads share the address space of the process that
created it; processes have their own address.

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

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

4.Threads have almost no overhead; processes have
considerable overhead.

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

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

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

Is This Answer Correct ?    1072 Yes 75 No

What is Difference between thread and process?..

Answer / janet

Process is a program in execution where as thread is a
seperate path of execution in a program.

Is This Answer Correct ?    372 Yes 109 No

What is Difference between thread and process?..

Answer / munshimubbi

process is a execution of a program and program contain set
of instructions but thread is a single sequence stream
within the process.thread is sometime called lightweight
process. single thread alows a os to perform singler task
ata time similarities between process and threads are:
1)share cpu.
2)sequential execution
3)create child
4)if one thread is blocked then the next will be start to
run like process.
dissimilarities:
1)threads are not independent like process.
2)all threads can access every address in the task unlike
process.
3)threads are design to assist onr another and process
might or not might be assisted on one another.

Is This Answer Correct ?    159 Yes 59 No




What is Difference between thread and process?..

Answer / purushottam kumar

A Thread is a smallest execution unit of the Process.
While a process can have multiple threads.

Is This Answer Correct ?    111 Yes 41 No

What is Difference between thread and process?..

Answer / samantha jyesta

Process is nothing but a program in execution.where as
thread is a part of a process

Is This Answer Correct ?    37 Yes 10 No

What is Difference between thread and process?..

Answer / ankit tripathi

Technically, a thread is defined as an independent stream
of instructions that can be scheduled to run as such by the
operating system.
So, in summary, in the UNIX environment a thread:
o Exists within a process and uses the process
resources
o Has its own independent flow of control as long as
its parent process exists and the OS supports it
o Duplicates only the essential resources it needs to
be independently schedulable
o May share the process resources with other threads
that act equally independently (and dependently)
o Dies if the parent process dies - or something
similar
o Is "lightweight" because most of the overhead has
already been accomplished through the creation of its
process.


Whereas in case of process, every process has its own
memory management, two process cannot communicate without
using IPCS or Sockets, they do not share resources and
every process has its own process ID(pid).

Is This Answer Correct ?    65 Yes 40 No

What is Difference between thread and process?..

Answer / suman

Process is a memory block of an application instance.
Thread is a memory block of a process instance.

Is This Answer Correct ?    16 Yes 4 No

What is Difference between thread and process?..

Answer / prashant

Both threads and processes are methods of parallelizing
an application. However, processes are independent execution
units that contain their own state information, use their
own address spaces, and only interact with each other via
interprocess communication mechanisms (generally managed by
the operating system). Applications are typically divided
into processes during the design phase, and a master process
explicitly spawns sub-processes when it makes sense to
logically separate significant application functionality.
Processes, in other words, are an architectural construct.

By contrast, a thread is a coding construct that doesn't
affect the architecture of an application. A single process
might contains multiple threads; all threads within a
process share the same state and same memory space, and can
communicate with each other directly, because they share the
same variables.

Threads typically are spawned for a short-term benefit
that is usually visualized as a serial task, but which
doesn't have to be performed in a linear manner (such as
performing a complex mathematical computation using
parallelism, or initializing a large matrix), and then are
absorbed when no longer required. The scope of a thread is
within a specific code module—which is why we can bolt-on
threading without affecting the broader application.

ref: http://www.ibiblio.org/java/course/week11/02.html

Is This Answer Correct ?    14 Yes 3 No

What is Difference between thread and process?..

Answer / g.siva ganesh,thondangi

process is a program in execution whereas thread is a light
wight process and has separate path.

Is This Answer Correct ?    51 Yes 41 No

What is Difference between thread and process?..

Answer / rasika bhimate

process enable user to open and work sevral application at
same time,thread enables an application to perform more then
one task at a time.

Is This Answer Correct ?    11 Yes 6 No

Post New Answer



More Operating Systems General Concepts Interview Questions

Define latency, transfer and seek time with respect to disk I/O.

2 Answers   Brainware,


What is an idle thread?

1 Answers  


What has triggered the need for multitasking in PCs?

1 Answers  


What is the difference between Authoritative restore & Non- Authoritative restore?

1 Answers   Wipro,


what is Demand Paging?

2 Answers  






What are demand- and pre-paging?

4 Answers  


Write a function that responds to a click anywhere on the page by displaying an alert dialog. Display the event name if the user held Shift during the mouse click. Display the element name that triggered the event if the user held Ctrl during the mouse click.

0 Answers  


What are the basic functions of an Operating system?

1 Answers  


semaphore is

4 Answers   BFL,


What are the different functions of Syntax phase, Scheduler?

1 Answers   Teradata,


what is the relationship between page size and page table?

0 Answers  


Working for a logistics company, I need to know your suggestion which preferred processing technique for the computers of end users, multiprocessing or multitasking? and why?

2 Answers  






Categories