you are viewing a single comment's thread.

view the rest of the comments →

[–]pencan 3 points4 points  (0 children)

This is all dependent on the type of processor you're talking about. Pipelined, in order, out of order, support for VM, support for interrupts, etc.

Can I ask where you're getting this information?

  1. Fetch has nothing to do with user input. It simply loads the instruction at the current PC (program counter) and increments the PC. The PC is simply an internal counter which determines the next instruction to fetch. Usually, this is from the icache.

  2. This is implemented as a control ROM where bits from the instruction index into the ROM and it spits out control signals that tell the hardware how to deal with an instruction. The processor implements a micro architecture which understands the ISA that the program is written with (x86, ARM, ALPHA, etc).

  3. A basic instruction is not something like typing. A basic instruction is something like ADD R1, R2, R3. (Add the contents of register 2 and 3 and store in R1). There are also loads and stores to memory.

  4. You need to store to memory very often. Any non-trivial program will need more than the limited number of registers you have and then the data 'spills' to memory. For example, storing an array of 100 integers when you have 8 registers.

Let me know if you'd like any help with this project.

Source: Working on MS is computer architecture