Thread
Multitasking threads require less overhead than multitasking processes. Processes are heavyweight
tasks that require their own separate address spaces. Inter-process communication is expensive and
limited. Context switching from one process to another is also costly. Threads, on the other hand, are
lightweight. They share the same address space and cooperatively share the same heavyweight process.
Inter-thread communication is inexpensive, and context switching from one thread to the next is low
cost. While Java programs make use of process-based multitasking environments, process-based
multitasking is not under the control of Java. However, multithreaded multitasking is.