Computer Architecture Why is this needed Basic information


Computer Architecture

Why is this needed? • Basic information to know what is important. • Only parts involved with OS are covered.

Major Components

Central Processing Unit (CPU) CPU ALU PC Registers ESP Microcode EAX EBX ECX EDX • Registers are memory inside the CPU. • PC = program counter; the address of the next instruction to perform • ALU = arithmetic logic unit; the part that performs calculations

Fetch – Decode - Execute • The CPU brings in an instruction (look in PC register for the instruction location) into a register and determines what to do. • The CPU changes the PC for the next instruction. • The CPU performs the instruction. • Cycle repeats until the power is lost.

Memory Address RAM 0 4 8 12 16 20 24 32 36 40 32 -bit value 32 -bit value 32 -bit value • Where code and data are stored. • Each cell contains data (cells are the same size) • Each cell is accessed using an address

Interrupts • CPUs allow for interruptions by devices. • Task is put on hold until the interruption is completed. • Can an interruption be interrupted?

Programmed I/O Devices • CPU issues instructions to the device • CPU keeps checking to see if the device is finished. • Uses a lot of CPU time.

Interrupt Driven Devices • CPU issues instructions to the device • CPU starts other tasks • Device triggers an interrupt when it is finished • CPU gets the result from the device • More difficult to program but better for performance.

DMA – Directly Memory Access • Special controller on device that can copy memory directly from the device to RAM. • CPU does not need to get involved other than to set up the transfer. • CPU will get an interrupt when DMA is complete. • Very efficient…very difficult to program!

I’m busy with official business… don’t bother me! The CPU (Not everyone needs his attention!) This better be important Thanks, guess I if youofficer. want to. I keep don’t need to bother with going down Madinat Don’t worry, Sarge! I’ll direct this car! Khalifa! this car through the roundabout! The Interrupt Controller The DMA Controller is like a second traffic officer who handles traffic not going to the CPU Can I go now? I’m only going to Beep!Mc. Donald’s! Do I really Beep!need to go see the CPU first? Some devices don’t need to talk to the CPU

Thank you
- Slides: 13