Describe the difference between a Thread and a Process?
Answers were Sorted based on User's Feedback
Answer / chandra sekhar dola
- A Process has its own memory space, runtime enivorment
and process ID. A Thread runs inside a Process and shares
its resources with other threads.
- A thread is a path of execution that run on CPU,
a proccess is a collection of threads that share the same
virtual memory. A process have at least one thread of
execution, and a thread always run in a process context.
- Process is unit of allocation while Thread is
unit of execution. Each process has one or more threads.
Each thread belong to one process
| Is This Answer Correct ? | 13 Yes | 3 No |
Answer / saisudhakar
exact it is right.
Thanks a lot
after a long time i found the answer for this question.
thankx
saisudhakar
| Is This Answer Correct ? | 4 Yes | 2 No |
Answer / anubhav
Q. What is the diff b/w Thread and Process?
Solution:
A Process has its own memory space, runtime environment
and process ID. A Thread runs inside a Process and shares its resources
with other threads.
Thread is a path of execution that run on CPU,a proccess is a collection
of threads that share the same virtual memory. A process have at least one thread of execution, and a thread always run in a process context.
Process is unit of allocation while Thread is unit of execution. Each process has one or more threads. Each thread belong to one process
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.
8. Thread is light weight process having its own stack but collection of related threads can share same execution memory. process is program or part of program under execution .every process can have its own execution environment.
9. A thread is code that is to be serially executed within a process. A process is a collection of virtual memory space, code, data, and system resources.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / saiish bhat
Thread is the path of execution that run on cpu.
process is a collection of threads that share the same
virtual memory.
| Is This Answer Correct ? | 4 Yes | 3 No |
How to use class library reference in asp.net project? Can you give me the example with source Class library haves classes like Database, insert, update, delete, reflection how can i use the database class connection in insert class to insert the record in to the Main Project in asp.net.
What are the new features implemented in ASP.NET?
I have a method written in WebForm (means .aspx page) & now I want to call this method in WebUserControl (means .ascx page) what should I have to do?
Explain the difference between the web config and machine config.
what is soap?
5 Answers Cognizant, Microsoft, NCR,
How does session state work in asp.net?
difference between <connectionstring> <Appsetting>
what is reference type to value type.
What is cyclomatic complexity and why is it important?
what is the difference between assemblyinfo and webconfig files?
What is view state and how it works in asp net?
What are Caching techniques in .NET
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)