ArticleslgStudy

computer science

Instruction-level parallelism

Instruction-level parallelism is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Instruction-level parallelism rather than just read about it. In short: Instruction-level parallelism (ILP) is the parallel or simultaneous execution of a sequence of instructions in a computer program. More specifically, ILP refers to the average number of instructions run per step of this parallel execution.

Instruction-level parallelism — main illustration
Instruction-level parallelism — illustration

Key takeaways

  • Instruction-level parallelism belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Instruction-level parallelism to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Instruction-level parallelism from memory before moving on to harder problems.

Reference excerpt

Instruction-level parallelism (ILP) is the parallel or simultaneous execution of a sequence of instructions in a computer program. More specifically, ILP refers to the average number of instructions run per step of this parallel execution.

Discussion ILP must not be confused with concurrency. In ILP, there is a single specific thread of execution of a process. On the other hand, concurrency involves the assignment of multiple threads to a CPU's core in a strict alternation, or in true parallelism if there are enough CPU cores, ideally one core for each runnable thread. There are two approaches to instruction-level parallelism: hardware and software. ILP is implemented either as Hardware-level dynamic parallelism or software-level ILP static parallelism. With hardware-level parallelism, the processor decides which instructions to execute in parallel, at the time the code is already running, whereas software-level parallelism means the compiler plans, ahead of time, which instructions to execute in parallel. Modern x86 processors use multiple techniques to achieve hardware-level parallelism, while the Itanium architecture made significant software-level parallelism possible, but also relied on it for its code to be efficient. Consider the following program:

Operation 3 depends on the results of operations 1 and 2, so it cannot be calculated until both of them are completed. However, operations 1 and 2 do not depend on any other operation, so they can be calculated simultaneously. If we assume that each operation can be completed in one unit of time, then these three instructions can be completed in a total of two units of time, giving an ILP of 3/2. A goal of compiler and processor designers is to identify and take advantage of as much ILP as possible. Ordinary programs are typically written under a sequential execution model where instructions execute one after the other and in the order specified by the programmer. ILP allows the compiler and the processor to overlap the execution of multiple instructions or even to change the order in which instructions are executed. How much ILP exists in programs is very application-specific. In certain fields, such as graphics and scientific computing, the amount can be very large. However, workloads such as cryptography may exhibit much less parallelism. Micro-architectural techniques that are used to exploit ILP include:

Instruction pipelining, where the execution of multiple instructions can be partially overlapped. Superscalar execution, VLIW, and the closely related explicitly parallel instruction computing concepts, in which multiple execution units are used to execute multiple instructions in parallel. Out-of-order execution where instructions execute in any order that does not violate data dependencies. Note that this technique is independent of both pipelining and superscalar execution. Current implementations of out-of-order execution dynamically (i.e., while the program is executing and without any help from the compiler) extract ILP from ordinary programs. An alternative is to extract this parallelism at compile time and somehow convey this information to the hardware. Due to the complexity of scaling the out-of-order execution technique, the industry has re-examined instruction sets which explicitly encode multiple independent operations per instruction. Register renaming, which refers to a technique used to avoid unnecessary serialization of program operations imposed by the reuse of registers by those operations, used to enable out-of-order execution. Speculative execution, which allows the execution of complete instructions or parts of instructions before being certain whether this execution should take place. A commonly used form of speculative execution is control flow speculation, where instructions past a control flow instruction (e.g., a branch) are executed before the target of the control flow instruction is determined. Several other forms of speculative execution have been proposed and are in use, including speculative execution driven by value prediction, memory dependence prediction, and cache latency prediction. Branch prediction, which is used to avoid stalling for control dependencies to be resolved. Branch prediction is used with speculative execution. ILP is exploited by both the compiler and hardware, but the compiler also provides inherent and implicit ILP in programs to hardware by compile-time optimizations. Some optimization techniques for extracting available ILP in programs include instruction scheduling, register allocation/renaming, and memory-access optimization. Dataflow architectures are another class of architectures where ILP is explicitly specified; for a recent example, see the TRIPS architecture. In recent years, ILP techniques have been used to provide performance improvements in spite of the growing disparity between processor operating frequencies and memory access times (early ILP designs such as the IBM System/360 Model 91 used ILP techniques to overcome the limitations imposed by a relatively small register file). Presently, a cache miss penalty to main memory costs several hundreds of CPU cycles. While in principle it is possible to use ILP to tolerate even such memory latencies, the associated resource and power dissipation costs are disproportionate. Moreover, the complexity and often the latency of the underlying hardware structures results in reduced operating frequency, further reducing any benefits. Hence, the aforementioned techniques prove inadequate to keep the CPU from stalling for the off-chip data. Instead, the industry is heading towards exploiting higher levels of parallelism that can be exploited through techniques such as multiprocessing and multithreading.

See also Data dependency Memory-level parallelism (MLP)

References

Further reading Aiken, Alex; Banerjee, Utpal; Kejariwal, Arun; Nicolau, Alexandru (2016-11-30). Instruction Level Parallelism. Professional Computing (1 ed.). Springer. ISBN 978-1-4899-7795-3. ISBN 1-4899-7795-3. (276 pages)

External links Approaches to addressing the Memory Wall Wired magazine article that refers to the above paper https://www.scribd.com/doc/33700101/Instruction-Level-Parallelism#scribd http://www.hpl.hp.com/techreports/92/HPL-92-132.pdf Archived 2016-03-04 at the Wayback Machine

Illustrations

Instruction-level parallelism: Atanasoff–Berry computer, the first computer with parallel processing[1]
Atanasoff–Berry computer, the first computer with parallel processing[1]

Worked examples

Example 1 — a first encounter with Instruction-level parallelism

Start with the simplest possible case. Write down what Instruction-level parallelism claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Instruction-level parallelism before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Instruction-level parallelism ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Instruction-level parallelism

In research
Instruction-level parallelism appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Instruction-level parallelism in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Instruction-level parallelism is common in secondary-school and first-year university syllabi. It links to neighbouring topics Instruction processing, Parallel computing, so understanding it makes those chapters shorter.
In everyday life
Look for Instruction-level parallelism outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Instruction-level parallelism” →

How to study Instruction-level parallelism in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Instruction-level parallelism means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Instruction-level parallelism out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Instruction-level parallelism in simple terms?

Instruction-level parallelism (ILP) is the parallel or simultaneous execution of a sequence of instructions in a computer program. More specifically, ILP refers to the average number of instructions run per step of this parallel execution.

Why does Instruction-level parallelism matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Instruction-level parallelism?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Instruction-level parallelism.

Tags

  • Instruction processing
  • Parallel computing

Keep exploring