Need help understanding basic computer architecture -
Need help understanding basic computer architecture -
we're learning how computer executes c programme in class. i'm unclear how next pieces fit together: processor (or cpu), register files, runtime stack, programme counter, virtual addresses, programme memory.
let me explain know or think understand:
the processor (or cpu) compile .c file executable machine level code computer can understand , execute.there exists stack onto instructions can pushed computer can execute said instructions. questions: stack register located in regards cpu? instructions beingness pulled from?
this stack can hold registers %eax, %ecx, %edx, etc. holds numerical values , holds addresses point items stored in "memory". question: 1 time again memory located?
there exists programme memory contains executable machine code program, blocks of memory user allocates, , runtime stack managing procedural calls , returns. questions: again, programme memory located in relationship cpu?
my thoughts jumbled right i'm not sure i'm asking right questions or if these topics supposed related...a diagram of sorts helpful because can't see how supposed fit together. don't know if i'm saying remotely correct...
basically, need have @ : von neumann architecture
the image on site provides overview on main components of pc: http://www.doc.ic.ac.uk/~eedwards/compsys/memory/
however, i'll explain bit of stuff focus on questions (where reside in relationship cpu):
cpu
cpu: microchip called "brain" of computer - actual calculation stuff. programme simple "list" of instructions executed, origin first instruction.
alu: (arithmetic logic unit) resides within cpu , executes calculations
registers: memory cells reside within cpu. store values needed in calculations (or results)
program counter: special register within cpu contains reference instruction executed.
ram (memory) ram "working" memory of computer.
the ram big amount of cells store values
the ram much faster hard disk. ram much slower registers within cpu though
when start program, instructions loaded hard disk ram
programs need work on lot of info (these variables, objects, etc. utilize while programming) - these stored within ram
a stack info construction resides within ram (at to the lowest degree in our pc's..). stack holds local variables, function parameters , addresses of functions (if phone call function b function a, address of next instruction of function stored on stack. when programme finishes function b can jump right place left function a) (search wikipedia "stack" ..)
the cpu (with registers) , ram (data memory, stack, ...) connected bus.
this overview, gets taff when details - hope helps bit, though :-)
architecture
Comments
Post a Comment