Multi Tasking and Multi Threading | Core Java Tutorials
This “Multi Tasking and Multi Threading” is providing introduction to Multi threading in java and what is the difference between Multi tasking and Multi threading.
- Performing more than one task simultaneously using single processor.
- Any processor can execute a single instruction at a time.
- When we execute more than one task, process space will be shared.
- While performing multi tasking, the control switches between the contexts and executes instructions according to Time specification.
- Multitasking, is the concept of optimum utilization of CPU.
- Control unit uses two OS concepts to perform Multi tasking.
- Time slicing
- Context switching.
- We can perform Multi Tasking depends on capability of Processor.
- If the processor is not capable of performing Multi tasking, results abnormal termination (system hangs).
- The only difference between Multi tasking and Multi threading is,
- In Multi tasking, “n” process spaces required to perform “n” tasks.
- In Multi threading, “n” threads execute in a single process space.
- Multi tasking takes care by Operating System. No programming effort is required.
- To implement Multi threading, we need to write program.
- Multi threading results, less stress on the Processor, because no need to switch between the contexts to perform Multi tasking