Home | Join! | Help | Browse | Forums | NuWorld | NWF | PoPo   
Thought of the Day
Clapping Words
vice
epicure
obstreperous
torpid
matriculate
crescendo
anesthesiologist
enigmatic
repertoire


thecav
Age. 38
Gender. Male
Ethnicity. White
Location Prince George, VA
School. Univ of Virginia
» More info.
Double Your Pleasure, Double Your Fun
Thursday. 8.4.05 9:09 am
Two processors. I mean if one CPU can technologically advance civilization this far, then one more would double everything!! Hell, why stop at just two?! Three, four, seven, just pile them on!!! It'll work... right? No, not really, no.

Oh, it'll work, but if you put a second processor in your system right now your system would not run twice as fast. Sure it'd run faster, but not double the speed. Adding a third will make it run faster than two, but not the same increase in speed as from one to two. Add a forth and the trend continues. Diminishing returns as you add more and more. Why is this?

It has to do with the way computers are structured. Here's any course you may take in computer architecture condensed into a single paragraph.

A computer consists of a CPU (the brains) which isn't really a fair name because the CPU is dumb, I mean a complete idiot. It has to be told to do *everything*. And not vague, add two numbers togethers, instructions. I mean down right anally specific instructions, it wants to know what numbers? Where are they? Integer or floting point addition? Where do you want the answer to go? What if there's an error? When I'm done adding, then what do I do? (The CPU is very inquisitive.) The CPU gets fed these instructions from main memory which in turn get them from a physical storage medium: hard drive, CD, network, etc. The CPU executes the instruction, changes memory, and moves on to the next. Instructions always operate on bits and these instructions include, AND, OR, NOT, NAND, NOR, XOR, and XNOR. All other instructions are just combinations of these operations. However, only NAND and NOT are used extensively in practice.

That's all a computer does. All. Nothing else. It just so happens that performing certain operations in certain order produce useful and meaningful results.

I don't know if you can see the impending problem from adding two CPU's from the above description of computer operation. But it stems from the fact that both operate simultaneously and without knowledge of the other's operations.
Say there's CPU A and CPU B.

A writes a 3 to memory location 100.
A reads memory location 100 expecting a 3, and gets a 3.
A is happy.

This is how things should work. Now let's add CPU B into the mix.

A writes a 3 to memory location 100.
B writes a 5 to memory location 100.
A reads memory location 100 expecting a 3, and gets a 5.
A is sad.
B reads memory location 100 expecting a 5, and gets a 5.
B laughs at A.

The problems exists when each CPU "thinks" that is in total control of the system. With two CPUs, no longer can the default assumption be that everything is the same the last time you left it. Imagine you being alone on a desert island. If you leave you Snickers bar on the beach, leave for a day to hunt and come back you expect your candy bar to still be there. However if you're on the island with Josh Old and you leave your candy bar to go hunt...

This is why you can't just drop a second CPU into any computer and have it work. Both the processor and the motherboard, and the operating system all have to "know" that a dual CPU situation exists and handle it. That includes making memory changes aware to both processors, not letting one read data from a location while the other is trying to write, and other synchronization issues including "deadlock."

In fact, this whole memory fiasco is the reason for the dimishing returns on more and more processors in a normal system. The memory unit can only dish out so many bits a microsecond. And after that bandwidth is full, then no matter how many processors you add there won't be enough to go around. This problem can be solved, and has been, just look at every supercomputer out there today. Hundreds and thousands of CPUs all working in sync and happily. This is because the system was specially designed for it and the actually programs running on it optimized for multiple CPU execution. Modern computers aren't like this, and most software isn't written to take advantage of 2 or more CPUs, hence programming must change to take advantage of this.

That's hard to do. And time consuming. Synchronization being the hardest aspect.

Worst of all, these issues prey on the lives of CPUs halted because another has changed its data... They often get upset and relieve their pain by eating a pint of Hagan Das. Its really quite sad actually.

Later.
5 Comments.


Very nice explaining done by U!
» CPKviperpheonix on 2005-08-05 09:33:16

Thanks CPKviperpheonix
» thecav on 2005-08-06 09:34:38

Wow, you turned some pretty boring crap into an insteresting read. Well done. =)
» Bartholomew on 2005-08-08 09:55:22

CRUSTACHE HAS BEEN FALLING DOWN ON THE JOB!!! I WILL NOT LET THAT HINDER MY COMMENTING. 2 CPU'S??? THAT'S JUST BLASPHEMOUS!!!! MUAHAHAHAHA
» Crustache Mcgoocherson (216.230.10.131) on 2005-08-13 09:28:41

LOL
Josh Old! I almost burst into laughter. hahaha. By the way, this is Tammi (hilikus).
» lucidblur on 2005-08-18 03:02:45

Name.

URL.

[to enter your email, use "mailto:[email protected]"]
Subject.

Comment.

Word verification.

Copy the first 4 characters only.

If you are a member, try logging in again or accessing this page here.

thecav's Weblog Site • NuTang.com

NuTang is the first web site to implement PPGY Technology. This page was generated in 0.044seconds.

  Send to a friend on AIM | Set as Homepage | Bookmark Home | NuTang Collage | Terms of Service & Privacy Policy | Link to Us | Monthly Top 10s
All content � Copyright 2003-2047 NuTang.com and respective members. Contact us at NuTang[AT]gmail.com.