Computer Systems

Computers

Computer: Fast electronic calculating machine.

  1. Personal Computer
  2. Workstations
  3. Enterprise Systems (Mainframes) and Servers
  4. Supercomputers

Software

Operating System: Large program used to control sharing of and interaction among various computer units.

OS Routine Example: One processor, one disk, one printer

  1. Program is stored on disk
  2. Program transferred to memory
  3. Program executed
  4. Need to read a data file on disk into memory
  5. Calculation
  6. Print results via printer.

Performance

Performance: How fast a computer can execute programs.

Three Factors Affecting Performance:

  1. Hardware Design
  2. Instruction Set
  3. Compiler

Buffer: Region of memory that stores information temporarily.

Cache Memory: The speed at which you can read stuff from main memory into the CPU’s cache memory also affects performance.

Processor Clock:

CISC and RISC

Multiprocessor Computer: Has multiple CPUs in the processor

Multicomputer: Each computer only has access to its own memory.

Functional Units

Basic Functional Units of a Computer:

  1. CPU
  2. Main Memory
  3. Input Devices
  4. Output Devices
  5. Secondary Storage
  6. Buses
    1. Address: Determines how much memory your system can access.
      • A n-bit CPU can generate/hold 2^n bytes of memory.
      • Motherboard manufacturers limit this.
        • Nobody is actually going to use 64-bits of memory for the next 10 years.
        • So even if the CPU supports 64-bits, the motherboard may not.
        • Limiting the address bus reduces the complexity of manufacturing.
    2. Data
    3. Control

\text{Program Execution: } \\ \text{Secondary Storage $\to$ Main Memory $\to$ CPU Registers $\to$ Execution}

Q: Why “Random” in RAM?

More on Main Memory

More on Address Bus

n-bit CPUCan Hold (B)AkaNotes
162^{16}64KEarly microcomputers
202^{20}1MBUsing segmented memory
322^{32}4GB
52^{5}32B
642^{64}

Information Handled by a Computer

Machine Instructions:

Data:

Example:

Instruction Set Architecture (ISA)

ISA: The machine language the CPU implements.

Microarchitecture: The physical architecture of a CPU.

Program Execution

\text{Fetch} \to \text{Decode} \to \text{Execute}

  1. Fetch the next instruction from memory
    1. Address from program counter \to address bus
    2. Emit read signal \to control bus
    3. Capture the address in address bus and go to the location in memory
    4. Fetch n-bytes from the address.
      • In MIPS, this would be 4 bytes, or 32 bits
        • In MIPS, the address will always be a multiple of four.
        • In MIPS, the program counter will be incremented by 4 bytes.
          • Unless you get a jump instruction (e.g., methods, if statements).
    5. Bytes are loaded into the data bus.
  2. Decode the instruction
  3. Execute the instruction.

Note: The speed of the CPU is usually determined by the bus.

Instruction Cache: Memory in the CPU that stores n kilobytes of instructions.

Data Cache: Memory in the CPU that stores n kilobytes of data.

Note: More on the Instruction and Data Cache

CPU

CPU: Electronic circuitry within a computer that carries out the instructions of a computer program by performing the basic arithmetic, logic, controlling, and I/O operations specified by the instructions.

Example: Comparing binary values at the low level

  1. Add a to the two’s complement of b.

Functional Components within the CPU

External:

Interrupt

Normal execution of programs may be preempted if some device requires urgent servicing.