MULTI THREADING
MULTI-THREADING Definition: Process of executing a number of programs through a single program. The purpose of multi-threading program is to utilize the CPU processing time in maximum and to reduce CPU idle time.
THREAD By default, a program is known as single threaded program as it normally follows a single line of execution.
CREATION OF THREADS Threads can be created in two ways: By implementing “Runnable Interface” By extending “Thread Class”
THREAD LIFE CYCLE NEW (BORN) RUNNABLE BLOCKED DEAD Start( ) Stop( ) Run( ) Suspend( ) Wait( ) Sleep( ) Resume( ) Notify( ) Stop( ) Run( ) Stop( ) Run( )
JOIN METHOD It forces the parent thread to wait for the termination all of its child threads i.e. the parent thread exists in memory till the termination of all of its child threads.
THREAD CLASS String getname( ) Int getpriority( ) Set priority(in) Current Thread
SYNCHRONISATION Technique of sharing a common resource between multiple threads

More Related Content

PPTX
Multi-Threading
ODP
Multithreading 101
PPT
Multithreading Presentation
PPTX
.NET: Thread Synchronization Constructs
PPTX
.NET Multithreading/Multitasking
PPTX
Threading in C#
PDF
Introduction+To+Java+Concurrency
PPT
Java Multithreading and Concurrency
Multi-Threading
Multithreading 101
Multithreading Presentation
.NET: Thread Synchronization Constructs
.NET Multithreading/Multitasking
Threading in C#
Introduction+To+Java+Concurrency
Java Multithreading and Concurrency

What's hot (20)

PPT
Java concurrency
PPTX
Java concurrency in practice
PDF
Multithreading in Java
PPTX
Multithreading
PPTX
Concurrency in Java
PPT
Threads in java
PPTX
Basics of Java Concurrency
PDF
Java 8 - Stamped Lock
PPTX
Introduction to TPL
PDF
Java Thread Synchronization
PDF
Java Multithreading Using Executors Framework
PPT
Thread 1
PPTX
Advanced Introduction to Java Multi-Threading - Full (chok)
PPT
Thread model in java
PPT
Threads And Synchronization in C#
PPTX
Multi threading
PDF
Java Course 10: Threads and Concurrency
PPT
Threads in Java
PPTX
Java concurrency - Thread pools
PDF
Jnp
Java concurrency
Java concurrency in practice
Multithreading in Java
Multithreading
Concurrency in Java
Threads in java
Basics of Java Concurrency
Java 8 - Stamped Lock
Introduction to TPL
Java Thread Synchronization
Java Multithreading Using Executors Framework
Thread 1
Advanced Introduction to Java Multi-Threading - Full (chok)
Thread model in java
Threads And Synchronization in C#
Multi threading
Java Course 10: Threads and Concurrency
Threads in Java
Java concurrency - Thread pools
Jnp
Ad

Similar to Multi threading (20)

PDF
concurrency
PPTX
Multithreading in java
PPT
Multithreading
PPT
Slot02 concurrency1
PDF
Ppl for students unit 4 and 5
PDF
Ppl for students unit 4 and 5
PPSX
Java Multi-threading programming
PPTX
advanced java ppt
PPTX
Multithreading.
PPTX
Multithreading
PDF
Java unit 12
PPTX
Networking threads
PPTX
PPT
Operating System Chapter 4 Multithreaded programming
PPTX
Multithreading.pptx
PPTX
Multithread Programing in Java
PDF
Multithreading Introduction and Lifecyle of thread
PPTX
OOPS object oriented programming UNIT-4.pptx
PPTX
advanced java programming paradigms presentation
DOCX
Module - 5 merged.docx notes about engineering subjects java
concurrency
Multithreading in java
Multithreading
Slot02 concurrency1
Ppl for students unit 4 and 5
Ppl for students unit 4 and 5
Java Multi-threading programming
advanced java ppt
Multithreading.
Multithreading
Java unit 12
Networking threads
Operating System Chapter 4 Multithreaded programming
Multithreading.pptx
Multithread Programing in Java
Multithreading Introduction and Lifecyle of thread
OOPS object oriented programming UNIT-4.pptx
advanced java programming paradigms presentation
Module - 5 merged.docx notes about engineering subjects java
Ad

Recently uploaded (20)

PPTX
Web Crawler for Trend Tracking Gen Z Insights.pptx
PDF
STKI Israel Market Study 2025 version august
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
Five Habits of High-Impact Board Members
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
Architecture types and enterprise applications.pdf
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
Getting Started with Data Integration: FME Form 101
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PPTX
Chapter 5: Probability Theory and Statistics
PPTX
Modernising the Digital Integration Hub
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PDF
Unlock new opportunities with location data.pdf
PPT
What is a Computer? Input Devices /output devices
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
Hybrid model detection and classification of lung cancer
PPTX
observCloud-Native Containerability and monitoring.pptx
Web Crawler for Trend Tracking Gen Z Insights.pptx
STKI Israel Market Study 2025 version august
1 - Historical Antecedents, Social Consideration.pdf
Five Habits of High-Impact Board Members
A contest of sentiment analysis: k-nearest neighbor versus neural network
Module 1.ppt Iot fundamentals and Architecture
Architecture types and enterprise applications.pdf
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Getting Started with Data Integration: FME Form 101
Final SEM Unit 1 for mit wpu at pune .pptx
Chapter 5: Probability Theory and Statistics
Modernising the Digital Integration Hub
Developing a website for English-speaking practice to English as a foreign la...
DP Operators-handbook-extract for the Mautical Institute
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
Unlock new opportunities with location data.pdf
What is a Computer? Input Devices /output devices
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Hybrid model detection and classification of lung cancer
observCloud-Native Containerability and monitoring.pptx

Multi threading

  • 2. MULTI-THREADING Definition: Process of executing a number of programs through a single program. The purpose of multi-threading program is to utilize the CPU processing time in maximum and to reduce CPU idle time.
  • 3. THREAD By default, a program is known as single threaded program as it normally follows a single line of execution.
  • 4. CREATION OF THREADS Threads can be created in two ways: By implementing “Runnable Interface” By extending “Thread Class”
  • 5. THREAD LIFE CYCLE NEW (BORN) RUNNABLE BLOCKED DEAD Start( ) Stop( ) Run( ) Suspend( ) Wait( ) Sleep( ) Resume( ) Notify( ) Stop( ) Run( ) Stop( ) Run( )
  • 6. JOIN METHOD It forces the parent thread to wait for the termination all of its child threads i.e. the parent thread exists in memory till the termination of all of its child threads.
  • 7. THREAD CLASS String getname( ) Int getpriority( ) Set priority(in) Current Thread
  • 8. SYNCHRONISATION Technique of sharing a common resource between multiple threads