In addition to these procedures is the code optimization, which is achieved by sophisticated compiler techniques. In the following example that the first two operations are executed in parallel, which have no dependence (data dependency) to each other. In the parallelization of this code but must make absolutely sure, are that the third statement - the sum of education - is carried out only when the two partial sums are calculated.
Code:
1. C = A + B
2. Z = X * Y
3. Sum = C + Z
The goal of the compiler and CPU optimization is to identify possible parallelizable code sections to make this many and parallel to work. This is not easy, because the actual programming and almost all programming languages in use today and associated development tools are designed to sequential processes. The implementation of a sequential program into parallel pieces of code by the techniques of the "Instruction Level Parallelism" encouraged, but also their specific requirements. Modern CPUs are usually put together from several modules. These are the set of registers for temporary storage of data that Arithmetical and Logical Unit (ALU, calculator) to calculate the operations, and a decode logic for the commands.
Bookmarks