From the course: Computer Architecture Essentials

Unlock this course with a free trial

Join today to access over 24,500 courses taught by industry experts.

Impact on software: Pipelining

Impact on software: Pipelining

- [Instructor] So what does all of this mean for software developers? Beyond the obvious speed up, pipelining has a significant impact on how software is written and executed. Let's see how. Remember that compilers may reorder the instructions in your code; this helps minimize the negative effects of hazards by carefully rearranging instructions to avoid stalls, but it requires a deep understanding of the hardware's pipeline behavior. When hazards can't be resolved through reordering, compilers or assembly programmers may insert no operation instructions to delay execution until dependencies are resolved. The problem is that bubbles waste cycles, reducing efficiency. Branch mispredictions can waste cycles as the pipeline gets flushed and refilled. This recovery affects performance, especially in algorithms with complex or unpredictable branching. Pipeline behavior introduces slight variations in the running time of algorithms. Depending on factors like branch predictions or data…

Contents