View Single Post
Old 08-23-2008, 06:27 AM   #11 (permalink)
ygolo
My termites win
 
ygolo's Avatar
 
Join Date: Aug 2007
Type: intp
Location: North of somewhere (so not the south pole)
Posts: 3,203
ygolo is unique just like everyone else
Default

Ah. Good. Questions. I was ready to go of into my next spiel.

Quote:
Originally Posted by Samuel De Mazarin View Post
How is the number of registers of a processor determined? Is it technically infinite and limited only by raw computing power?
More quantitative answers in what would be the optimal number of registers will come later (there are some fancy techniques of register renaming, and other compiler assisted things that can be done).

The short answer is that the processor will have as many registers as the designer deemed fit. It is a finite number, but in many designs can be made to look "infinite for practical purposes."

Keep in mind that very few people actually write assembly code directly. Compilers have some neat ways of assigning registers to variables used in a higher level program like C. Depending on how long people want to stay with my explanations, we may get to that.

Quote:
Originally Posted by Samuel De Mazarin View Post
How does a processor without 'memory mapping' work? Does it just take in input and spit out output and then 'forget' what happened? And memory mapping sort of stores earlier executed commands in the processor for later reference? I mean, what exactly is memory mapping?
I did go through that part pretty quickly. The processor is a piece of hardware. It is in-fact usually a very big integrated circuit built on silicon (usually though GaAs other substrates may be used).

All it does is process information. It needs to "communicate" to the other devices it is hooked-up to. Whether that is a motor-controller, a hard-disk controller, a USB hub, or a graphics card, the programmer usually specifies the communications as reads/writes to I/O ports and/or memory-mapped I/O.

"Memory-mapped I/O" is just a way of saying that particular addresses in "memory" are actually not memory, but I/O ports in disguise. They aren't actually memory locations, they just look look like memory to the programmer.

Hopefully, things will become clearer as we go.

Memory (Random Access Memory), is usually "remembered" till the power is shut-off. This type of memory is called volatile memory. Flash, EEPROM, and other such things keep the bits written to them even when it gets no power, and is referred to as non-volatile memory.

Quote:
Originally Posted by Samuel De Mazarin View Post
I'm also assuming the very abstract nature of the codes you've described, like adding 3 to register A or some such, will be explained later...
Things will become slightly more concrete. However, as they become concrete, it will also become technical. Computer arithmetic(in a nutshell), and how execution works (at a high level) was going to be next brain-dump.

Quote:
Originally Posted by Samuel De Mazarin View Post
lastly, could you give a VERY brief (I could handle more, but you're going to be working on this, so it's your time you're giving us), one post explanation of how processors relate to circuits, or vice versa?
Yes. A processor is a circuit itself. It is connected electrically through "wires" (Printed Circuit Board, and package "traces") to other circuits.

When a programmer specifies writes/reads to I/O ports, this creates "traffic" ("signals" toggling on the "wires") following specific protocols (PCI, ATA, USB, etc. are protocols) that communicates to other circuits (note that these circuits could in turn communicate with other circuits used to control your monitor, your modem, and other things).

Quote:
Originally Posted by Samuel De Mazarin View Post
I really appreciate this... I could look up stuff on the net, but then I wouldn't be able to get answers to questions I have at various points... will be reading as long as you post. Thanks!
No problem.

Like I mentioned elsewhere, I suddenly got the overwhelming urge to explain stuff. I don't know why.

But believe me, it is my pleasure.
__________________

sloan+ Rxua|I|; primary Inquisitive; R(82%)L(52%)U(62%)A(54%)I(86%)

CTO of IPTN (see Maverick's Sig.) and member of Maverick's Biker Club.

Accept the past. Live for the present. Look forward to the future.

My Blog

I linked some of your blogs; if you feel that is inappropriate, please let me know.

ygolo is offline   Reply With Quote