The use of multiple threads in a single program, all running at the same time and performing different tasks is known as multithreading. Multithreading is a type of execution model that allows multiple threads to exist within the context of a process such that they execute independently but share their process resources. It enables the processing of multiple threads at one time, rather than multiple processes.

Based on functionality, threads are put under 4 categories:

  • Single Process, Single Thread (MS-DOS)
  • Single Process, Multiple Threads (JAVA Runtime)
  • Multiple Process, Single Thread per process (Unix)
  • Multiple Process, Multiple Threads (Solaris, Unix)