Professional Documents
Culture Documents
Session 5 Class and Object: Multi Threading
Session 5 Class and Object: Multi Threading
Session 5 Class and Object: Multi Threading
Multi Threading
Class and Object
Introduction :
Multitasking Class
can be and Object
achieved by two ways:
1.Process-based Multitasking(Multiprocessing)
2.Thread-based Multitasking(Multithreading)
Process-based multitasking
A process is a program that is executing.
Thus, process-based multitasking is the feature that allows
your computer to runSESSION
two or more5programs concurrently.
In process-based multitasking, a program is the smallest
unit of code that can be dispatched by the scheduler.
Class and Object
Processes are heavyweight tasks that require their own
separate address spaces.
This is especially
Classimportant for the interactive,
and Object
networked environment in which Java operates,
because idle time is common.
SESSION 5
1. CurrentThreadDemo.java
SESSION
2. ThreadDemo.java 5
3. MultiThreadDemo.java
4. DemoJoin.java
Class and Object
SESSION 5
End of Session-23
Class and Object