0% found this document useful (0 votes)
34 views

4.11 Using Multithreading: Performance of Your Program Rather Than Enhance It

using of multithreading in java and how does it helps in reducing complexity and increase efficiency

Uploaded by

Surya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

4.11 Using Multithreading: Performance of Your Program Rather Than Enhance It

using of multithreading in java and how does it helps in reducing complexity and increase efficiency

Uploaded by

Surya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

SEM-III

KNS INSTITUTE OF TECHNLOGY

JAVA CH-4

DEPARTMENT OF MCA

4.11 Using Multithreading

The key to utilizing Javas multithreading features effectively is to think concurrently rather
than serially.

For example, when you have two subsystems within a program that can execute concurrently,
make them individual threads.

With the careful use of multithreading, you can create very efficient programs.

A word of caution: If you create too many threads, you can actually degrade the
performance of your program rather than enhance it.

Remember, some overhead is associated with context switching. If you create too many
threads, more CPU time will be spent changing contexts than executing your program!

Lecturer: Syed Khutubuddin Ahmed

E-Mail: [email protected]

16

You might also like