Principles of Computer Organization - Performance of Computer

Principles of Computer | On your computer's performance

For the opening of this article belong to the Principles of Computer Organization, the path factors that affect computer performance and speakers to enhance the performance of your computer.
Keywords: Performance, CPU, response time, frequency, power, voltage, parallel ...

Foreword

目前所有的文章思想格式都是:知识+情感。
知识:对于所有的知识点的描述。力求不含任何的自我感情色彩。
情感:用我自己的方式,解读知识点。力求通俗易懂,完美透析知识。

text

Measure of computer performance

Measure machine performance two standards, namely, the response time (Response time) and throughput (Throughput) .
1. Response time, also referred to as the execution time (Execution time). Indicate that the total execution time for a computer program.
2. throughput, also referred to as the bandwidth (Bandwidth). It indicates that the amount of each computer to execute a program execution.
Note: There is a relationship between response time and throughput, i.e., the response time of throughput x = number of executions.

Response time

First, that can improve the response time and thus improve computer performance. However, in the computer, the main factors affecting the response time of the CPU performance.

General Performance Test

Performance, can be seen as the inverse of the response time, i.e.,
* 1 = performance / response time **
At this time, as long as the response time is shorter, the better the performance value.

Question: In response to how time is the time in real life do?
Answer:! Of course not
the first case, CPU impossible to run only one program, first of all need to support the operating system is not running, it can then run the test program. In a real environment, CPU switches in different processes, run the program, the unit is GHz, people are imperceptible.
The second case, CPU will be in full operation and runs down two modes of operation corresponding to the result of course is not the same! And you need to think about the current state of the hardware are changing all the time, we can not guarantee consistency.

Learn Content: In real life, computer performance evaluation of a third-party organization called SPEC (Standard Performance Evaluation Corporation) , the main CPU benchmark is provided by dozens of different calculation procedures for a given CPU performance the final score.

CPU performance test

After understanding the general performance test for CPU, we can get a new performance test methods, the introduction of CPU clock cycles, i.e.,
performance = 1 / (CPU clock cycles x CPU clock cycles)

In the above formula, the clock cycle of the CPU, the CPU is our frequency (Frequency / Clock Rate) . My host is 2.81GHz, represents one second of time, the number of simple instructions that can be executed is 2.8G bar.

Therefore, the instruction can be introduced to give the performance of the new formula:
Performance = 1 / (average x CPU clock cycles x the number of instruction cycles per instruction)

That is, there can optimize the performance of the three aspects:
1. The number of instructions, the compiler will be reduced by the specified number of instructions belonging to the design level.
2. The average number of cycles per specified number, also known as PCI (Cycles Per Instruction), reducing the average number of cycles, is achieved by increasing the design level CPU CPU technology.
3.CPU clock cycle, by increasing the clock speed of the CPU to obtain a smaller CPU clock cycles, the circuit belongs to the hardware level.

Understand the content: here will involve crystal concepts, played microcontroller knows that there is something a crystal oscillator, the internal CPU there is something like that.
Playing games, or image rendering, there will be a concept overclocking , the actual clock speed is fast tune computer, which is considered to adjust, but the heat will be a problem only.

CPU clock speed optimization

Through the above, it can be learned by increasing the clock speed of the CPU, and thus higher performance.

First look at the constitution of the CPU . CPU, generally have been called VLSI (Very-Large-Scale Integration, VLSI). Therein, comprising a level of one hundred million transistors, so that the transistor inside the "switch" continue to "open" and "close" to complete the combination of various calculations and functions.

A CPU power, may be represented by such a formula:
number of power load capacitance ~ = 1/2 × × × voltage squared transistor switching frequency ×

From the above equation, we can see the relationship between voltage and power is the square of the number of power transistors and a linear relationship. Use our intelligent brain 1 + 1 = 2, is certainly ensuring little power, the voltage lower priority, followed by the increase in the number of transistors.

Note: CPU power can not engage in large laptop is not unplugged, the need to carry an hour to run out of power, which is not ideal, of course, is fantasy month without charge - state
voltage of the CPU can not just small , in theory, as long as voltage can be, but the actual voltage is too small, the transistor does not work .... opening and closing
of the transistor in the CPU number, can not be infinite, limited by the volume of the CPU, CPU cooling will work, too much is not suitable for heat dissipation, so that the CPU will strike ~

Understand the content: the same volume increase in the number of transistors, it must be a small transistor, which is to enhance the process .
When assemble their own desktop, or course, is good boxed CPU, but scattered pieces actually okay, after all, the current CPU technology, can not fake imitation, are usually do not give money ....

Throughput

When the read response time optimization, throughput optimization look directly it is very simple, one sentence throughput core idea: strength in numbers .

By means of parallel thinking , to achieve multi-core CPU work, performance optimization, after all optimization the response time has become difficult.

Based on a law of experience in parallel, i.e., Amdahl's Law (Amdahl's Law).
Execution time = optimized by optimizing the execution time of impact / speedup execution time is not affected +

Based on the style, you want to improve performance, execution time is to get smaller after optimization, can only proceed from the increase speedup.

Note: The execution time by optimizing the impact of which represents the time can be executed in parallel, multiple CPU cores to accelerate precisely parallel.

Although you can use parallel thinking, improve computer performance, but the parallel is still limited to the execution time is not affected , this time still is serial execution. And there will be a limit, no matter how much speedup increase, little change in time.

to sum up

This article tells the computer to enhance the performance of the proposed performance based optimization response time, throughput optimization based on performance.
Optimization based on response time, can enhance the CPU clock speed, to reduce the CPU voltage, increase the number of transistors, but is limited by the heat dissipation of the CPU and power consumption.
Based on the optimization of throughput can be parallel, but still can not be restricted to parallel sections.
You can also choose based on high probability events GPU computing, instead of the CPU; CPU usage of pipeline technology; use predictive improve performance.

Understand the content: Computer graphics inside that GPU.

CPU predicted , will the internal CPU secondary cache variables affect the calls.

Conclusion

Recently at the bottom of the computer knowledge to dig deeper, not just to learn the knowledge, the computer world also have a new understanding, in good shape! I feel a lot of harvest!
Wish I could have been digging down ~

Guess you like

Origin www.cnblogs.com/Kate-liu/p/11291150.html