Problem Set Answers: Computer Systems

 

  1. The PC holds the address of the next instruction to be executed. The IR holds the instruction being executed.
  2. This is done for better performance. If there is only one bus then devices have to wait to use the bus. This slows the system down significantly, especially when the CPU is trying to fetch an instruction from memory and has to wait.
  3. Interrupts provide a mechanism to signal the CPU that some event has occurred that needs to be handled.
  4. An interrupt handler is software. There is one handler for each type of interrupt. The handler takes care of the conditions that caused the interrupt, so that execution of the current process can resume.
    1. IF: instruction fetch
    2. ID: instruction decode/register fetch
    3. EX: execute/compute effective address
    4. MEM: memory access
    5. WB: write back
  5. The next instruction is fetched from memory (at the address given by the PC) and stored in the IR. The PC is incremented by 4 to get the address of the next instruction (assuming there is no branch).
  6. SpeedUp = (200ns x 200)/((5+200-1)(40ns)) = 40000/8160 = 4.91
    Max SpeedUp = 5
  7. SpeedUp = (100ns x 100)/((5+100-1)(20ns)) = 10000/2080 = 4.8
    Max SpeedUp = 5


Email Me | Office Hours | My Home Page | Department Home | MCC Home Page

© Copyright Emmi Schatz 2021