 For this example, again, we have two machines. We'll assume machine A has a single core processor, and machine B has a quad core processor, and we're going to look at how that processor affects a set of programs. And this set of programs has a workload that varies from 100% on the CPU to 100% on the memory. While chances are that doesn't actually mimic any real-world programs, we'll allow us to see how a multi-core processor affects the execution time of a problem, depending on what's available for the processor to parallelize. So our multi-core processor isn't going to be able to affect our memory operations. Those won't get any faster just by having multiple cores, but it will be able to affect our CPU. And for this exercise, we will simply assume that all of our CPU instructions are perfectly parallelizable, and we don't have to worry about any of them stalling and waiting for other instructions to complete. So in the first case, machine A spends 100% of its time on the CPU instructions. And I've got a single core processor, so it runs all of those in serial, and then spends 0% of its time on the memory. Machine B is still spending 100% of its time on those CPU instructions, but those are going to run faster because it's got the quad-core processor instead of the single-core processor. So we know that the quad-core processor will finish those instructions in one-fourth as much time as the single-core processor did. And accordingly, the machine B is still spending 0% of its time on the memory. So now I have 25%, which tells me that machine B requires 25% as much time to accomplish the same amount of work that machine A did. Alternatively, I can put them into a relative performance ratio, and I can see that machine B is four times faster than machine A. So with program number two, we're spending 75% of the operations involve the CPU and the other 25% involve memory. So again, machine A doesn't see any speed up because we're using it as the baseline. Machine B takes one-fourth as much time to run the CPU instructions because it's got four processors to run those instructions. Machine A spends 25% of its time running the memory instructions. Again, for a total of 100% of the time, machine B also spent that same amount of time running the memory instructions. But now I get a different result. So here I have three-fourths times one-fourth, which will give me three-sixteenths and one-fourth or four-sixteenths. So this will give me seven-sixteenths. So it takes machine B a little less than half as much time to run this task than it took machine A. Or again, I can put this into a relative performance ratio and say that machine B is 16-sevenths times faster, so slightly more than two times faster than machine A. Again, the same thing for number three. But this time our ratios of CPU to memory have changed again. So 50% of the operations are CPU operations. And again, machine B spends one-quarter as much time as machine A did on those. And the other 50% of the operations are memory operations. And increasing the number of CPUs doesn't affect those. So this time I have 50% plus one-eighth. Gives me five-eighths. Or I could say that machine B is eight-fifths times faster than machine A. So machine B is still faster than machine A for this task, but it's by an increasingly smaller amount. We've gone from four times faster to a little over two times faster to 1.6 times faster. So I've moved our results from parts one through three up here to make room for questions four and five. So for part four, machine A is again the same sort of thing. This time it spends 25%. It's time running the CPU instructions and the other 75% running the memory instructions. So it's still spending 100% of its time on the task. Machine B has that same 25% of the instructions. And again, they still take one-fourth as much time on machine B. And again, the quad-core processor doesn't affect the execution time of the memory instructions. So I add this together. I've got three-fourths and one-sixteenth, which gives me 13-sixteenths. Or I can say that machine B is 16-sixteenths times faster than machine A. And lastly for number five, machine A spends none of its time running CPU instructions and all of its time running memory instructions, where machine B runs that same 0% of CPU instructions but runs them in one-fourth as much time and spends the remaining 100% of its time running the memory instructions and ends up taking just as much time as machine A did. So once none of our instructions are affected by parallelization then the multi-core processor doesn't actually affect the execution time. It's just as long to solve this problem on machine B as it did on machine A. So as the CPU load of the program decreases, the benefit that we get from using machine B decreases accordingly. We'll see some more with the next topic when we're looking at Amdahl's Law where he starts seeing limits to how much improvement we can get by just focusing on one part.