The process of executing several tasks simultaneously is called ‘Multitasking‘. There are 2 types of multitasking.
- Process based Multitasking.
- Thread based Multitasking
Process based Multitasking
Executing several tasks simultaneously where each task is a separate independent process is called ‘Process based Multitasking‘.
While writing a java program in the editor, we can run MP3 player. At the same time we can download a file from the net. All these tasks are executing simultaneously and independent of each other. Hence it is process based Multitasking. Process based Multitasking is best suitable at operating system level.
Thread based Multitasking
- Executing several tasks simultaneously where each task is a separate independent part of the same program is called ‘Thread based Multitasking‘.
- This type of multitasking is best suitable at programmatic level.
- Java provides in-built support for thread based multitasking by providing rich library (Thread,ThreadGroup, Runnable ..etc).
Whether it is Process based or Thread based the main objective of multitasking is to reduce response time and improve performance of the system.
The main application area of multithreading is video games implementation,Multimedia graphics etc.