Computer Architecture

Lecturer: Karen Tsarukyan
Classes: Once in a week

Short Description

The aim of the course is to show the students what is going on in different programming and architecture levels of the computer when software runs. Course will be built around C, assembly and low-level data representation. We'll discuss processing of the instructions, how code is transferred from higher to lower levels, data low-level representation and how this is connected to higher levels (how basic Java can be implemented) and the lower-level (the general structure of the processor).

Textbooks.

  1. John L. Hennessy, David A. Patterson.
  2. Computer Organization and Design: The Hardware/Software Interface.

    Content

    Very short introduction to Boolean Algebra, Binary Representation and C.


    Memory, Data, and Addressing, Integer and Floating Point Numbers, Arithmetic for Computers.

    Memory Organization. Address and Data Representations. Integers. Signed and Unsigned Numbers. 2s Complement. Floating Point Numbers. Addition and Subtraction. Multiplication. Division.


    Instructions, Machine Code, Language of the Computer.

    Operands of the Computer Hardware. Representing Instructions in the Computer. Instruction Set Architecture. RISC vs CISC. MIPS / x86 Assembly. Procedures and Stacks. Compiling C and Interpreting Java. Relative Costs of Instructions.


    The Basics of Logic Design. The Processor.

    Gates, Truth Tables and Logic Equations. Combination Logic. Constructing a Basic Arithmetic Logic Unit. Clocks. Timing Methodologies. Memory Elements: Flip-Flops, Latches and Registers (SRAMs, DRAMs). Logic Design Conventions. Building a Datapath.


    Arrays and Structs. Alignment.

    Array Allocation/Accesses. Nested, Multi-Level Arrays. Structures and Alignment. x86 vs platforms that enforce alignment. Structure padding in C. Demonstrating the slowdown on misaligned access on x86.


    Pipelining.

    Pipelined Datapath and Control. Data Hazards. Control Hazards. Branch Prediction. Reordering due to pipelining. Compiler generated reordering for pipeline optimization.


    Memory Hierarchy.

    The Basics of Caches. Measuring and Improving Cache Performance. Cache coherence. MESI protocol. Write Buffer․Memory barriers. Instruction Cache vs Data Cache. Cache profiling tools. Virtual Memory. TLB. DMA


    Storage and Other I/O Topics.

    Dependability, Reliability and Availability. Disc Storage. Flash Storage. Connecting Processors, Memory and I/O Devices. Interfacing I/O Devices to the Processor, Memory and Operating System. Performance Measures. Designing an I/O System. Parallelism and I/O.


    Multicores, Multiprocessors, and Clusters.

    The difficulty of creating parallel processing programs. Shared memory multiprocessors. Clusters and other message-passing multiprocessors. Hardware multithreading. SISD, MIMD, SIMD, SPMD, and Vector.