4

We just started on the Computer Architecture topic in our CS lectures and I have a few questions that are currently bothering me. So we have different computers, and there are always differences in the hardware and architecture.

Now, why don't all computers simply use the same architecture? Won't that make it easier to program? What makes this a bad idea?

D.W.
  • 167,959
  • 22
  • 232
  • 500
nTuply
  • 469
  • 1
  • 5
  • 9

4 Answers4

5

Why aren't all cars identical? Wouldn't that make easier to build and repair them?

There are big and small cars, cheap and expensive cars, fast gas guzzlers and slow energy savers… And similarly there are many different types of computers.

Here are a few criteria that influence the architecture of a computer. Optimizing for some of the criteria will have a cost against some other criteria.

  • Speed to execute sequences of integer operations
  • Speed to execute sequences of floating-point operations
  • Speed to execute sequential computations that require a lot of memory
  • Speed to make parallelizable integer computations
  • Speed to make parallelizable floating-point computations
  • Speed to make parallelizable memory-intensive computations
  • Power consumption when idle
  • Peak power consumption
  • Ability to scale power consumption according to the amount of computation at a given time
  • Special-purpose computations (graphics processing, cryptography, digital signal processing, …)
  • Volume
  • Design cost
  • Per-unit manufacturing cost for large amounts
  • Per-unit manufacturing cost for small amounts
  • Possibility to connect many peripherals
  • Ability to execute tasks in real time, i.e. fine control over the execution time of each operation (e.g. to control a physical object)
  • Isolation between tasks (for robustness and security)

This is of course not an exhaustive list. In practice, you'll find architectures that find a few sweet spots, optimizing for some criteria at the expense of others.

Here are a few examples of different compromises.

  • Intel x86 processors tend to be very good at raw speed for sequential execution of pure computation and memory accesses. ARM tend to be less fast, but consume less power, which is a large part of why x86 is so common on computers that are plugged into the mains while ARM is prevalent on computers that almost always run on battery such as mobile phones.
  • GPU are very good at executing many tasks in parallel, which is well-suited to drawing images that consist of millions of pixels. But they're bad at accessing lots of memory in random ways, so they don't make good general-purpose processors.
  • An MMU translates memory addresses used by programs into memory addresses used by the hardware. This allows the operating system to execute programs each in their own address space, so that they don't interfere with each other. This means that each memory access can take a variable amount of time, though, which is why most processors designed for real-time systems don't have an MMU.
  • FPGA are extremely flexible processors — you can reconfigure them to optimize them for whatever computation you want to do today. But they aren't cheap.

Add to that historical factors. Designing a new processor architecture takes years of effort by teams of hundreds or thousands of highly-trained engineers, and changing architectures involves rewriting a lot of software, so it doesn't happen often. So just like you can have different car models from different manufacturers that have the same strengths and weaknesses, you can have different processor architectures from different manufacturers that vie for the same applications.

Gilles 'SO- stop being evil'
  • 44,159
  • 8
  • 120
  • 184
2

My first thought is that x86 is crappy, and that we only use it on computers for backward compatibility. But this is merely opinion-based. So, let just remember that most computers use x86 architecture, and that it would be expensive to switch to another architecture.

So, why don't Qualcomm use x86 on phones ? One part of the answer is that x86 is Intel property, and there is, to the best of my knowledge, only one firm that own a license for x86: AMD, who got it as IBM requested a second source for its CPU, as far as I remember.

And there is an other reason to maintain several architectures: to have architectures that fit the need. A modern x86 architecture requires much silicon, and much power. If you look at ARM architecture, you've got the high end ARMv8a, with much power and high power consumption (several watts), and, at the same time, ARM still develops ARMv6-M, with much less silicon (0.0066 mm2 instead of 9 mm2), reduced power consumption (200µW), but reduced performances (divided by 10000, roughly).

To sum up, we keep several architectures for backward compatibility, intellectual property, and purpose fit. You should probably study several architectures to get a better overview of this field of study.

David Richerby
  • 82,470
  • 26
  • 145
  • 239
Jacen
  • 1,050
  • 8
  • 14
2

There are several driving forces involved here:

a) Human Variation. Nature itself does not put any particular restriction on computer architecture, so people have to bring their own creativity to the task - and of course different people come up with different approaches. This was true when computers were just being invented, and has continued to be true with each new generation (of people and of machines).

b) Economics. A lot of old architectures (esp. IBM 360) persist in institutions - banks, insurance companies, etc - because migrating working software to a common shared architecture -different from theirs- is too costly, both in direct development cost and in risk due to the inevitable debugging shakedown. Here backward compatibility trumps performance almost all of the time.

c) The Bleeding Edge. There are always those who need to perform the largest feasible computations with the maximum speed. Meeting those demands is nearly always best achieved by using the latest techniques in new architectures rather than trying to beef up existing ones (esp. ones as mess y as x86).

d) Legality. If all the world agreed on a single common architecture, then the producers of that hardware would probably be at risk (in America at least) of massive Anti-Trust lawsuits. E.g IBM got hit with one after introducing the 360; Microsoft got hit with one after Windows got popular. Licensing to AMD is probably the only thing preventing one against Intel.

PMar
  • 21
  • 1
1

For at least two reasons:

One: Computers today are used for more than one thing, and a computer that is good for one task isn't necessarily the best for another. Like EvilJS said in his comment: Why do we have more than one kind of motor vehicle? Why do we have motorcycles, sedans, minivans, pick-up trucks, etc? Why not just have one type of car that everyone drives? Because that would be wildly impractical. A small two-seat coup is great for a single person commuting to work. Not so practical for a family of eight. Etc. The ideal CPU for a cell phone and the ideal CPU for a high-capacity server are not the same.

Two: People get new and better ideas. What if back in 1900 people had said, why do we need so many kinds of cars? Let's just agree on one kind and that's all anyone will make. Then today we would still all be driving 1900-style cars.

Jay
  • 269
  • 1
  • 3