So my understanding is that Control Unit (not really pictured here) takes care of grabbing the value in the registers and applying them to the input of the ALU See https://en.wikipedia.org/wiki/Control_unit for more details. This micro is very simplified! A more complete picture can be found in say, the Intel i386 32-bit microprocessor: https://en.wikipedia.org/wiki/I386
@evs Similar to how RAM is used instead of using hard disk storage for execution because of its increased speed with the trade-off being price, registers(Execution Context) are similarly used. Registers are usually in a memory location in the processor that's very fast and using RAM instead would increase latency.
Looks like this example only covers how values are stored in registered. What about values stored on disk or in memory? Would the CPU grab the value at a specified address in memory and store it in the execution context?
Probably need a DMA for memory or a IO opt for disk seek. CPU will likely multiplex during the idle time.
From my understanding, the registers in the execution context contains the values of the variables that are actively used by the program, either as inputs or outputs. While a program is in execution, if a variable is in memory/disk, the processor grabs its value from the corresponding address given by the address mapping of that specific program, and stores it in the execution context to be used by the ALU.
Some architectures may be load-store so data stored in memory needs to be transferred to registers first. For values stored in memory, a load instruction would be used to bring it into a register in the execution context and then further instructions can be executed.
Please log in to leave a comment.
I personally found this slide slightly confusing. Specifically figuring which part of the processor is in charge of step 2. I'm also wondering whats the difference between holding the registers in the Execution Context vs. memory/RAM. Is it just location?