Difference Between Process and Threads
A program in execution is called a process. There can be multiple instances of a program running in the system which are identified by a unique id called process id. Operating System ensures that each process has a unique id which is always a non-negative integer number.
A thread is a lightweight process which can only be used inside a process. Like process, thread also has a unique identifier to identify threads which are called thread ids. Unlike process ids, thread ids are only unique to a process and one process threads are unknown to other process.
(more…)