Організація багатопотокових обчислень в С++
dc.citation.epage | 27 | |
dc.citation.issue | 1 | |
dc.citation.journalTitle | Комп’ютерні системи проектування. Теорія і практика. | |
dc.citation.spage | 19 | |
dc.citation.volume | 5 | |
dc.contributor.affiliation | Національний університет “Львівська політехніка” | |
dc.contributor.affiliation | Lviv Polytechnic National University | |
dc.contributor.author | Андрушко, Андрій | |
dc.contributor.author | Маркелов, Олександр | |
dc.contributor.author | Andrushko, Andriy | |
dc.contributor.author | Markelov, Oleksandr | |
dc.coverage.placename | Львів | |
dc.coverage.placename | Lviv | |
dc.date.accessioned | 2025-07-23T06:35:28Z | |
dc.date.created | 2023-02-28 | |
dc.date.issued | 2023-02-28 | |
dc.description.abstract | Впродовж багатьох років, збільшення обчислювальної потужності сучасних пристроїв досягається не через підвищення тактової частоти та пропускної здатності процесорів, а шляхом застосування гіперпотокових і багатоядерних архітектур. Ця проста зміна підходу до дизайну комплектуючих призвела до драматичних змін в організації обчислень і стала поворотним пунктом для розробників програмного забезпечення. Програмне забезпечення, яке має скористатися збільшенням обчислювальної потужності багатоядерних архітектур, повинно бути розроблена таким чином, щоб мати змогу одночасно виконувати кілька завдань. При висвітленні теми паралельних/одночасних обчислень науковці та фахівці в галузі ІТ користуються двома термінами: (1) «паралелізм» (англ. parallelism) та (2) «одночасне/узгоджене виконання» (англ. сoncurrency). Третім важливим терміном при розгляді паралельних/одночасних обчислень, є «багатопотоковість» (multithreading). У C++ двома найпоширенішими способами реалізації паралелізму є узгоджене виконання та власне паралелізм. Хоча їх можна використовувати і в інших мовах програмування, C++ виділяється своїми можливостями використання одночасних обчислень з нижчим, ніж середнє, залученням загальних ресурсів машини, а також здатністю виконувати складні інструкції. У стандарті C++11 була запропонована підтримка багатопотокових програм. Стандарт C++ визнавав існування багатопотоковості у мові та надавав компоненти для написання багатопотокових програм у бібліотеці . Це зробило можливим написання багатопотокових програм на C++, не покладаючись на специфічні для певної платформи розширення, та дало змогу створювати портативний багатопотоковий код із гарантованою поведінкою. Бібліотека надає широкі можливості для організації паралельних та узгоджених/одночасних обчислень, містить також модель пам’яті C++, умовні змінні, м’ютекси та ін. для синхронізації роботи потоків. У статті здійснено аналіз можливостей написання програм мовою C++ з використанням кількох потоків для паралельного та/або узгодженого виконання завдань, а також розгляд функцій мови C++ і засобів бібліотеки , які роблять це можливим. | |
dc.description.abstract | For many years, the increase in computing power of modern devices is achieved not by increasing the clock frequency and bandwidth of CPUs, but by using hyper-threaded and multicore architectures. This simple change in approach to the CPU design led to dramatic changes in the organization of computing and became a turning point for software developers. Software that is going to take advantage of the increased computing power of multi-core architectures must be designed to be able to perform multiple tasks simultaneously. When covering the topic of parallel/simultaneous computing, scientists and IT professionals use two terms: (1) parallelism and (2) concurrency. A third important term when considering parallel/simultaneous computing is “multithreading”. In C++, the two most common ways to implement parallelism are concurrency and parallelism itself. Although they can be used in other programming languages, C++ stands out for its ability to use concurrent computations with lower-than-average utilization of general machine resources, as well as its ability to execute complex instructions. The C++11 standard introduced support for multi-threaded programs. The C++ standard recognized the existence of multithreading in the language and provided components for writing multithreaded programs in the library. This made it possible to write multithreaded programs in C++ without relying on platform-specific extensions and enabled the creation of portable multithreaded code with guaranteed behavior. The library provides extensive opportunities for organizing parallel and concurrent calculations, it also contains the C++ memory model, conditional variables, mutexes, etc. for thread synchronization. The article analyzes the possibilities of writing programs in the C++ using multiple threads for parallel and concurrent execution of tasks. It also considers the features of the C++ and the tools of the library that make parallelism and concurrency possible. | |
dc.format.extent | 19-27 | |
dc.format.pages | 9 | |
dc.identifier.citation | Андрушко А. Організація багатопотокових обчислень в С++ / Андрій Андрушко, Олександр Маркелов // Комп’ютерні системи проектування. Теорія і практика. — Львів : Видавництво Львівської політехніки, 2023. — Том 5. — № 1. — С. 19–27. | |
dc.identifier.citationen | Andrushko A. Creating multithreaded ptograms in C++ / Andriy Andrushko, Oleksandr Markelov // Computer Design Systems. Theory and Practice. — Lviv : Lviv Politechnic Publishing House, 2023. — Vol 5. — No 1. — P. 19–27. | |
dc.identifier.doi | doi.org/10.23939/cds2023.01.019 | |
dc.identifier.uri | https://ena.lpnu.ua/handle/ntb/111491 | |
dc.language.iso | uk | |
dc.publisher | Видавництво Львівської політехніки | |
dc.publisher | Lviv Politechnic Publishing House | |
dc.relation.ispartof | Комп’ютерні системи проектування. Теорія і практика., 1 (5), 2023 | |
dc.relation.ispartof | Computer Design Systems. Theory and Practice, 1 (5), 2023 | |
dc.relation.references | 1. Sutter H. (2009). The Free Lunch Is Over: A Fundamental Turn Toward Concurrency in Software. Retrieved from: www.gotw.ca/publications/concurrency-ddj.htm | |
dc.relation.references | 2. Acar U. A., Chargueraud A., Rainey M. (2016). An Introduction to Parallel Computing in C++. Retrieved from: www.cs.cmu.edu/afs/cs/academic/class/15210-f18/www/pasl.html | |
dc.relation.references | 3. Wataru E., Shigeyuki S., Kenjiro T. (2022). ComposableThreads: Rethinking User-level Threads with Composability and Parametricity in C++, Journal of Information Processing, Vol.30, 269–282. https://doi.org/10.2197/ipsjjip.30.269 | |
dc.relation.references | 4. Qiu W., Zhang Y., Wang L. (2019). Visual C + + and MFC Application in Safety Monitoring System of Airplane Depot, Advances in Computer Science Research, volume 88, 40-45, CNCI 2019, Atlantis Press. https://doi.org/10.2991/cnci-19.2019.6 | |
dc.relation.references | 5. Thelin R. (2020). A tutorial on modern multithreading and concurrency in C++. Retrieved from: www.educative.io/blog/modern-multithreading-and-concurrency-in-cpp | |
dc.relation.references | 6. Сіциліцин Ю. О. (2022). Моделювання змісту дисципліни «Паралельні та розподілені обчислення», Педагогічні науки: теорія та практика, № 4 (44), 23-28. https://doi.org/10.26661/2786-5622-2022-4-03 | |
dc.relation.references | 7. Wilson C. (2019). Multithreading and concurrency fundamentals. Retrieved from: www.educative.io/blog/multithreading-and-concurrency-fundamentals | |
dc.relation.references | 8. Williams A. (2019). C++ Concurrency in Action, Second Edition. Manning Publications Co. Shelter Island, NY. | |
dc.relation.references | 9. The Difference Between Asynchronous and Multi-Threading (2023). Retrieved from: www.baeldung.com/cs/async-vs-multi-threading | |
dc.relation.references | 10. MemarianK.,Matthiesen J., Lingard J.,Nienhuis K., Chisnall D., Watson R.N.M., Sewell P. (2016). Into the depths of C: elaborating the de facto standards, PLDI '16: Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, 1–15.https://doi.org/10.1145/2908080.2908081 | |
dc.relation.references | 11. Mahapatra S. (2023). Multithreading in C++. Retrieved from: www.geeksforgeeks.org/multithreading-in-cpp | |
dc.relation.references | 12. Ajkunic E., Fatkic H., Omerovic E., Talic K., Nosovic N. (2012). A Comparison of Five Parallel Programming Models for C++, 2012 Proceedings of the 35th International Convention, MIPRO 2012, Opatija, Croatia, May 21-25, 2012. IEEE 2012, 1780-1784. | |
dc.relation.referencesen | 1. Sutter H. (2009). The Free Lunch Is Over: A Fundamental Turn Toward Concurrency in Software. Retrieved from: www.gotw.ca/publications/concurrency-ddj.htm | |
dc.relation.referencesen | 2. Acar U. A., Chargueraud A., Rainey M. (2016). An Introduction to Parallel Computing in C++. Retrieved from: www.cs.cmu.edu/afs/cs/academic/class/15210-f18/www/pasl.html | |
dc.relation.referencesen | 3. Wataru E., Shigeyuki S., Kenjiro T. (2022). ComposableThreads: Rethinking User-level Threads with Composability and Parametricity in C++, Journal of Information Processing, Vol.30, 269–282. https://doi.org/10.2197/ipsjjip.30.269 | |
dc.relation.referencesen | 4. Qiu W., Zhang Y., Wang L. (2019). Visual C + + and MFC Application in Safety Monitoring System of Airplane Depot, Advances in Computer Science Research, volume 88, 40-45, CNCI 2019, Atlantis Press. https://doi.org/10.2991/cnci-19.2019.6 | |
dc.relation.referencesen | 5. Thelin R. (2020). A tutorial on modern multithreading and concurrency in C++. Retrieved from: www.educative.io/blog/modern-multithreading-and-concurrency-in-cpp | |
dc.relation.referencesen | 6. Sitsylitsyn Yu. O. (2022). Modeliuvannia zmistu dystsypliny "Paralelni ta rozpodileni obchyslennia", Pedahohichni nauky: teoriia ta praktyka, No 4 (44), 23-28. https://doi.org/10.26661/2786-5622-2022-4-03 | |
dc.relation.referencesen | 7. Wilson C. (2019). Multithreading and concurrency fundamentals. Retrieved from: www.educative.io/blog/multithreading-and-concurrency-fundamentals | |
dc.relation.referencesen | 8. Williams A. (2019). C++ Concurrency in Action, Second Edition. Manning Publications Co. Shelter Island, NY. | |
dc.relation.referencesen | 9. The Difference Between Asynchronous and Multi-Threading (2023). Retrieved from: www.baeldung.com/cs/async-vs-multi-threading | |
dc.relation.referencesen | 10. MemarianK.,Matthiesen J., Lingard J.,Nienhuis K., Chisnall D., Watson R.N.M., Sewell P. (2016). Into the depths of C: elaborating the de facto standards, PLDI '16: Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, 1–15.https://doi.org/10.1145/2908080.2908081 | |
dc.relation.referencesen | 11. Mahapatra S. (2023). Multithreading in C++. Retrieved from: www.geeksforgeeks.org/multithreading-in-cpp | |
dc.relation.referencesen | 12. Ajkunic E., Fatkic H., Omerovic E., Talic K., Nosovic N. (2012). A Comparison of Five Parallel Programming Models for C++, 2012 Proceedings of the 35th International Convention, MIPRO 2012, Opatija, Croatia, May 21-25, 2012. IEEE 2012, 1780-1784. | |
dc.relation.uri | https://doi.org/10.2197/ipsjjip.30.269 | |
dc.relation.uri | https://doi.org/10.2991/cnci-19.2019.6 | |
dc.relation.uri | https://doi.org/10.26661/2786-5622-2022-4-03 | |
dc.relation.uri | https://doi.org/10.1145/2908080.2908081 | |
dc.rights.holder | © Національний університет “Львівська політехніка”, 2023 | |
dc.rights.holder | © Андрушко А., Маркелов О., 2023 | |
dc.subject | С++ | |
dc.subject | багатопотоковість | |
dc.subject | паралелізм | |
dc.subject | одночасне/узгоджене виконання | |
dc.subject | синхронізація потоків | |
dc.subject | C++ | |
dc.subject | multithreading | |
dc.subject | parallelism | |
dc.subject | concurrency | |
dc.subject | thread synchronization | |
dc.title | Організація багатопотокових обчислень в С++ | |
dc.title.alternative | Creating multithreaded ptograms in C++ | |
dc.type | Article |
Files
License bundle
1 - 1 of 1