Parallelism

In Java multithreading, parallelism is achieved through loop-sharing mechanisms, which is a way to distribute loop iterations effectively between the available system resources. The two commonly available scheduling techniques are block and cyclic distribution; in some systems, they are used together to achieve the best results.

The following is a representation of the block and cyclic distribution technique on a 16-element array to distribute as many as four threads:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset