threading and multi threading in java
TRANSCRIPT
Threading and
Multi Threading
By Syed Hamza Ali Shah
THREAD
A thread is a lightweight process which exists within a program and executed to perform a special task.
THREAD
A process that has only one thread is referred to as a single-threaded process.
A process with multiple threads is referred to as a multi-threaded process.
Threading concept is very important in Java through which we can increase the speed of any application.
THREAD
In single threaded environment, operations are executes sequentially, next operation can execute when the previous one is complete.
MULTI THREADING
A multithreaded program contains two or more parts that can run.
Each part can handle different task at the same time.
MULTI THREADING
Multithreading is allows a program to execute many tasks at the same time.
In the multithreading concept, several multiple tasks are run in a single process or program.
example
when you use MS-WORD you perform a many different tasks such as printing, spell checking and so on, at a time.
advantages
Reduces the computation time.
Improves performance of an application.
Threads share the same address space so it saves the memory.
Thanx . . .