1. MultiThreading in Java - Introduction
Multitasking: Executing several tasks simultaneously is the concept of multitasking.
There are two types of multitasking's.
1. Process based multitasking.
2. Thread based multitasking
1. Process based multitasking.
Executing several tasks simultaneously where each task is a separate independent process such type of multitasking is called process based multitasking.
Example:
While typing a java program in the editor we can able to listen mp3 audio songs
at the same time we can download a file from the net all these tasks are
independent of each other and executing simultaneously and hence it is Process
based multitasking.
This type of multitasking is best suitable at "os level".
2. Thread based multitasking
Executing several tasks simultaneously where each task is a separate independent part of the same program, is called Thread based multitasking.
And each independent part is called a "Thread". This type of multitasking is best suitable for "programmatic level".
Whether it is process based or Thread based the main objective of multitasking is to improve performance of the system by reducing response time.
Comments
Post a Comment