Abstract

Modern multi-core systems are most effective when used in large server centers and for cloud computing. However, despite the known complexity of software implemen-tation, parallel computing on multiprocessors is increasingly used in computer model-ling. Advanced mechanisms of synchronous and multithreaded programming are in-creasingly used to improve the productivity of numerical studies, reducing the time of computer models implementation. One such mechanism is coroutines, a convenient tool for managing asynchronous operations introduced in the C++20 standard. A special feature of coroutines is the ability to suspend a function at a certain stage, saving its state, and after some time resume its execution from the previous stop. The aim of this research is to improve the performance of computer modelling by using coroutines and data threads. As a result of the work, a test algorithm for multiplying a matrix by a vector and its modified asynchronous version using the coroutine mechanism and splitting into two data threads was developed, which allowed to achieve 1.94 times increase in the com-puting speed when the matrix dimension is 15000 (2.25×106 elements). It has been found that at a small matrix dimension, the developed asynchronous algorithm using coroutines and splitting into two threads is less efficient than the single thread algo-rithm. This is due to the fact that the compiler needs some time to create threads and start execution simultaneously. With a large dimensionality, the performance of the asynchronous algorithm increases significantly. With a matrix dimension of more than 1200, the use of an asynchronous algorithm divided into two threads is guaranteed to be more efficient than a single-threaded. The data obtained are consistent with the results of similar studies of the problem of increasing the efficiency of computer modelling using alternative software and hard-ware. The new method of solving the problems of asynchronous programming provides a more efficient and simple mechanism for managing asynchronous operations.

Full Text
Published version (Free)

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