Professional Documents
Culture Documents
This article includes a list of references or external links, but its sources remain
unclear because it has insufficient inline citations. Please help to improve this article
by introducing more precise citations where appropriate. (December 2009)
This article is about the concurrency concept. For the form of code consisting entirely of subroutine calls,
see Threaded code. For the collection of posts, see Internet forum#Thread.
In computer science, a thread of execution results from a fork of a computer program into two or
more concurrently running tasks. The implementation of threads and processes differs from one operating
system to another, but in most cases, a thread is contained inside a process. Multiple threads can exist
within the same process and share resources such as memory, while different processes do not share
these resources.
What is Process?
A process is a program that is running on your computer. This can be anything from a small
background task, such as a spell-checker or system events handler to a full-blown
application like Internet Explorer or Microsoft Word. All processes are composed of one or
more threads.
Since most operating systems have many background tasks running, your computer is likely
to have many more processes running than actual programs. For example, you may only
have three programs running, but there may be twenty active processes. You can view
active processes in Windows by opening the Task Manager (press Ctrl-Alt-Delete and click
Task Manager). On a Mac, you can see active processes by opening Activity Monitor (in the
Applications->Utilities folder).
The term "process" can also be used as a verb, which means to perform a series of
operations on a set of data. For example, your computer's CPU processes information sent
to it by various programs.
What is the difference between a computer process and thread?
In: Computer Terminology, Computer Programming [Edit categories]
[Improve]
A single process can have multiple threads that share global data and address space with other
threads running in the same process, and therefore can operate on the same data set easily.
Processes do not share address space and a different mechanism must be used if they are to share
data.
If we consider running a word processing program to be a process, then the auto-save and spell check
features that occur in the background are different threads of that process which are all operating on
the same data set (your document).
process
Thread
A single process may contain several executable programs (threads) that work together as a coherent
whole. One thread might, for example, handle error signals, another might send a message about the
error to the user, while a third thread is executing the actual task of the...
Answer
The memory space, where a given application is executed is called - process. A Process is the memory
set aside for an application to be executed in.
Within this process the thing, which is really executed is the thread.
The key difference is that processes are fully isolated from each other; threads share (heap) memory
with other threads running in the same application.
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.
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.
Re: Describe the difference between a Thread and a 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).