Is Ada a good candidate for multiprocessor systems?

Background/Objectives: Choosing a proper programming language for optimizing performance of multiprocessor systems is a trite object in the recent data processing era. Methods/Statistical Analysis: This research investigates Ada concomitant features for multicore programming. We have done several experiments to back the step that Ada is one of the best candidates for multiprocessor systems and this language is childbearing to be improved for multicore prospectus. Finding: By analyzing the simulation result we can say that Ada new features for supporting multicore programming are useful and they have improved the simulation speed. Thus it’s better to schedule our tasks and set task affinity by a determined scenario using Ada new libraries rather than giving it simply to the underlying operation system.


Introduction
Ada programming language with a long history of existence already proved by large amount of sensitive real time, embedded and concurrent applications and inseparably supports concurrent programming with tasks.
For example, Vision Systems Ltd. of Australia lower used Ada instead of C to reduce their bugs from 1.25% to 0.36%, also they improve their testing time up to 55%. For the first time Rational Software's 1995 study compared the Ada and C programs. Verdix, had performed 50 percent of code lines in C and 50 percent in Ada. The Ada code in comparison to C reduces the defects and the overall development cost by 50% and 35% respectively. This sign bestow to academia as well. Previous researches, reported that the efficiency of programmers in their project on real-time and embedded software application are more efficient by utilizing Ada. Indeed, no one accomplished the coding remarkable, when using C. In other words, Three-quarters of the rank finished it by Ada, even proposed a partial part of the code (less than 20 percent). Also, it can be founded that with improving the skills and increasing the experience, the efficiency of Ada would be increased rapidly.
Programmer productiveness is always an interest, so tools that force it easier to compose excellent programs are efficient. The productivity and efficiency of coding are affected by the skillful of the language in huge programming solutions. Ada is to comprehend vie to various concurrent languages/frameworks, however, possession inherent support for task should spouse it more instinctive for various programmers to inscribe parallel programming in which increase the performance rate and rapids the program development.
Multiprocessor platforms are suitable model for more large embedded real-time development programs. Ada assigns its tasks to be accomplished on such systems, but in later versions, it does not clear support them clearly. The modern revise of Ada programming language know supply convenience for localize and programming duties on SMP system. The concept of a CPU and Is Ada a good candidate for multiprocessor systems?
Dispatching-Domain are entered. These properties and specifications have been summarized in this paper till recently.
The original need for assisting the execution of Ada duties on multiple systematic processors symmetric multiprocessors is to control the mapping of duties to system CPU. In order to specify tasks to processors, two following methods are presented: • Fully subdivided -each duty is specified to a single system CPU on which all its tasks should be ran. • Universal -all duties are ran on all system CPU, tasks can migrate during performance.
Ada supports both schemes. For global scheduling, tasks are limited to a subset of the valid processors; and for partitioned scheduling; The program can clearly turn a task's affinity and so, it causes to be moved at run-time1-4.
Dispatching domain shows a block of systems CPU with universal programming happens. A duty is called to be related to a dispatching zone and it can be bound to an especial processor. Most of the concentration with multiple core systems has been on the relating and dedicating of tasks to cores. It is essential for languages to be performed by static and dynamic models of this allocation simultaneously. However, as the number of cores grows and platforms become more inharmonious it would be essential to recognize and maintain parallel performance. There are distinct platforms such as one, limited and several cores. Most languages were determined for single processors. A 'limited cores' are based on number fewer than the inherent number of tasks, which are existed in the system. In these structures, the advantages of parallel run can be identified clearly. Tasks are mapped statically or dramatically to its inside system. In the simulation procedure there are regularly more duties than cores and so adequate operation of the hardware is created. In many cases that there are more ones than duties, the parallelism should only be utilized if parallelism within duties is recognized or utilized5.
This study investigates Ada programming language concurrent features and does some simulation experiments with models on different platforms to show if Ada is a good choice for multicore programming in the modern era. Section 2 of this paper introduced Ada programming language, its technical features and GNAT compiler briefly. Section 3 focuses on related works to analyzing Ada for multicore programming. Section 4 introduces Ada concurrent features. Descriptions of multiprocessor systems are in Section 5. Next section talks about Ada 2012 and multiprocessor systems relationships. Section 7 contains our implemented Ada models. The simulation results are in the last section and the final section is the conclusion.

Ada 2012 Advantages besides the Barriers for using it
The advantages of Ada 2012 are classified in categories which are named below: • Introduction of dynamic contracts (Assert pragma…). The reasons listed below for not using Ada with all of these advantages are largely cultural: • It is covered by its defense background.
• It works in a smaller universe.
• It lacks cool.
Programmers prefer to use languages, due to their stylish, however more that they like to be part of a community with plenty of noise and novelty and Ada doesn't propose that propose in relation to the various platforms. At the other extreme, Ada provides a task built option into core languages, which needs to know more languages. Some of them mentioned that it is easier to apply parallel programming 6 . Table 1 has presented some significant technical features of Ada programming language, classified by their application field.

Related Works
Karl Nyberg applied Ada's language with multicore hardware in 2007. They compared the sequential and dutybased extension of both applications (word counting and calculating checksums). On the word count algorithm, with increasing the number of tasks, the elapsed time decreased. Since file I/O effects on performance, its improvement did not vary linearly. The control program used fewer I/O activities and so demonstrated a reduction in used time that increased more linearly as more duties were utilized. The tasking overhead limited total throughput to about 50% 6  Other research has been conducted in the context of direct synthesis of Ada code to hardware where these parallel calls should be directly mapped in the FPGA. It was concluded from them that, now it was not considered to be needed. Some other recent research about system level hardware design and simulation with Ada is done and had some unique results. The support that Ada gives for codes operation and performance on multiple CPU system was the subject of various papers [7][8][9][10][11][12][13][14] . There are lots of references that shows doing research on parallel programming in Ada programming language since long time ago 15-17 .

Ada 2012 useful Packages for Leveraging Multiprocessor Systems
The Ada packages designed for supporting multiprocessor domain allow system processors to be divided into a share set of non-overlapping 'sendoff zone' . One sendoff zone domain is called to be the platform sendoff zone; the environmental duty and any derived from that duty are dedicated to the 'platform' sendoff zone. New sendoff zone can be created by subprograms. Tasks should be dedicated and specified to just one sendoff zone or limited to more than one processor. System, Multiprocessor is illustrated in Figure 1. The necessary comments are put near related lines. Multiple inheritance using interfaces and the ability to make calls using prefixed notation The second package called System Multiprocessors. Dispatching Domains provides the support for Dispatching Domains as its name shows. The specification of this package is presented in Figure 2.

Multiprocessor Systems Programming
C and C++ do not support multitasking inherently and it cannot be added as a postscript. The languages such as Simula-67, PL-I and Algol-68, all contained specifications for controlling parallel performance on multiple CPU systems. Also, Ada is a significant and important language in in multiprocessing issues. The Ada-83 version of the program has a good-extended program of multithreading (named "tasking" in Ada) with high-stage readable constructs. Other versions of this language also improved this feature. Java has some low-level and error-prone facilities for multithreading. Per Brinch-Hansen's, accused the designers of Java of launching out multiple years of projects in concurrency; however Java's facilities in that area are certainly disappointing 18 . There are useful researches on different aspects of multiprocessor systems which are more than this discussion 19-22 .

Ada 2012 and Multiprocessor Systems: Most Important Features
In the recent years programming multicore systems is an interesting objective. As Robert Dewar notes in his EE Times commentary, "There's nothing new about multicore mania". Decades of experience have been accumulated in using Ada to deal with the problem of writing programs that run effectively on machines using more than one processor". Some researchers are not considering and negligible this experience and searching for new methods to do multiple procedure systems for cultural reasons. Ada programmers will be utilizing Ada to construct highextension multiprocessor CPU approaches. Some other features are discussed in 23-26 .

Sendoff Zone in Ada 2012
Ada 2012 support duty dependence by providing Sendoff Zone 9,27,28 . This language expresses Sendoff Zone as static specification. So, creating changes involving migration of processors from one Sendoff Zone to another is not able to be used. Reconstruction Sendoff Zone when the underlying hardware change is not supported either. Supporting dynamic would be better than static one to address these situations. It should be considered that in this version of Ada 2012, the set of processors are fixed for its whole time, so for applying the variations and to achieve dynamic response, the commands should be sent to the language out of the language.

Preference, Deadline and Tendency
Preference, latest time and tendency can be varied dynamically (Set_ { Preference, Deadline, processor}). Ada 2012 provides the facility which makes it possible to vary deadline and tendency after a delay (Delay_Until_ And_Set_ { latest time, processor}), however, it is not able to tune more than one of these features, which causes incorrect scheduling and so, the risk of error increases 29 .
In the operation process, a duty is ran inherits the operation priority that is more possible to be activated (Ada 2012 RM 9.2) had at the time the operation was stated. While tryst, the duty passing the all call inherits the priority of the entry procedure. In the process of a protected operation on a constant object, a duty inherits the ceiling priority of the constant object (9.5, D.3, D.1).
Proposed Ada program, although provides sendoff zones, imposes a single programming policy in all zones. So, preference assignments in all CPU systems can be universally coherent. By following this method, succession of a preference is valid.

Ada Models
We have implemented a concurrent model that utilizes four basic operations. This program calculates the result of addition, subtraction, multiplication and division on four pair constant arrays of integer numbers. Each pair of the arrays applies to one specific type of arithmetic operation to eliminate data dependency and resource control problems in data sharing between concurrent tasks. Also to see the side effects of data dependency on task execution speed we have done the operations with a shared pair of arrays, again. We have implemented the source code in three different models regarding the number of the tasks involved. The first model consist of a simple task to do all arithmetic operations, the second model consist of two task to do half of the operations each task and the number of the tasks in the last model is equal to the number of operations (one basic operation each task). The following figures illustrate the Ada models described above explicitly (Figures 3, 4 and 5).

Simulation Results
We have done some simulation on different platforms with different models to evaluate the speed up gained using new library packages useful for multicore programming in Ada language. We have done the simulation on the windows based platforms with different number of cores (1 core, two cores and 4 cores) using GNAT 2012 compiler on Windows. We have measured the execution time using Ada.Execution_Time package facilities (Tables 2 to 5).

Conclusion
A concurrent program consists of elements which effects on each other directly or by the shared references. Ada can model each of these components, which named a task. Straight relation among two duties can be reached by a rendezvous. Shared references are traced to a constant and fixed object (which provides mutual deprivation). Ada tasks are allocated to multiprocessor CPU system, to multiple fields on a single CPU system or to multi inside CPU system of a only one CPU, depending on the compiler and goal surroundings. It should be noted that it is not necessary to change with variation of environments. It is obvious that it is required that writing program with the features of easily and efficiently leverage parallel hardware. For Ada programming language it equals with procedure that the writer can designate code which should be executed in parallel. This paper was about Ada multicore programming challenges with the new multiprocessor architectures. The simultaneous support for multi procedure CPU system in Ada 2012 is sendoff zones for task dependencies. It matches the support typically proposed by multi procedure CPU acting systems. In systems with non-SMP configuration, a lot of possibilities are existed for each programming codes which tries to provide the efficient production and predicable codes. In some cases intelligent compilers can remove these difficulties, however, it is similar to that some summarized delegation of the system will require to be existing at the program stage.
Ada 2012 gives good extra features for multi-processor codes and now GNAT provides a main share of it. A few pragmas like Volatile were improved to create the life of Ada applicants on multiple procedure CPU system to be convenient, by adding some cost to performance fine, and a little job on compiler vendor's system. Since the mentioned ability and facilities are not supported by action systems the area of modifications to new sendoff policies has not been paid more interesting.
By analyzing the simulation result we can say that Ada new features for supporting multicore programming are useful and they have improved the simulation speed. Thus it's better to schedule our tasks and set task affinity by a determined scenario using Ada new libraries rather than giving it simply to the underlying operation system. In overall, it can be mentioned that Ada is a proper and sufficient language for multicore chips, which its advantages and priority to the other programs were identified.