Command-pipeline and throughput

Source: Internet
Author: User

Resolution:

(1) formula for throughput: Number of commands divided by the time of the pipeline (2) formula for calculating the time of the pipeline: time required for a command + (number of command lines-1) * The longest instruction period
7 + (8-1) * 3

Assembly line:

A pipeline is a quasi-parallel processing technology that allows multiple commands to overlap during program execution. The simultaneous processing of various components is for different commands. They can work on different parts of multiple commands at the same time to improve the utilization rate of each component and the average execution speed of commands. There are so many concepts that we can understand in depth. The concept is abstract. We can see that we have three steps.


Next, let's take a look at the general situation. Our commands are handled by one piece. After the first command is processed, the second one is processed and the third one is processed, in this order, what is the use of devices on the machine? Let's look at this figure:


If the execution time of each command is 1 ms,


It takes 9 ms to execute the three commands. We can also see that the value of this device only works in 1 ms, 4 ms, or 7 ms, the first command only takes 1/3 of the time to work, and other time will be idle. In this way, many devices will be idle in the middle. So we introduced the pipeline.

Time used by pipeline:


If the device completes the value of the first command, it immediately enters the value of the second command. After the second command is completed, the device immediately executes the third command. This operation is the same for analysis, we can see that it was completed in 5 ms.

Of course, we can also observe that the running time of a single command is 3 ms. Therefore, the execution of a single command in the pipeline is invalid.

In addition to the command line, there is also an operation line. The operation line is that the computer can also use the line to increase the operation speed when performing various operations, this operation is performed in stages, so we use pipelines to increase the computing speed.
---------------------

 

Source: csdn
Original: 7479912
Copyright Disclaimer: This article is an original article by the blogger. For more information, see the blog post link!

 

Command-pipeline and throughput

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.