Thread | Process |
---|---|
An executing instance of a program is called a process. | A thread is a subset of the process. |
Thread shares the address space of process that they are belonging to. | Processes have their own address space. |
Threads have direct access to the data segment of its process. | Processes have their own copy of data segment of a parent process. |
Threads can directly communicate with other threads of its process. | The processes must use interprocess commumnication (IPC) to communicate with other process. |
Threads have less overhead with context switching. | Processes have considerable overhead. |
New threads can be easily created. | New process requires duplications of a parent process. |
Threads can exercise a considerable control over threads of a same process. | Process can only exercise control over its child process. |
Changes to the main thread may affect the behaviour of other threads of a process. | Changes to the process does not affect the child process. |
Threads (of the same process) run in a shared memory space. | Processes run in separate memory spaces. |
Every thread is not a process. It is a part(entity) of a process. | Every process is a thread (primary thread). |
Threads are light weight processes. Threads are bundled inside the process. | Process is a heavy weight process. |
Threads are created using clone() method. | Process are created using fork() method. |
Difference between Process and Thread. Thread vs Process.
About Vipul Singh
Editor-in-Chief and Owner of TechBlogMU. Computer Engineer, Data Science Enthusiast and Tech Blogger. Catch him on Facebook and Twitter
Become a Patron: https://www.patreon.com/techblogmu
Subjects
- Artificial Intelligence (AI)
- ASP.NET with C#
- Big Data Analytics
- Computer Networks
- Cryptography and System Security
- Data Structures
- Data Warehouse and Mining
- Database Management System
- Digital Signal Processing
- Human Machine Interaction
- Machine Learning
- Microprocessor
- Object Oriented Programming Methodolgy (OOPM)
- Operating System
- Parallel and Distributed Database
- Software Architecture (SA)
- Statistics
- Structured and Object Oriented Analysis and Design (SOOAD)
- System Programming and Compiler Construction (SPCC)
- Theory of Computation