In Java 1.7 we have already won the Fork / Join framework. It provides several utilitarian classes, interfaces, methods for manufacturing Thread Pools, and methods of submitting tasks. From Java 1.5 a framework called Executor Framework has been added. Java has always provided APIs and frameworks for concurrent programming and parallel computing. Do not confuse parallel computing with concurrent programming. The number of threads must be the number of processors available, and for each thread you submit your tasks. An addendum can not parallelize your entire algorithm, you can only divide up to a certain point. You would have to rewrite part of your application by splitting it into subtasks - subtasks, and handing them to threads - this would be the parallel algorithm. What it means to say that all of your logic runs sequentially. This is called a serial algorithm or sequential. Today what you have is an application that runs all its logic on a single thread that will be run by a single processor. In order to solve your problem, you will need to change your algorithm.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |