0
2.7kviews
Compare and contrast between thread and processes

Subject: Operating System

Topic: PROCESS MANAGEMENT

Difficulty: Medium

1 Answer
0
40views
Sr.No Thread Process
1 A thread is the smallest unit of processing that can be performed in an OS. In most modern operating systems, a thread exists within a process - that is, a single process may contain multiple threads. A process is an instance of a computer program that is being executed. It contains the program code and its current activity.Depending on the operating system (OS), a process may be made up of multiple threads of execution that execute instructions concurrently.
2 Thread is light weight taking lesser resources than a process. Process is heavy weight or resource intensive.
3 Thread switching does not need to interact with operating system. Process switching needs interaction with operating system.
4 All threads can share same set of open files, child processes. In multiple processing environments each process executes the same code but has its own memory and file resources.
5 While one thread is blocked and waiting, second thread in the same task can run. If one process is blocked then no other process can execute until the first process is unblocked.
6 Multiple threaded processes use fewer resources. Multiple processes without using threads use more resources.
7 One thread can read, write or change another thread's data. In multiple processes each process operates independently of the others.
8 Threads within the same process share same address space. Processes do not share same address space.
9 Thread can share file descriptors Process do not share file descriptors
10 Threads can share signal handling Process do not share signal handling
Please log in to add an answer.