C S 429H         Computer Organization and Architecture: Honors
In-person [52185]

Turing

Useful Links

  • Modern C, Second Edition
  • Unicode
  • C language reference
  • AArch64 reference manual
  • AArch64 ABI
  • ELF Binary File Format
  • The Old New Thing
  • Computer Organization and Architecture: Honors
    In-person [52185]

    This page is shallow, with most of the hyperlinks referencing UT-internal resources for the current semester's offering.

    Personnel

    Instructor: Dr. Siddhartha Chatterjee.
    TAs: See Canvas Page.

    Office Hours

    See Canvas Page.

    Course Overview

    C S 429H is the honors version of the first course in the systems core sequence required of all computer science majors at UT. It describes computer systems from a programmer's perspective, at a fairly low level of abstraction. It is a prerequisite for C S 439H (Principles of Computer Systems: Honors, aka “OS”: the second systems core course) and C S 331H (Algorithms and Complexity: Honors, aka “Algo”: the second theory core course). It also serves as a foundation for upper-division courses on compilers, networks, operating systems, and computer architecture, where a deeper understanding of systems-level issues is required.

    Prerequisites

    The following coursework with a grade of at least C- in each.

    Topics

    The course is organized into one language module and five additional content modules.

    • Programming in C in a Linux environment. The C programming language. The Linux command-line (shell) environment. Standard libraries. Programming tools: compilers, build systems, debuggers, version control tools. Understanding requirements and exploring design choices. Writing clean code. Students will write three reasonably complex programs in C in a Linux shell environment and integrate them into pre-existing modules such as test harnesses and simulators.
    • Representing and manipulating data. Binary encodings of, and basic operations on, basic data types: integers, floating-point numbers, and characters. Unicode and UTF-8. Derived data types: arrays, structures, unions, functions, pointers. Data alignment.
    • Machine-level representation of programs. Machine-level encoding and execution of programs written in high-level programming languages. The Armv8 A64 instruction set architecture (ISA). Data access instructions, arithmetic and logical operations, non-sequential control transfer, procedure call/return. Stack and heap disciplines for memory management. Code generation for C constructs. Techniques for explicit memory management.
    • Processor architecture and implementation. Basics of logic design. Sequential and pipelined implementations of a representative subset of the A64 ISA. Dependences and hazards. Forwarding, stalling, squashing. Pipeline control. Branch prediction. Pipeline performance equation.
    • Storage system architecture and performance. Volatile and non-volatile storage technologies. Locality of reference. Memory hierarchy. Structure and behavior of caches. Memory performance equation. Secondary storage and I/O. MMIO and DMA.
    • Linking. ELF files: object modules, executables, and shared objects. Techniques for static linking: symbol resolution, relocation, and patching. Techniques for dynamic linking: shared segments, GOT, PLT, lazy binding. Run-time programmatic linking of libraries.

    This is a programming-heavy course, with an emphasis on low-level systems programming. The primary programming language for this course is C. We will also use A64 assembly language extensively throughout the course.

    Textbooks and Materials

    The following books are recommended but not required.

    • Computer Organization and Design: The Hardware/Software Interface, ARM® Edition, by David A. Patterson and John L. Hennessy. Morgan Kaufmann, 2017. Paperback ISBN: 978-0-12-801733-3. eBook ISBN: 978-0-12-801835-4.
    • Computer Systems, A Programmer's Perspective, Third Edition, by Randal E. Bryant and David O'Hallaron. Pearson, 2016. ISBN 10: 0-13-409266-X. ISBN 13: 978-0-13-409266-9.
    • The C Programming Language, Second Edition, by Brian W. Kernighan and Dennis M. Ritchie. Prentice Hall Software Series, 1988. ISBN: 0-13-110326-8. This is the classic K&R book, the standard against which all reference manuals are compared. This book should be in the library of anyone who programs in C.

    In addition, we will be referencing official manuals and original papers, soft copies of which will be provided.

    Weekly Schedule

    Week Lectures
    1
  • Syllabus.
  • Introduction to C and Linux.
  • Linked lists in C.
  • Huffman coding in C.
  • 2
  • MLK Day. No class.
  • Values and representations. Bit technologies.
  • Codebooks. Weighted codes. Positional codes.
        Octal and hexadecimal notation.
  • Signed representations. Number wheel.
        Conversion, expansion, truncation.
  • 3
  • Boolean operations. Shifts. Byte ordering.
        Instruction processing.
  • Integer arithmetic: addition, subtraction, multiplication, division.
        Overflow.
  • Manipulating integer representations: basic techniques.
  • Manipulating integer representations: intermediate techniques.
  • 4
  • Manipulating integer representations: advanced techniques.
  • Floating-point: representation.
  • Floating-point: operations.
  • Dynamic memory management: basic techniques.
  • 5
  • Dynamic memory management: advanced techniques.
  • Character data. ASCII, Unicode. UTF-8 encoding.
  • Records and variant records: struct and union. Arrays.
  • Pointers. Data alignment.
  • 6
  • Introduction to ISAs. von Neumann instruction processing.
        AArch64 state and programming model.
  • Operand specifiers: immediate, register, memory.
  • Data transfer instructions.
  • ALU instructions.
  • 7
  • Code generation for basic and derived types.
  • Control transfer instructions.
  • Code generation for two-way branches and iterative constructs
        (do, while, for).
  • Code generation for multi-way branches (switch) and structured exits
        (break and continue).
  • 8
  • Procedural abstracton. Call/return instructions.
  • Activation records. Runtime stack.
  • Managing architectural register state.
  • AArch64 ABI.
  • 9
  • Digital logic. Combinational building blocks. Buses.
  • Building an ALU.
  • Maintaining state. Latches, flip-flops. Clocks.
  • Sequential circuits. FSMs.
  • Spring Break
    10
  • Single-cycle implementation of A64 subset.
  • Data and control paths. Retiming.
  • Principles of pipelining.
  • Naïve pipelined implementation. Correctness issues.
  • 11
  • Dependences and hazards.
  • Mitigating hazards: stalling, bubbling, squashing, forwarding.
  • Hazard-free pipelined implementation. Data, control.
        Pipeline performance equation (PPE).
  • Exception handling in pipelines.
  • 12
  • Volatile and non-volatile storage technologies.
  • Towards a storage hierarchy.
  • Structure of caches: ABC model.
  • Behavior of caches.
  • 13
  • Performance of caches: 3C model. Memory performance equation (MPE).
        Average memory access time (AMAT).
  • DRAM cells, chips, modules. SDRAM controller. ECC.
  • HDD: structure, behavior, performance.
  • Flash and SSD: technology, structure, performance, issues.
  • 14
  • Binary file formats: ELF. Runtime memory map.
  • Static linking: symbol resolution, relocation, patching.
  • Dynamic linking: shared segments, GOT.
  • PLT and lazy binding. Programmatic run-time linking.
  • Buses, MMIO, DMA.
  • © Siddhartha Chatterjee 2023 Responsive Design by Tyler Wittig Page Last Updated: