A program is the smallest unit of code that can be dispatched by the scheduler. In thread-based multitasking environment, the thread is the smallest unit of dispatchable code. This means that a single program can perform two or more tasks simultaneously. A Text Editor can format text at the same time it is printing, as long as these two actions are performed by two separate threads. Multitasking threads require less overhead than multitasking processes.
Processes are heavyweight tasks that require their own separate address spaces.
Interprocess communication is expensive and limited. Context switching from one process to another is also costly. Threads are lightweight. They share the same address space and cooperatively share the same heavyweight process. Interthread communication is inexpensive, and context switching from one thread to next is less cost.