THE ORGANIZATION OF PARALLEL COMPUTING ON THE .NET PLATFORM, MSDN VIRTUAL LABS

Cand.Tech.Sci. Borankulova G. S., Bachelor student Badanova A.K.

Taraz State University named after M.Kh. Dulaty

Currently the wide circulation of parallel architecture of computing systems, such as multicore processors, clusters and GRID architecture, causes increase of interest to development tools of the software capable most fully to use hardware resources of this type.

Parallel computing — it is a way of the organization of computer computing at which programs are developed as a set of the interacting computing processes working in parallel. The term covers a set of questions of concurrency in programming, and also creation of effectively operating hardware realization.

There are various ways of realization of parallel computing. For example, each computing process can be realized in the form of process of an operating system, or computing processes can represent a set of streams of performance in one process of OS. Parallel programs can be executed physically or sequentially on the only processor — passing in turn steps of performance of each computing process, or in parallel — allocating to each computing process one or several processors (which are nearby or distributed in a computer network).

That the problem could be solved with the help of parallel computing, the algorithm of the solution of a task has to allow parallelization, not each task can be solved by parallel algorithm.

The following program interfaces and libraries are available to the organization of parallel computing: OpenMP (www.openmp.org) (for systems with general (shared) memory) and MPI (Message Passing Interface, www.mcs.anl.gov/mpi) (for systems on the basis of transmission of messages). They are focused, generally on languages C and FORTRAN. Programming on MPI often is compared to programming on the assembler, each process works in the address space, no general variables or data in MPI are present. The main way of interaction between processes is the obvious parcel of messages from the one process to another.

On the basis of the .NET platform of Microsoft firm the model of asynchronous parallel programming within the Polyphonic C# language is also available. This model is based on so-called join-calculation - mathematical calculation of processes with the high-level mechanism of processing of messages which is adequately abstracting the corresponding low-level mechanism (on the basis of IP addresses, ports and sockets) which is used in modern computer systems.

Introduction of new designs for parallel programming - asynchronous methods and sheaves (chords) in the Polyphonic C# language which is expansion of the C# language, eliminates the need for System.Threading library which usually is required for implementation of multithreaded applications within .NET.

Creation of the MC# language on the .NET platform became the following step towards to increase in number of the programmers owning bases of parallel programming and to increase of efficiency of their work.

The MC# language is adaptation and development of basic ideas of the Polyphonic C# language on a case of the parallel and distributed computing.

In comparison with use of the MPI interface, in programs in the MC# language there is no need obviously to operate distribution of computing processes on processors (kernels, cluster knots, Grid-networks machines) though necessary for this means in language are also provided. To write the parallel program in the MC# language, it is only enough to specify by means of special keywords (async or movable) what functions (methods of classes) can be executed in parallel (distributed). Besides, new computing processes can be created and be distributed on available knots (in the distributed mode) dynamically during execution of MC#-programs that is impossible for MPI programs.

Beginners studying of parallel computing can visit the official site of Microsoft (http://www.microsoft.com), the virtual laboratory MSDN Virtual Lab where anyone can study the new tool, a platform or technology through the remote called virtual computers is presented there. There are detailed, step-by-step laboratory tasks on all to the directions, including on algorithms of parallel calculation. Laboratory tasks are written quite clearly, step by step, performing each task, the programmer learns to parallelize the existing algorithms using the static class Parallel helper, to create and carry out the tasks capable to finish processes and to return values, and also to use Parallel LINQ (PLINQ) for optimization of LINQ of inquiries on performance in the parallel environment.

In MSDN Virtual Lab Introducing.NET4.Parallel Extensions we did 3 laboratory works allowing to understand an essence of parallel calculation. For each work on the site it is possible to download a ready initial code, to start and look at result. Laboratory works can be done as in the most virtual laboratory, and locally by own machine.

In the first laboratory work the class of employees, with the corresponding number ID is given, time of the beginning of processing for the employee with his ID number, and time of the end of process is brought to the console. After start of the program on the console we see the following picture: all employees are processed according to their ID numbers, that is processes are carried out consistently. Then we are offered to parallelize this algorithm, using the static class Parallel helper and its methods. After addition in algorithm of class methods Parallel helper, we observe other picture: now employees are optional processed according to their numbers, moreover, the following process begins, without waiting for end of previous. In general all work of the program is performed much quicker, than in case of consecutive performance.

In the subsequent laboratory we work on the same class of employees, reaching overlapping by other methods. In the second laboratory work, overlapping is reached by use of the class Task, and it’s Task Manager. In the third laboratory work Generic Task with value return is used, for parallelization of algorithm Parallelized LINQ (PLINQ) inquiries are used.

Having done laboratory works in MSDN Virtual Lab Introducing.NET4.Parallel Extensions, we expanded the idea of parallel computing, acquainted with logic of parallel algorithms work and received practical skills parallelization of linear algorithms in the environment of .Net.

Being that parallel computing at the moment change our idea of an essence of software development and in the near future parallel programming will take priority positions in a software development sphere, similar virtual laboratories serve as a good grant for studying of such difficult paradigm of programming, as parallel computing.

 

Literature

1)     Статья «Параллельные вычисления» http://www.wikiznanie.ru

2)     Новые средства языка MC#: async- и  movable-методы, каналы и обработчики, стр 5, Интернет Университет  http://www.intuit.ru/department/calculate/clusterexec/4/ (New means of the MC# language: async-and movable-methods, channels and handlers, p. 5, Internet University)

3)     Официальный сайт MSDN раздел Microsoft Developer Network>Lern>MSDN Virtual Labs «Welcome to MSDN Virtual labs» http://msdn.microsoft.com/en-us/aa570323 (Official site of MSDN section Microsoft Developer Network>Lern>MSDN Virtual Labs «Welcome to MSDN Virtual labs»