DM548 - Computer Architecture and System Programming, 2018 ========================================================== `Course description `__ Schedule -------- (`Official schedule `__) .. _dm548_18_f01s: ../../_static/teaching/dm548_18/f01/s01.pdf .. _dm548_18_f01c: ../../_static/teaching/dm548_18/f01/code/ .. _dm548_18_f02s: ../../_static/teaching/dm548_18/f02/s02.pdf .. _dm548_18_f02c: ../../_static/teaching/dm548_18/f02/code/ .. _dm548_18_f03s: ../../_static/teaching/dm548_18/f03/s03.pdf .. _dm548_18_f05s: ../../_static/teaching/dm548_18/f05/s05.pdf .. _dm548_18_f06s: ../../_static/teaching/dm548_18/f06/s06.pdf .. _dm548_18_f07s: ../../_static/teaching/dm548_18/f07/s07.pdf .. _dm548_18_f09s: ../../_static/teaching/dm548_18/f09/s09.pdf .. _dm548_18_f10s: ../../_static/teaching/dm548_18/f10/s10.pdf .. _dm548_18_f11s: ../../_static/teaching/dm548_18/f11/s11.pdf .. _dm548_18_f12s: ../../_static/teaching/dm548_18/f12/s12.pdf .. _dm548_18_f13s1: ../../_static/teaching/dm548_18/f13/s13_1.pdf .. _dm548_18_f13s2: ../../_static/teaching/dm548_18/f13/s13_2.pdf .. _dm548_18_f14s: ../../_static/teaching/dm548_18/f14/s14.pdf .. _dm548_18_f15s: ../../_static/teaching/dm548_18/f15/s15.pdf .. _dm548_18_f15c: ../../_static/teaching/dm548_18/f15/code/ .. _dm548_18_f16s: ../../_static/teaching/dm548_18/f16/s16.pdf .. _dm548_18_f17s: ../../_static/teaching/dm548_18/f17/s17.pdf .. _dm548_18_f17c: ../../_static/teaching/dm548_18/f17/code/ .. _dm548_18_f18s: ../../_static/teaching/dm548_18/f18/s18.pdf .. _dm548_18_f18c: ../../_static/teaching/dm548_18/f18/code/ .. _dm548_18_f19s: ../../_static/teaching/dm548_18/f19/s19.pdf .. _dm548_18_f19c: ../../_static/teaching/dm548_18/f19/code/ .. _dm548_18_f20s: ../../_static/teaching/dm548_18/f20/s20.pdf .. _dm548_18_f20c: ../../_static/teaching/dm548_18/f20/code/ .. _dm548_18_f21s: ../../_static/teaching/dm548_18/f21/s21.pdf .. _dm548_18_f21c: ../../_static/teaching/dm548_18/f21/code/ .. _dm548_18_l01: ../../_static/teaching/dm548_18/l01/l01.pdf .. _dm548_18_l01c: ../../_static/teaching/dm548_18/l01/snippet.s .. _dm548_18_l02: ../../_static/teaching/dm548_18/l02/l02.pdf .. _dm548_18_l02c: ../../_static/teaching/dm548_18/l02/strlen.s .. _dm548_18_l03: ../../_static/teaching/dm548_18/l03/l03.pdf .. _dm548_18_l03c: ../../_static/teaching/dm548_18/l03/util.s .. _dm548_18_l04: ../../_static/teaching/dm548_18/l04/l04.pdf .. _dm548_18_l05: ../../_static/teaching/dm548_18/l05/l05.pdf .. _dm548_18_l06: ../../_static/teaching/dm548_18/l06/l06.pdf .. _dm548_18_l06c: ../../_static/teaching/dm548_18/l06/code/ .. _dm548_18_e01: ../../_static/teaching/dm548_18/e01/e01.pdf .. _dm548_18_e02: ../../_static/teaching/dm548_18/e02/e02.pdf .. _dm548_18_e03: ../../_static/teaching/dm548_18/e03/e03.pdf .. _dm548_18_e04: ../../_static/teaching/dm548_18/e04/e04.pdf .. _dm548_18_e05: ../../_static/teaching/dm548_18/e05/e05.pdf .. _dm548_18_e06: ../../_static/teaching/dm548_18/e06/e06.pdf +------+---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | Week | Day | Class | Material | Notes | +======+===============+=======+==========================================+=========================================================================================================+ | 36 | Mon. | F | | Introduction | | | | | `Slides `__, | | | | | | `Code `__, | | | | | | Ch. 1, 2 | | +------+---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | 37 | Mon. | F | | Assembly | | | | | `Slides `__, | (**1 Oct**: slide 24 updated with flags and mode for "``open``") | | | | | `Code `__, | | | | | | Part of Ch. 12, 13 | | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Wed. | F | | Computer arithmetic | | | | | `Slides `__, | | | | | | Ch. 9, 10 | | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Tue. / Wed. | L | (no class) | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Thu. | E | (no class) | +------+---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | 38 | Mon. | F | | Computer arithmetic, continued | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Wed. | F | | Digital logic | | | | | `Slides `__, | | | | | | Ch. 11 | | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Tue. / Wed. | L | | Introduction to assembly | | | | | `Lab `__, | | | | | | `Code `__ | | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Thu. | E | (no class) | +------+---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | 39 | Mon. | F | | Top-level view | | | | | `Slides `__, | | | | | | Ch. 3 | | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Wed. | L | | I/O and command line arguments | | | | | `Lab `__, | | | | | | `Code `__ | | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Thu. | E | | Computer arithmetic | | | | | `Exercises `__ | | +------+---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | 40 | Mon. | F | | Caches (**15 Oct.**: slides updated) | | | | | `Slides `__, | | | | | | Ch. 4 | | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Wed. | F | (cancelled) | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Tue. / Wed. | L | | More assembly | | | | | `Lab `__, | | | | | | `Code `__ | | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Thu. | E | (no class) | +------+---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | 41 | Mon. | F | (cancelled) | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Wed. | F | | Caches, continued | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Tue. / Wed. | L | (cancelled) | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Thu. | E | (cancelled) | +------+---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | 42 | | (fall break) | +------+---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | 43 | Mon. | F | | Internal and external memory | | | | | `Slides `__, | | | | | | Ch. 5, 6 | | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Tue. | F | | I/O | | | | | `Slides `__, | | | | | | Ch. 7 | | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Thu. | E | | Computer arithmetic and boolean algebra | | | | | `Exercises `__ | | +------+---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | 44 | Mon. | F | | Processor structure and pipelining | | | | | `Slides `__, | | | | | | Ch. 14 | | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Wed. | F | | RISC | | | | | `Slides `__, | | | | | | Ch. 15 | | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Tue. | L | | SSE | | | | | `Lab `__ | | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Thu. | E | | Cache and memory | | | | | `Exercises `__ | | +------+---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | 45 | Mon. | F | | Superscalar processors. Parallel Processing and Multicore Computers | | | | | `Slides `__, | | | | | | Ch. 16, | | | | | | `Slides `__, | | | | | | Ch. 17, 18 | | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Wed. | F | | Parallel Processing and Multicore Computers, continued. Control unit | | | | | `Slides `__, | | | | | | Ch. 20, 21 | | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Thu. | E | | Remaining exercises and project Q/A | +------+---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | 46 | Mon. | F | | Control unit, continued | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Wed. | F | | Introduction to C | | | | | `Intro Slides `__, | | | | | | `Code `__ | | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Thu. | E | | I/O, Processor Structure, and RISC | | | | | `Exercises `__ | | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Sun. | **Assignment 1 deadline** | +------+---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | 47 | Mon. | F | | Introduction to C, continued. I/O in C | | | | | `I/O Slides `__ | | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Wed. | F | | I/O in C continued, Makefiles, User-defined types | | | | | `Makefile Slides `__, | (**30 Nov.**: Makefile slides and code updated) | | | | | `Makefile Code `__, | | | | | | `UDT Slides `__, | | | | | | `UDT Code `__ | | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Tue. / Wed. | L | | Introduction to C | | | | | `Lab `__ | | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Thu. | E | | Superscalar processors and parallel processing | | | | | `Exercises `__ | | +------+---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | 48 | Mon. | F | | User-defined types continued, Dynamic memory allocation, Various | | | | | `Dyn. Mem. Slides `__, | | | | | | `Dyn. Mem. Code `__, | | | | | | `Various Slides `__, | | | | | | `Various Code `__ | | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Wed. | F | | Various continued. | | | | | | | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Tue. / Wed. | L | | A binary search tree in C. | | | | | `Lab `__, | | | | | | `Code `__ | | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Thu. | E | (no class) | +------+---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | 49 | Mon. | F | | Libraries | | | | | `Libraries Slides `__, | | | | | | `Libraries Code `__ | | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Tue. / Wed. | L | | A binary search tree in C, continued. | + +---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | | Thu. | E | | | | | | | `Exercises `__ | | +------+---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ | 50 | Sun. | **Assignment 2 deadline** | +------+---------------+-------+------------------------------------------+---------------------------------------------------------------------------------------------------------+ Mandatory Assignments --------------------- Assignment 1: Sorting in Assembly ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Project description: `PDF <../../_static/teaching/dm548_18/a01/a01.pdf>`__ - Code snippets: `code <../../_static/teaching/dm548_18/a01/code/>`__ - Deadline: **Sunday 18 November** Assignment 2: A Dynamic Array in C ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Project description: `PDF <../../_static/teaching/dm548_18/a02/a02.pdf>`__ - Code snippets: `code <../../_static/teaching/dm548_18/a02/code/>`__ - Deadline: **Sunday 16 December** Exam ---- * `Examination dates `__ * The details of the written exam are posted on Blackboard under Course Information and Announcements. * The exam questions will be in English, but answers may be written in either English or Danish. * A selection of exam questions from previous years can be found `here <../../_static/teaching/dm548/exam/>`__. The filenames refer to the year the course took place, not the year the exam was held. The oldest questions are unfortunately only available in Danish. Note that not all questions are relevant in the current curriculum. Teaching Assistants ------------------- - Caroline Berntsen Knudsen - Jørn Guldberg Material -------- William Stallings: **Computer Organization and Architecture --- Designing for Performance**, Global Edition, 10th edition, Pearson, 2015. Course Evaluation ----------------- The course evaluation, without free-text comments, can be found `here <../../_static/teaching/dm548_18/eval.pdf>`__, and the action plan can be found `here <../../_static/teaching/dm548_18/action.pdf>`__. Additional Resources -------------------- * `x86(-64) Instruction Reference `__ (note that the order of operands is the reverse of the AT&T syntax) * `Table of x86-64 Linux system calls `__ * `x86 Assembly Wiki book `__ * `SSE `__ * `GNU Assembler (GAS) documentation `__ * `GNU Debugger (GDB) documentation `__ * `TUI `__ * `Dashboard `__, a prettier and much more advanced interface for GDB. * `GNU Make documentation `__ * https://en.wikichip.org * `Kaby Lake - Microarchitectures - Intel `__ * `Ring Interconnect `__ in Intel microarchitectures. * `Mesh Interconnect `__ * https://wiki.osdev.org * `Software optimization resources, Agner Fog `__ * https://en.cppreference.com * `The C Language `__ * Sanitizers: * `GDB and ASan `__ * `Compiler Explorer `__ * `A Visualiser of C Execution `__ * `Computerphile on Youtube `__ * Exploits: * `PortSmash `__, snoop on another process in processors with simultaneous multi-threading (SMT), e.g., HyperThreading.