Russian Journal of Resources, Conservation and Recycling
           

2020, Vol. 7, No. 2. - go to content...

Permanent address of this page - https://resources.today/en/09inor220.html

Метаданные этой статьи так же доступны на русском языке

DOI: 10.15862/09INOR220 (https://doi.org/10.15862/09INOR220)

Full article in PDF format (file size: 426.4 KB)


For citation:

Zainetdinov A.R., Rudzeyt O.U., Nedyak A.V. Improving the performance of fragments of computer code with high time costs based on parallel programming technologies. Russian journal of resources, conservation and recycling. 2020; 7(2). Available at: https://resources.today/PDF/09INOR220.pdf (in Russian). DOI: 10.15862/09INOR220


Improving the performance of fragments of computer code with high time costs based on parallel programming technologies

Zainetdinov Artem Rishatovich
Far eastern federal university, Vladivostok, Russia
E-mail: zainet.ar@gmail.com

Rudzeyt Oleg Urievich
Far eastern federal university, Vladivostok, Russia
E-mail: rudzeyt18@mail.ru

Nedyak Anton Vitalievich
Far eastern federal university, Vladivostok, Russia
E-mail: nedyaq@gmail.com

Abstract. This article describes the process of converting the program from single-threaded to multithreaded mode. The influence of the number of threads of execution on the total execution time of the code. The problem of spending much time to run programs solved by incremental parallelization when the code is designed for sequential execution, are added to the parallelizing directives. Are similar libraries for working with threads in other programming languages and the advantages of OpenMP over other libraries. Considered a model of parallelizing OpenMP directives, which is time-consuming to run the snippet in multi-threaded mode. The article also presents example code implemented using the C++ language, which built the parallelizing directives of OpenMP. In this model, the estimated execution time of a code snippet of a program with different number of threads. The study showed that with increasing the number of threads the run time is significantly reduced on the average in 1,5–2 times. This happens until the moment when the number of threads will be equal to the number of processor cores. If the number of threads becomes greater than the number of processor cores, the execution time of the program remains virtually unchanged. Are the OpenMP library allows to significantly shorten the program, which can be critical for works of real-time systems, to reduce the time of creating multithreaded applications is simple inserts directives of the library, to reduce the number of errors made by the programmer in the course of working with multi-threaded applications.

Keywords: threads; parallelization; OpenMP library; C++ programming language; multithreading; performance; directive

Download article in PDF format

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.

ISSN 2500-0659 (Online)