What is a Thread? What are the differences between process and thread?

A thread is a single sequence stream within in a process. Each process is made up of various different threads. Threads are also often referred to as lightweight processes, primarily because they have some of the properties as processes.

Threads are part of processes. It can be said that a process can be broken down into threads. Each process must have at least one thread. A process can have multiple threads in addition to the primary thread.



Run in separate memory spaces

Run in a shared memory space

Self-contained execution environment

Part of a process, hence share its execution environment

Has a complete, private set of basic run time resources

Part of a process, hence shares its basic run time resources

Only a single process can run at a time

Multiple threads can run at a time

Have their own copy of the data segment

Have direct access to the data segment

Changes to the parent process does not affect child processes

Changes to the main thread may affect the behavior of the other threads of the process

Heavily dependent on system resources

Require minimal amounts of resource

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.