COMPUTER FUNCTIONS



FETCH CYCLE

  • Processing required for a single instruction is called an instruction cycle.




Fetch - CPU reads an instruction from a location in memory.

  • Program counter (PC) register keeps track of which instruction execute next.
  • CPU increment PC after each fetch. 
  • Fetched instruction is loaded into the instruction register (IR).
Execute - CPU executes the instruction.

  • May involve several operations.
  • CPU-Memory : Data may be transferred from CPU to memory or vice - versa.
  • CPU-I/O : Data may be transferred between CPU and an I/O module.
  • Data Processing : CPU may perform some arithmetic or logic operation on the data.

INTERRUPT  CYCLE


  • Mechanism by which other modules may interrupt the normal processing of the CPU.
  • Classes of Interrupts:
          1) Program - as a result of program execution.
          2) Timer - generated by hardware timer.
          3) I/O - to signal completion of I/O or error.
          4) Hardware failure.
Instruction cycle with interrupts



MULTIPLE INTERRUPTS

a) Can be handled by disabling some or all interrupts.
b) Disabled interrupts generally remain pending and are handled sequentially.
c) Can be handled by prioritizing interrupts.
d) Allows a higher priority interrupt to interrupt one of lower priority. 










Previous
Next Post »