Abstract

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.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call