Multithreads in Java
Multithreads in Java
THREADS IN JAVA
Presentation by
Mrs.S.Janani
Assistant Professor
Department of Information Technology
[email protected]
Department of
IT
Information
Technology
Drsnsrcas/CPreprocessor/April 27, 2024 Slide No : 1
INTRODUCTION
A sequential (or single-threaded) program is one that, when executed, has
only one single flow of control.
i.e., at any time instant, there is at most only one instruction (or
statement or execution point) that is being executed in the program.
A multi-threaded program is one that can have multiple flows of control when
executed.
Department of
www.snsgroup.com
IT Information
Technology
Drsnsrcas/CPreprocessor/April 27, 2024 Slide No : 2
Department of
www.snsgroup.com
IT
Information
Technology
Drsnsrcas/CPreprocessor/April 27, 2024 Slide No : 3
PROGRAM
Department of
www.snsgroup.com
IT Information
Technology Drsnsrcas/CPreprocessor/April 27, 2024
Slide No : 4
single-threaded vs multithreaded
programs
Department of
www.snsgroup.com
IT Information
Technology
Drsnsrcas/CPreprocessor/April 27, 2024 Slide No : 5
LIFE CYCLE OF THREAD
Department of
www.snsgroup.com
IT Information
Technology Drsnsrcas/CPreprocessor/April 27, 2024
Slide No : 7
Define and launch a java thread
Department of
www.snsgroup.com
IT Information
Technology Drsnsrcas/CPreprocessor/April 27, 2024
Slide No :8
Methods for current thread accesses
Department of
www.snsgroup.com
IT Information
Technology Drsnsrcas/CPreprocessor/April 27, 2024
Slide No :10
TO LAUNCH A THREAD
Department of
www.snsgroup.com
IT Information
Technology Drsnsrcas/CPreprocessor/April 27, 2024
Slide No :12
Thread synchronization
Department of
www.snsgroup.com
IT Information
Technology Drsnsrcas/CPreprocessor/April 27, 2024
Slide No :13
Thread synchronization