Multi
Multi
What is multithreading
?
• Multithreading is the method of running two or more
threads at the same time to maximize CPU utilization.
it is often referred to as Concurrency in Java. Each
thread runs in parallel with the others. Since several
threads do not assign different memory areas, they
conserve memory. Furthermore, switching between
threads takes less time. Multithreading enhances
program structure by making it simpler and easier to
navigate. These generalized threads can be used in
high-server media applications to easily change or
enhance the configuration of these complex structures.
What is Thread ?
• A thread is the direction or path that is taken while a
program is being executed. Generally, all the programs have
at least one thread, known as the main thread, that is
provided by the JVM or Java Virtual Machine at the starting of
the program’s execution. At this point, when the main
thread is provided, the main() method is invoked by the
main thread.
• A thread is an execution thread in a program. Multiple
threads of execution can be run concurrently by an
application running on the Java Virtual Machine. The priority
of each thread varies. Higher priority threads are executed
before lower priority threads.
What is process ?
• A process is a self-contained execution environment. A process
generally has a complete, private set of basic run-time
resources; in particular, each process has its own memory space.