<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.3 20210610//EN" "JATS-journalpublishing1-3.dtd">
<article article-type="research-article" dtd-version="1.3" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml:lang="ru"><front><journal-meta><journal-id journal-id-type="publisher-id">sapi</journal-id><journal-title-group><journal-title xml:lang="ru">Системный анализ и прикладная информатика</journal-title><trans-title-group xml:lang="en"><trans-title>«System analysis and applied information science»</trans-title></trans-title-group></journal-title-group><issn pub-type="ppub">2309-4923</issn><issn pub-type="epub">2414-0481</issn><publisher><publisher-name>Belarusian National Technical University</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.21122/2309-4923-2023-2-4-12</article-id><article-id custom-type="elpub" pub-id-type="custom">sapi-613</article-id><article-categories><subj-group subj-group-type="heading"><subject>Research Article</subject></subj-group><subj-group subj-group-type="section-heading" xml:lang="ru"><subject>Системный анализ</subject></subj-group><subj-group subj-group-type="section-heading" xml:lang="en"><subject>System analysis</subject></subj-group></article-categories><title-group><article-title>Влияние алгоритмов поиска кратчайших путей наэнергопотребление многоядерных процессоров</article-title><trans-title-group xml:lang="en"><trans-title>Influence of shortest path algorithms on energy consumption of multi-core processors</trans-title></trans-title-group></title-group><contrib-group><contrib contrib-type="author" corresp="yes"><name-alternatives><name name-style="eastern" xml:lang="ru"><surname>Прихожий</surname><given-names>А. А.</given-names></name><name name-style="western" xml:lang="en"><surname>Prihozhy</surname><given-names>A. A.</given-names></name></name-alternatives><bio xml:lang="ru"><p>Минск</p></bio><bio xml:lang="en"/><xref ref-type="aff" rid="aff-1"/></contrib><contrib contrib-type="author" corresp="yes"><name-alternatives><name name-style="eastern" xml:lang="ru"><surname>Карасик</surname><given-names>О. Н.</given-names></name><name name-style="western" xml:lang="en"><surname>Karasik</surname><given-names>O. N.</given-names></name></name-alternatives><bio xml:lang="ru"><p>Минск</p></bio><bio xml:lang="en"/><xref ref-type="aff" rid="aff-1"/></contrib></contrib-group><aff-alternatives id="aff-1"><aff xml:lang="ru"><institution>Белорусский национальный технический университет</institution><country>Беларусь</country></aff><aff xml:lang="en"><institution>Belarusian National Technical University</institution><country>Belarus</country></aff></aff-alternatives><pub-date pub-type="collection"><year>2023</year></pub-date><pub-date pub-type="epub"><day>03</day><month>10</month><year>2023</year></pub-date><volume>0</volume><issue>2</issue><fpage>4</fpage><lpage>12</lpage><permissions><copyright-statement>Copyright &amp;#x00A9; Прихожий А.А., Карасик О.Н., 2023</copyright-statement><copyright-year>2023</copyright-year><copyright-holder xml:lang="ru">Прихожий А.А., Карасик О.Н.</copyright-holder><copyright-holder xml:lang="en">Prihozhy A.A., Karasik O.N.</copyright-holder><license xml:lang="ru" license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/" xlink:type="simple"><license-p>Данная работа распространяется под лицензией Creative Commons Attribution 4.0.</license-p></license><license xml:lang="en" license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/" xlink:type="simple"><license-p>This work is licensed under a Creative Commons Attribution 4.0 License.</license-p></license></permissions><self-uri xlink:href="https://sapi.bntu.by/jour/article/view/613">https://sapi.bntu.by/jour/article/view/613</self-uri><abstract><p>Современные многоядерные процессоры, операционные системы и прикладное программное обеспечение разрабатываются с учетом требований энергоэффективности, что значительно снижает энергопотребление. Энергоэффективность программного обеспечения зависит от алгоритмов, которые оно реализует, и от того, как оно использует аппаратные ресурсы. В данной работе мы рассматриваем последовательную и параллельную реализации четырех алгоритмов поиска кратчайших путей на плотных взвешенных графах, измеряем и анализируем их время выполнения, энергопотребление, состояния производительности и рабочую частоту процессора. Наша цель – выяснить, как каждый из алгоритмов влияет на энергопотребление процессора, как процессор и операционная система анализируют рабочую нагрузку и предпринимают действия по увеличению или уменьшению рабочей частоты и отключению ядер, а также какие алгоритмы предпочтительнее использовать в последовательном и параллельном режимах. Алгоритм на основе расширения графа (GEA) оказался наиболее энергоэффективным среди алгоритмов, реализуемых последовательно. Классический алгоритм Флойда-Уоршалла (FW) потребил в два раза больше энергии, а блочные однородный (BFW) и неоднородный (HBFW) алгоритмы потребили на 52,2 % и 21,2 % больше энергии, чем GEA. Все эксперименты проводились на 8-ядерном процессоре Intel Core i7-10700. Параллельные реализации алгоритмов BFW и HBFW быстрее и энергоэффективнее параллельной реал изации FW. Они потребили меньше энергии, чем их последовательные аналоги. Последовательный алгоритм GEA потребил меньше энергии, чем параллельный FW, хотя проиграл последнему по времени выполнения. Многоядерный процессор выполнял FW со средней частотой 4235 МГц, и выполнял BFW и HBFW с меньшей частотой 4059 МГц и 4035 МГц соответственно.</p></abstract><trans-abstract xml:lang="en"><p>Modern multi-core processors, operating systems and applied software are being designed towards energy efficiency, which significantly reduces energy consumption. Energy efficiency of software depends on algorithms it implements, and, on the way, it exploits hardware resources. In the paper, we consider sequential and parallel implementations of four algorithms of shortest paths search in dense weighted graphs, measure and analyze their runtime, energy consumption, performance states and operating frequency of the Intel Core i7-10700 8-core processor. Our goal is to find out how each of the algorithms influences the processor energy consumption, how the processor and operating system analyze the workload and take actions to increase or reduce operating frequency and to disable cores, and which algorithms are preferable for exploiting in sequential and parallel modes. The graph extension-based algorithm (GEA) appeared to be the most energy efficient among algorithms implemented sequentially. The classical Floyd-Warshall algorithm (FW) consumed up to twice as much energy, and the blocked homogeneous (BFW) and heterogeneous (HBFW) algorithms consumed up to 52.2 % and 21.2 % more energy than GEA. Parallel implementations of BFW and HBFW are faster by up to 4.41 times and more energy efficient by up to 3.23 times than the parallel implementation of FW and consume less energy by up to 2.22 times than their sequential counterparts. The sequential GEA algorithm consumes less energy than the parallel FW, although it loses FW in runtime. The multi-core processor runs FW with an average frequency of 4235 MHz and runs BFW and HBFW with lower frequency of 4059 MHz and 4035 MHz respectively.</p></trans-abstract><kwd-group xml:lang="ru"><kwd>многоядерный процессор</kwd><kwd>алгоритм кратчайших путей</kwd><kwd>однопоточное приложение</kwd><kwd>многопоточное приложение</kwd><kwd>время выполнения</kwd><kwd>энергопотребление</kwd><kwd>OpenMP</kwd></kwd-group><kwd-group xml:lang="en"><kwd>multi-core processor</kwd><kwd>shortest paths algorithm</kwd><kwd>single-thread application</kwd><kwd>multi-threaded application</kwd><kwd>runtime</kwd><kwd>energy consumption</kwd><kwd>OpenMP</kwd></kwd-group></article-meta></front><back><ref-list><title>References</title><ref id="cit1"><label>1</label><citation-alternatives><mixed-citation xml:lang="ru">Andrae A. On global electricity usage of communication technology: trends to 2030 / A. Andrae, T. Edler // Challenges 2015. – No. 6(1):117-157. DOI: 10.3390/challe6010117</mixed-citation><mixed-citation xml:lang="en">Andrae A., Edler T. On global electricity usage of communication technology: trends to 2030. Challenges 2015; 6(1):117-157. DOI: 10.3390/challe6010117</mixed-citation></citation-alternatives></ref><ref id="cit2"><label>2</label><citation-alternatives><mixed-citation xml:lang="ru">Khokhriakov S. Multicore processor computing is not energy proportional: An opportunity for bi-objective optimization for energy and performance / S. Khokhriakov, R.R. Manumachu, A. Lastovetsky // Applied Energy. – Vol. 268. – 2020. – Pp. 114957. ISSN 0306-2619. DOI: 10.1016/j.apenergy.2020.114957</mixed-citation><mixed-citation xml:lang="en">Khokhriakov S., Manumachu R.R., Lastovetsky A. Multicore processor computing is not energy proportional: An opportunity for bi-objective optimization for energy and performance. Applied Energy, vol. 268, 2020, 114957, ISSN 0306-2619, DOI: 10.1016/j.apenergy.2020.114957</mixed-citation></citation-alternatives></ref><ref id="cit3"><label>3</label><citation-alternatives><mixed-citation xml:lang="ru">Basmadjian R. and De Meer H. Evaluating and modeling power consumption of multi-core processors // In Proc. of the 3rd Int’l Conf. on Future Energy Systems (e-Energy 2012). ACM, May 2012. – Pp. 1-10.</mixed-citation><mixed-citation xml:lang="en">Basmadjian R. and De Meer H. Evaluating and modeling power consumption of multi-core processors. In Proc. of the 3rd Int’l Conf. on Future Energy Systems (e-Energy 2012). ACM, May 2012, pp. 1-10.</mixed-citation></citation-alternatives></ref><ref id="cit4"><label>4</label><citation-alternatives><mixed-citation xml:lang="ru">Attia K.M. Dynamic power management techniques in multi-core architectures: A survey study / K.M. Attia, M.A. ElHosseini, H.A. Ali // Ain Shams Engineering Journal. – 2017. – Vol. 8. – No. 3. – Pp. 445-456.</mixed-citation><mixed-citation xml:lang="en">Attia K.M., El-Hosseini M.A., Ali H.A. Dynamic power management techniques in multi-core architectures: A survey study. Ain Shams Engineering Journal, 2017, vol. 8, no. 3, pp. 445-456.</mixed-citation></citation-alternatives></ref><ref id="cit5"><label>5</label><citation-alternatives><mixed-citation xml:lang="ru">Chen K.Y. The Smart Energy Management of Multithreaded Java Applications on Multi-Core Processors / K.Y. Chen,</mixed-citation><mixed-citation xml:lang="en">Chen K.Y., Chen F.G. The Smart Energy Management of Multithreaded Java Applications on Multi-Core Processors. International Journal of Networked and Distributed Computing, 2013, vol. 1, no. 1, pp. 53-60.</mixed-citation></citation-alternatives></ref><ref id="cit6"><label>6</label><citation-alternatives><mixed-citation xml:lang="ru">F.G. Chen // International Journal of Networked and Distributed Computing. – 2013. – Vol. 1. – No. 1. – Pp. 53-60.</mixed-citation><mixed-citation xml:lang="en">Floyd R.W. Algorithm 97: Shortest path. Communications of the ACM, 1962, 5(6), p. 345.</mixed-citation></citation-alternatives></ref><ref id="cit7"><label>7</label><citation-alternatives><mixed-citation xml:lang="ru">Floyd, R.W. Algorithm 97: Shortest path. Communications of the ACM, 1962, 5(6), p. 345.</mixed-citation><mixed-citation xml:lang="en">Madkour A., Aref W.G., Rehman F.U., Rahman M.A., Basalamah S. A Survey of Shortest-Path Algorithms. ArXiv:1705.02044v1 [cs.DS] 4 May 2017, 26 p.</mixed-citation></citation-alternatives></ref><ref id="cit8"><label>8</label><citation-alternatives><mixed-citation xml:lang="ru">Singh, A. Performance Analysis of Floyd Warshall Algorithm vs Rectangular Algorithm / A. Singh, P.K. Mishra // International Journal of Computer Applications. – 2014. –Vol. 107, No. 16. – Pp. 23-27.</mixed-citation><mixed-citation xml:lang="en">Singh A., Mishra P.K. Performance Analysis of Floyd Warshall Algorithm vs Rectangular Algorithm. International Journal of Computer Applications, vol. 107, no. 16, 2014, pp. 23-27.</mixed-citation></citation-alternatives></ref><ref id="cit9"><label>9</label><citation-alternatives><mixed-citation xml:lang="ru">Madkour, A, Aref, W.G., Rehman, F.U., Rahman, M.A., Basalamah, S. A Survey of Shortest-Path Algorithms // ArXiv:1705.02044v1 [cs.DS] 4 May 2017, 26 p.</mixed-citation><mixed-citation xml:lang="en">Pettie S. A new approach to all-pairs shortest paths on real-weighted graphs. Theoretical Computer Science, 312 (1), 2004: 47-74.</mixed-citation></citation-alternatives></ref><ref id="cit10"><label>10</label><citation-alternatives><mixed-citation xml:lang="ru">Pettie, S. A new approach to all-pairs shortest paths on real-weighted graphs / S. Pettie // Theoretical Computer Science. 312 (1). – 2004. – Pp. 47-74.</mixed-citation><mixed-citation xml:lang="en">Prihozhy А., Karasik O. Inference of shortest path algorithms with spatial and temporal locality for Big Data processing // Proceedings VIII International conference “Big data and advanced analytics”, Minsk: Bestprint, 2022. pp. 56-66.</mixed-citation></citation-alternatives></ref><ref id="cit11"><label>11</label><citation-alternatives><mixed-citation xml:lang="ru">Prihozhy А., Karasik O. Inference of shortest path algorithms with spatial and temporal locality for Big Data processing // Сборник материалов VIII Международной научно-практической конференции. – Минск: Беспринт, 2022. – Pp. 56-66.</mixed-citation><mixed-citation xml:lang="en">Prihozhy A.A., Karasik O.N. Heterogeneous blocked all-pairs shortest paths algorithm. System analysis and Applied Information Science, 2017, no. 3, pp. 68-75. DOI: 10.21122/2309-4923-20173-68-75</mixed-citation></citation-alternatives></ref><ref id="cit12"><label>12</label><citation-alternatives><mixed-citation xml:lang="ru">Прихожий, А.А. Разнородный блочный алгоритм поиска кратчайших путей между всеми парами вершин графа / А.А. Прихожий, О.Н. Карасик // Системный анализ и прикладная информатика. – 2017. – № 3.– С. 68-75.</mixed-citation><mixed-citation xml:lang="en">Venkataraman, G., Sahni, S., Mukhopadhyaya, S. A Blocked All-Pairs Shortest Paths Algorithm. Journal of Experimental Algorithmics (JEA), 2003, vol. 8, pp. 857-874.</mixed-citation></citation-alternatives></ref><ref id="cit13"><label>13</label><citation-alternatives><mixed-citation xml:lang="ru">Venkataraman, G., Sahni, S., Mukhopadhyaya, S. A Blocked All-Pairs Shortest Paths Algorithm // Journal of Experimental Algorithmics (JEA). 2003. – Vol. 8. – Pp. 857-874.</mixed-citation><mixed-citation xml:lang="en">Park, J.S., Penner, M., and Prasanna, V.K. Optimizing graph algorithms for improved cache performance. IEEE Trans. on Parallel and Distributed Systems, 2004, 15(9), pp. 769-782.</mixed-citation></citation-alternatives></ref><ref id="cit14"><label>14</label><citation-alternatives><mixed-citation xml:lang="ru">Park, J.S. Optimizing graph algorithms for improved cache performance / J.S. Park, M. Penner, V.K. Prasanna // IEEE Trans. on Parallel and Distributed Systems. – 2004. – No. 15(9). – Pp. 769-782.</mixed-citation><mixed-citation xml:lang="en">Albalawi, E., Thulasiraman, P., Thulasiram, R. Task Level Parallelization of All Pair Shortest Path Algorithm in OpenMP 3.0. 2nd International Conference on Advances in Computer Science and Engineering (CSE 2013), 2013, Los Angeles, CA, July 1-2, 2013, pp. 109-112.</mixed-citation></citation-alternatives></ref><ref id="cit15"><label>15</label><citation-alternatives><mixed-citation xml:lang="ru">Albalawi, E., Thulasiraman, P., Thulasiram, R. Task Level Parallelization of All Pair Shortest Path Algorithm in OpenMP 3.0 // 2nd International Conference on Advances in Computer Science and Engineering (CSE 2013), 2013, Los Angeles, CA, July 1-2. – 2013. – Pp. 109-112.</mixed-citation><mixed-citation xml:lang="en">Tang, P. Rapid Development of Parallel Blocked All-Pairs Shortest Paths Code for Multi-Core Computers. IEEE SOUTHEASTCON, 2014, pp. 1-7.</mixed-citation></citation-alternatives></ref><ref id="cit16"><label>16</label><citation-alternatives><mixed-citation xml:lang="ru">Tang, P. Rapid Development of Parallel Blocked All-Pairs Shortest Paths Code for Multi-Core Computers // IEEE SOUTHEASTCON. – 2014. – Pp. 1-7.</mixed-citation><mixed-citation xml:lang="en">Karasik O.N., Prihozhy A.A. Tuning block-parallel all-pairs shortest path algorithm for effi multi-core implementation. System analysis and applied information science, 2022, no. 3, pp. 57–65. DOI: 10.21122/2309-4923-2022-3-57-65</mixed-citation></citation-alternatives></ref><ref id="cit17"><label>17</label><citation-alternatives><mixed-citation xml:lang="ru">Карасик О.Н. Настройка блочно-параллельного алгоритма поиска кратких путей на эффективную многоядерную реализацию / О.Н. Карасик, А.А. Прихожий // Системный анализ и прикладная информатика. – 2022. – № 3. – С. 57-65. DOI: 10.21122/2309-4923-2022-3-57-65</mixed-citation><mixed-citation xml:lang="en">Prihozhy A.A. Simulation of direct mapped, k-way and fully associative cache on all pairs shortest paths algorithms. System analysis and applied information science, 2019, no. 4, pp. 10-18.</mixed-citation></citation-alternatives></ref><ref id="cit18"><label>18</label><citation-alternatives><mixed-citation xml:lang="ru">Прихожий, А.А. Моделирование кэш прямого отображения и ассоциативных кэш на алгоритмах поиска кратчайших путей на графе / А.А. Прихожий // Системный анализ и прикладная информатика. – 2019. – № 4. – С. 10-18.</mixed-citation><mixed-citation xml:lang="en">Prihozhy A.A. Optimization of data allocation in hierarchical memory for blocked shortest paths algorithms. System analysis and applied information science, 2021, no. 3, pp. 40-50.</mixed-citation></citation-alternatives></ref><ref id="cit19"><label>19</label><citation-alternatives><mixed-citation xml:lang="ru">Прихожий, А.А. Оптимизация размещения данных в иерархической памяти для блочных алгоритмов поиска кратчайших путей / А.А. Прихожий // Системный анализ и прикладная информатика. – 2021. – № 3. – С. 40-50. DOI: 10.21122/2309-4923-2021-3-40-50</mixed-citation><mixed-citation xml:lang="en">Prihozhy A.A., Karasik O.N. Cooperative model for optimization of execution of threads on multi-core system. System analysis and applied information science, 2014, no. 4, pp. 13-20.</mixed-citation></citation-alternatives></ref><ref id="cit20"><label>20</label><citation-alternatives><mixed-citation xml:lang="ru">Прихожий, А.А. Кооперативная модель оптимизации выполнения потоков на многоядерной системе / А.А. Прихожий, О.Н. Карасик // Системный анализ и прикладная информатика. – 2014. – № 4. – C. 13-20.</mixed-citation><mixed-citation xml:lang="en">Prihozhy A.A., Karasik O.N. Cooperative block-parallel algorithms for task execution on multi-core system. System analysis and applied information science, 2015, no. 2, pp. 10-18.</mixed-citation></citation-alternatives></ref><ref id="cit21"><label>21</label><citation-alternatives><mixed-citation xml:lang="ru">Прыхожы, А.А. Кааператыўныя блочна-паралельныя алгарытмы рашэння задач на шмат'ядравых сістэмах / А.А. Прыхожы, А.М. Карасiк // Системный анализ и прикладная информатика. – 2015. – № 2. – С. 10-18.</mixed-citation><mixed-citation xml:lang="en">Karasik O.N., Prihozhy A.A. Threaded block-parallel algorithm for finding the shortest paths on graph. Doklady BGUIR, 2018, no. 2, pp. 77-84.</mixed-citation></citation-alternatives></ref><ref id="cit22"><label>22</label><citation-alternatives><mixed-citation xml:lang="ru">Карасик, О.Н. Потоковый блочно-параллельный алгоритм поиска кратчайших путей на графе / О.Н. Карасик, А.А. Прихожий // Доклады БГУИР. – 2018. – № 2. – С. 77-84.</mixed-citation><mixed-citation xml:lang="en">Prihozhy А.А., Karasik O.N. Advanced heterogeneous block-parallel all-pairs shortest path algorithm. Proceedings of BSTU, issue 3, Physics and Mathematics. Informatics, 2023, no. 1 (266), pp. 77–83. DOI: 10.52065/2520-6141-2023-266-1-13</mixed-citation></citation-alternatives></ref><ref id="cit23"><label>23</label><citation-alternatives><mixed-citation xml:lang="ru">Прихожий, А.А. Усовершенствованный разнородный блочно-параллельный алгоритм поиска кратчайших путей на графе / А.А. Прихожий, О.Н. Карасик // Труды БГТУ. Сер. 3, Физико-математические науки и информатика. – 2023. – № 1 (266). – С. 77-83. DOI: 10.52065/2520-6141-20</mixed-citation><mixed-citation xml:lang="en">Prihozhy A.A., Karasik O.N. Investigation of methods for implementing multithreaded applications on multicore systems. Informatization of education, 2014, no. 1, pp. 43-62.</mixed-citation></citation-alternatives></ref><ref id="cit24"><label>24</label><citation-alternatives><mixed-citation xml:lang="ru">Прихожий, А.А. Исследование методов реализации многопоточных приложений на многоядерных системах / А.А. Прихожий, О.Н. Карасик // Информатизация образования. – 2014. – № 1. – Pр. 43-62.</mixed-citation><mixed-citation xml:lang="en">Prihozhy, A.A. Analysis, transformation and optimization for high performance parallel computing. Minsk: BNTU, 2019, 229 p.</mixed-citation></citation-alternatives></ref><ref id="cit25"><label>25</label><citation-alternatives><mixed-citation xml:lang="ru">Прихожий, А.А. Анализ, преобразование и оптимизация для высокопроизводительных параллельных вычислений. – Минск: БНТУ, 2019. – 229 p.</mixed-citation><mixed-citation xml:lang="en">Прихожий, А.А. Анализ, преобразование и оптимизация для высокопроизводительных параллельных вычислений. – Минск: БНТУ, 2019. – 229 p.</mixed-citation></citation-alternatives></ref></ref-list><fn-group><fn fn-type="conflict"><p>The authors declare that there are no conflicts of interest present.</p></fn></fn-group></back></article>
