Process vs Thread


Process Thread
Definition A process is an instance of program that is being executed A thread is a subset of a process
Memory Run in separate memory Run in shared memory in the same process
Communication Via inter-process communication can communcation with the same process

Memory

Multitasking

OS can have multiple processes run simultaneously

Multithreading

In any single process, multiple threads can run simultaneously.

Actually it is not truly simultaneous. It is done by switching between different thread in a process

Threads can truly be concurrent on a multiprocessor

results matching ""

    No results matching ""