Tác giả giữ toàn bộ bản quyền (All Rights Reserved) — không phải giấy phép mở. Bạn vẫn xem và học miễn phí trên OpenER; muốn tái sử dụng cần xin phép tác giả.
[MUSIC PLAYING] PROFESSOR: Hello, welcome back to 61C.
We are starting a new module. This module will deal with pipelining. So far we have design the functional unit and evaluated its performance.
But we really didn't get a sense is the performance good or bad, and is the cycle time the only measure of performance.
What we'll do in this unit, we will actually start measuring the performance or different ways how we measure the performance, and then figuring out the way how to improve it.
So let's get going. In our new school of machine structures we have looked at different layers of hierarchy and how can they support parallelism.
Now, we are going to take a look at parallelism at the instruction level, and what do we need to do in the hardware, in the execution units to support simultaneous execution of instructions.
We are also introducing one of our six great ideas in computer architecture, which is performance measurement and improvement.
What we mean by that is we need to know how to measure the performance in order to be able to improve it. So let's get going.
We had one measure of performance, which was the minimum cycle time that we needed to execute an instruction in our single cycle RISC V CPU.
And we determined the time by trying to measure the time that it takes to execute each of the five phases of execution.
So we looked at the instruction fetch, and found out the instruction fetch takes 200 picoseconds. The instruction decode takes about 100 picoseconds.
The alu operation that is our execute phase will taken another 200 picoseconds. Memory access will take yet another 200 picoseconds.
And finally, write back would be completed in 100 picoseconds. When sum all of that up, the minimum cycle time was 800 picoseconds.
Now not every single instruction goes through all five phases of execution. And we found out that it was just only one of them, load word, that went through all five phases of execution.
But we can't have a processor that can — we could possibly think of trying to clock this processor faster, but then it would not be able to do load word instruction.
Although it would be able to do most of the other instructions. So always, our critical path is set by the longest instruction here — the longest time that an instruction takes.
In this case that was 800 picoseconds.
And we determined that the maximum clock frequency is equal to 1 over those 800 picoseconds, and that was 1.25 gigahertz.
And that was one measure of a performance. So our single cycle CPU can execute the instructions at 1.25 gigahertz.
That means that it can start an instruction and completed it within 800 picoseconds, and then can start another one that would take all the 800 picoseconds, and so on.
It would finish 1.25 billion instructions per second.
So the question here is, can we do better than that? And is that the only measure of performance?
So generally, when we take a look at the spec sheet for any kind of a product, there are usually different kinds of performance measures.
So in this case, let's try to see what do we mean by a performance of a processor. In some cases, it may mean that it may have a quicker response time.
So if you give it one job, will it finish it sooner. So the time to execute one job may be a performance measure.
Or how many jobs can it do in a unique time? So, you know, how many web pages can it serve? Or how many spoken words can it recognize?
Or how many chess games can it do, can play in an hour?
Or how much energy does it take, meaning how long will our battery last when running this processor, running tasks on this processor, like watching movies?
How many movies can we watch on a battery charge?
What is useful to think of while we are getting a sense for a process of performance, to think of something that is much more familiar, like transportation analogy.
In transportation we can take a look at the performance metrics of a sports car versus performance metrics of a bus. And usually people think of a sports car as a performance car.
But bus is also a performance vehicle for under certain metrics.
So let's take a look at, on the left hand side, specs for a sports car and specs for a bus. So the sports car can carry two passengers.
The bus can carry 50 passengers. A sports car can go at 200 miles per hour. And the bus can only go at 50 miles per hour.
And the gas mileage for the sports car is 5 miles per gallon. So it can go more miles per gallon than the bus that can only go 2 miles per gallon.
So let's see how they perform on a task that involves transporting 100 passengers over a 50 mile trip.
And in this case, we are just going to assume that we are measuring only one way travel, and both the car and the bus immediately, somehow, come back to the starting point, you know, reload the passengers, and go back.
So we are just measuring the time that it is taking to transport the passengers. So a sports car will travel 50 miles in 15 minutes.
The bus will take an hour. But in every trip the sports car will only deliver two passengers. And will somehow transport itself empty and take another two passengers.
So in total, to transport 100 people will take 750 minutes. On the other hand, the bus will take only two trips. So it'll be done in 120 minutes.
The energy efficiency of our bus is a lot better than the energy efficiency of a car.
The car takes five gallons per passenger to deliver them 50 miles to destinations 50 miles away.
And a bus takes only 0.5 gallons per passenger.
So we see a difference here in what does it mean something having a higher performance.
Yeah, a sports car is better if we have something that is of a very high value that needs to be transported 50 miles away — an injured person, for example.
But bus is much better in delivering, moving a lot of people over a distance. So it will do it in a much shorter time and save a lot of energy.
Let's see how does this relate to the compute performance. So in the transportation, what we had was trip time. In computer world, that metric of performance will be program execution time.
How long does it take to execute a program or, for example, time to update the display with a new picture?
The second metric that we had was the time for, in transportation world, time to transport 100 passengers.
In the compute world, it is a metric that measures how many tasks can we do in a given time.
For example, in this case, it will be how many web pages can be served in a given time or how many server requests can be performed in an hour.
And the third one is the energy efficiency. The way how we measure the energy efficiency in the cars is gallons per passenger.
In a computer we also measure energy efficiency by the amount of energy used, electrical energy used.
So in this case, we would measure the energy per task, or how much energy does playing a movie take, or how many movies can we watch from a battery charge.
Keep in mind that the energy is important for both mobile devices where we kind of have a better sense for this how much energy is stored in a battery, energy is also very important for high performance servers that live in warehouse computers, in data centers.
Over there the cost of running a data center is essentially a cost of energy.
The hardware, the energy cost overshadows the hardware cost after about a year or a year and a half after deployment.
So that's a big deal in every application domain or in every domain of computing.
Finally, one thing that is important to notice, that power is generally not a good measure of efficiency. Energy is much better. Power is a rate of exchange of energy.
So there are kind of related, but the way how we can think of it is we can have a really low performance CPU that is very low power, very, very low power.
But it would take so long to complete the task, that it would basically drain the energy by the time it's done.
On the other hand, some better optimized CPU can probably do multiple tasks, long tasks with one battery charge. We'll see a bit more about that later.
But for now, what we want to remember is we really care about the energy. Energy is what is stored in the battery.
And that's what the utility charges us in units for delivering us the energy, not the power.
So that's it for the quick introduction. So we are going to try to take a deeper look into the process or performance after a quick break.
Đăng nhập để đánh giá học liệu này.
Đăng nhập để bình luận — chưa ai bình luận về học liệu này.
Không có khóa học liên quan.