2022年6月18日土曜日

Native English. Why should CPU and RAM be separated? Why can’t we combine them into one “entity” knowing that the CPU is much faster?

https://jp.quora.com/translate_answer?source=question_prompt&translate_answer=129854961


 · 
フォロー

Size and cost, mostly.

To start, let’s look at a couple of diagrams to understand what we’re talking about.

This is a processor:

(https://ccm.net/contents/408-processor)

This is a memory circuit:

(https://knowthecode.io/labs/basics-of-data-and-program-circuitry/episode-10)

Memory circuits are somewhat complicated and take up space (I know they take up more space than I had expected them to). CPUs are really, really small, so space is at a premium.

On-CPU RAM usually takes the form of “cache”. However, this will really balloon the cost of the CPU. You usually won’t see more than a few MB of cache (usually L3 cache) advertised on a CPU.

The reason to have a cache is to minimize the amount of time a processor spends waiting for round-trips to system RAM. When we need to access memory, the CPU looks into the cache first to see if it has already read/written that value recently. If the cache has the value the processor is looking for, then it just returns that value. If the cache is missing the value (a cache-miss) then we have to make the round-trip to get it — which results in slightly worse performance than if we had just read the value from RAM the first time around.

As you add more cache to the chip, you start to run out of space to store it. The precision of writing those teeny-tiny memory locations also raises the price, so you have fewer people who are able to afford your über CPU. You also see diminishing returns on the performance boost because there’s little practical difference between a CPU the size of a motherboard and a motherboard with a CPU on it. We would still have all of the same problems minimizing “cache misses”, but we would call them “near-CPU cache-misses” instead.

However, off-CPU RAM is cheap. Like, really, really cheap. There’s a reason a modern CPU has ~5MB of cache, but finding 5MB of RAM might constitute an antique.

So it turns out that RAM is “good enough” for most people’s purposes, compared to the astronomical cost of a CPU that wouldn’t need 8GB of RAM. Most people can’t afford a CPU with lots of memory, and the benefit to such a processor is fringe, at best. As a result, there’s not a lot of economic incentive to make such a processor.

0 コメント:

コメントを投稿