z-logo
open-access-imgOpen Access
Performance Optimization of Sorting Algorithm using Processor Affinity in Java
Author(s) -
Abbas Muhammad Rabiu,
E. J. Garba,
Benson Yusuf Baha,
Yusuf Musa Malgwi,
Mu’azu Dauda
Publication year - 2022
Publication title -
oirl journal of information technology (ojit)
Language(s) - English
Resource type - Journals
ISSN - 2814-0990
DOI - 10.53944/ojit-2207
Subject(s) - computer science , java , executor , multi core processor , sorting algorithm , sorting , parallel computing , benchmarking , algorithm , operating system , business , marketing , political science , law
Background: The processor affinity library in Java can switch ON all the processing cores available in a multi-processing environment. Using this feature will enable concurrent programmers to fully utilize the benefits of processing power available in multi-core processors. Therefore, this study aims to use processor affinity to develop four different frameworks that could optimize the efficiency of quick sorting algorithms on multi-core platforms.   Methods: Benchmarking is the method used to carry out all the experiments and test the developed algorithm's efficiencies using all four frameworks. An Octa-core machine with eight (8) processing cores was used to develop and run the algorithms to measure their running times and compare their performances. JDK 12.0 is the version of Java used for development. An array data structure containing One Million Elements (1,000,000) was used as the preferred data structure.Results: The results obtained show that processor affinity can improve the performance of quick sorting algorithms by ensuring no processing core is idled during the computation of results. The results also show that processor affinity and Work-Stealing-Action perform similar functions by ensuring that available cores in a machine are fully utilized to handle tasks and improve performance. It was further found that the algorithm developed using the Executor Services framework outperformed all the three other frameworks implemented using Naïve, Fork-Join, and Sequential implementations.Conclusion: It was concluded that processor affinity improves the performances of all the four different implementations of quick sorts. It was also concluded that in the fork-join framework, Work-Stealing-Action performed by the worker-threads has an effect similar to that of affinity by ensuring that all the processing cores are fully utilized to improve performance. Further investigations can be carried out using machines with more processing cores in their CPU using a different data structure such as a Link List Array of the same or different data size to see whether the same or different conclusions can be drawn.

The content you want is available to Zendy users.

Already have an account? Click here to sign in.
Having issues? You can contact us here