answersLogoWhite

0


Best Answer

When you have only one processor and run a java program that does everything in memory eg., loops , calculations without looking up external datasources like Database, Socket, MQ , Web Service there wont be any performance benefit out of multithreading.

But when you have multiple processors on the host and you are doing to a large algorithm completely in memory it will definitely help to split your process into threads so different threads can be handled by different processorts

Event if you have on processor and if your java class (or program) does in memory calculations, algorithms + some external lookup like JDBC calls multithreading can greatly help the performance of your process. Your CPU would be free to do other tasks when your code waits for the database to return results.

User Avatar

Wiki User

16y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

7y ago

Multi thread means handling multiple tasks simultaneously.

java supports multi thread programs.

That means we do not need to wait for the application to finish one task before beginning another.

A program that contains multiple flows of control is known as a multi thread program.

ex.

We can listen to an audio while scrolling a page and at the same time download an applet form.

This further greatly improves the interactive performance for a graphical application.

This answer is:
User Avatar

User Avatar

Wiki User

8y ago

Some of the most important benefits of multithreaded programming are:

  1. Improved throughput. Many concurrent compute operations and I/O requests within a single process.
  2. Simultaneous and fully symmetric use of multiple processors for computation and I/O
  3. Superior application responsiveness. If a request can be launched on its own thread, applications do not freeze or show the "hourglass". An entire application will not block, or otherwise wait, pending the completion of another request.
  4. Improved server responsiveness. Large or complex requests or slow clients don't block other requests for service.
  5. Minimized system resource usage. Threads impose minimal impact on system resources.
  6. Program structure simplification. Threads can be used to simplify the structure of complex applications, such as server-class and multimedia applications.
  7. Better communication.
This answer is:
User Avatar

User Avatar

Wiki User

10y ago

Generally in enterprise applications, we need to fetch and load a lot of data before the system starts or initializes. In such cases, we typically spawn multiple threads and let the load operations run in parallel to save time. Lets say you need to fetch 10 different sets of data each of which will run for approximately 1 minute, if you run them all in sequence one by one, your system will load only after 10 minutes. But, if you spawn 10 threads, the system might load in around 2 minutes which is much faster than the single threaded time.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

Since multiple actions happen parallel (almost/virtually) to one another rather than one after the other, multithreading improves performance.

Ex: lets say there are three actions each that will take 5 seconds.

so, in a single threaded environment it will take atleast 15 seconds if they happen one after the other.

But, if we spawn three threads and have these actions started at the same time, all 3 will complete probably in around 6 or 7 seconds which is much faster than the earlier 15 seconds it took.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

The advantage is the fact that multiple threads run parallel to one another and hence things happen faster than they would if they run one after the other

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

To offer better performance than single-threaded systems

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How does multithreading improve the performance of java program?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Does java support multithreading or not justify your answer?

yes!


Is java high performance?

The performance of any program depends to a great degree on the skill of the programmer.


How to improve memory issues and performance of java application?

What are the memory issues you are having? Where is the performance problem? Describe your problem!


Why is single thread system not used in java?

Because the developers of Java considered the possibility of multithreading a big advantage. You don't HAVE TO use multiple threads; just use it when you need it.Because the developers of Java considered the possibility of multithreading a big advantage. You don't HAVE TO use multiple threads; just use it when you need it.Because the developers of Java considered the possibility of multithreading a big advantage. You don't HAVE TO use multiple threads; just use it when you need it.Because the developers of Java considered the possibility of multithreading a big advantage. You don't HAVE TO use multiple threads; just use it when you need it.


What are multithreading concepts in java?

Multithreading in Java is the concept by which you can have multiple threads of execution running in parallel. Unfortunately the topic is too big to be summarized in one answers. You can check the related links section for links that can help you understanding this complex topic


Why does one have to install Java so frequently?

There are too many updates when you install Java on your computer. The reason one has to install Java so frequently is because the updates are mainly used to improve the device stability and performance.


What do you mean by multithread program in java?

A Program in Java that spawns multiple threads is called a multithreaded program in Java.


What is concurrent programming in java?

If more than one program is run at the same time then it is called as concurrent programming. This technique is used in multithreading concept where one program is split into several threads and run and the results are grouped to form the original result. Multitasking is also used where more than one program is run at the same time.


What is java program on computers?

#!/usr/bin/perl print 'java program';


What is java virtucal mechine?

That refers to the program that runs the compiled Java program.


Why java execute with high performance?

I think java is object oriented language thats why that execute with high performance.


What powder game doesnt need java?

Any program written for the Java technology needs Java. Any program NOT written for Java DOESN'T need it.