Reference:
Gibadullin R.F., Viktorov I.V..
Ambiguous Results when Using Parallel Class Methods within the .NET Framework
// Software systems and computational methods. – 2023. – ¹ 2.
– P. 1-14.
DOI: 10.7256/2454-0714.2023.2.39801.
DOI: 10.7256/2454-0714.2023.2.39801
Read the article
Abstract: Parallel programming is a way of writing programs that can run in parallel on multiple processors or cores. This allows programs to process large amounts of data or perform more complex calculations in a reasonable amount of time than would be possible on a single processor. The advantages of parallel programming: increased performance, load sharing, processing large amounts of data, improved responsiveness, increased reliability. In general, parallel programming has many advantages that can help improve the performance and reliability of software systems, especially with the increasing complexity of computational tasks and data volumes. However, parallel programming can also have its own complexities related to synchronization management, data races, and other aspects that require additional attention and experience on the part of the programmer. When testing parallel programs, it is possible to get ambiguous results. For example, this can happen when we optimize concatenation of float- or double-type data by means of For or ForEach methods of the Parallel class. Such behavior of a program makes you doubt about the thread safety of the written code. Such a conclusion can be incorrect and premature. The article reveals a possible reason for ambiguity of the results received by a parallel program and offers a concise solution of the question.
Keywords: Type decimal, Real numbers, Thread safety, Variability of results, Rounding errors, Multithreading, Programming language CSharp, Parallel programming, NET platform, Class Parallel
References:
X. Fan, R. -a. Wu, P. Chen, Z. Ning and J. Li, "Parallel Computing of Large Eigenvalue Problems for Engineering Structures," 2011 International Conference on Future Computer Sciences and Application, Hong Kong, China, 2011, pp. 43-46, doi: 10.1109/ICFCSA.2011.16.
Xuehui Chen, Liang Wei, Jizhe Sui, Xiaoliang Zhang and Liancun Zheng, "Solving fractional partial differential equations in fluid mechanics by generalized differential transform method," 2011 International Conference on Multimedia Technology, Hangzhou, 2011, pp. 2573-2576, doi: 10.1109/ICMT.2011.6002361.
R. Landau, "Computational Physics: A Better Model for Physics Education?," in Computing in Science & Engineering, vol. 8, no. 5, pp. 22-30, Sept.-Oct. 2006, doi: 10.1109/MCSE.2006.85.
H. Ali, A. Doucet and D. I. Amshah, "GSR: A New Genetic Algorithm for Improving Source and Channel Estimates," in IEEE Transactions on Circuits and Systems I: Regular Papers, vol. 54, no. 5, pp. 1088-1098, May 2007, doi: 10.1109/TCSI.2007.893507.
D. -M.