Systems Programming and Computer Architecture

What's new?

  • Jan. 8: Sample solution of assignment 8 extended to cover Inf, Nan, ...
  • Dec. 30: All remaining sample solutions are up.
  • Dec. 11: Assignment 12 is up.
  • Dec. 9: Chapter 18 and 19 slides are up.
  • Dec. 4: Assignment 11 is up.
  • Dec. 2: Chapter 17 slides are up.
  • Nov. 28: Assignment 10 is up.
  • Nov. 26: Chapter 15, 16 slides are up.
  • Nov. 21: Floating-point assignment evaluator is up.
  • Nov. 21: Assignment 9 is up.
  • Nov. 18: Chapter 14 slides are up.
  • Nov. 15: Assignment 8 is up.
  • Nov. 11: Chapter 13 slides are up.
  • Nov. 6: Assignment 7 is up.
  • Nov. 4: There will be no lectures this week, BUT there will be an exercise session.
  • Oct. 30: Assignment 6 is up.
  • Oct. 28: Chapter 11 and 12 slides are up.
  • Oct. 22: Assignment 4 sample solutions up.
  • Oct. 21: Chapter 10 slides up.
  • Oct. 16: Assignment 5 is up.
  • Oct. 15: Assignment 3 sample solutions up.
  • Oct. 14: Chapter 9 slides up. Minor revisions to chapter 6, 7 and 8 slides.
  • Oct. 9: Assignment 4 is up.
  • Oct. 7: Chapter 8 slides are up, sample solutions for assignment 2 are up.
  • Oct. 3: Assignment 3 minor update (fixed typos, coding style).
  • Oct. 2: Assignment 3 is up.
  • Sept. 30: Lecture slides 6 and 7 are up. Sample solutions for assignment 1 are up.
  • Sept. 25: Assignment 2 is up.
  • Sept. 18: Assignment 1 is up.
  • Sept. 18: Exercise groups are assigned. Scroll down on this page to find your exercise group, time and location info.
  • Sept. 17: There WILL be an exercise session this week.
  • Sept. 16: Lecture slides 1, 2 and 3 are up.

Schedule

Week no. Lecture no. Lecture date Lecture topic Book (2nd ed.)
chapter
1 1-1up-pdf, 1-6up-pdf Sept 17 Introduction  
2-1up-pdf, 2-6up-pdf Sept 18 Intro to C

No book material, Source Code

3-1up-pdf, 3-6up-pdf Sept 18 C Integers  2.2-2.3
2 4-1up-pdf, 4-6up-pdf Sept 24  Pointers No book material
5-1up-pdf, 5-6up-pdf  Sept 25 Dynamic Memory Allocation 9.9-9.11
3 6-1up-pdf, 6-6up-pdf Oct 1 C Wrap up No book material
 7-1up-pdf, 7-6up-pdf  Oct 2 Basic x86 Architecture 3.1-3.4, 3.13
4 Oct 8 Compiling C Control Flow 3.6
       
5 Oct 15  C Data Structures 3.8, 3.9
       
6  Oct 22 Memory Allocation 9.9, 9.10
       
7 Oct 28 Linking  7.1-7.10
Oct 29  Floating point 2.4
8

13-1up-pdf, 13-6up-pdf

Nov 11 Optimizing Compilers 5.1 - 5.11
14-1up-pdf, 14-6up-pdf Nov 18 Architecture and Optimization SequentialProcessor, PipelinedProcessor slides for detailed background
9 15-1up-pdf, 15-6up-pdf Nov 26 Caches 6.2 - 6.6
 16-1up-pdf, 16-6up-pdf Nov 26 Virtual Memory 9.1 - 9.7
10  17-1up-pdf 17-6up-pdf Dec 3 Exceptions 8.1
 18-1up-pdf 18-6up-pdf  Dec 10  Devices No book material
11  19-1up-pdf 19-6up-pdf Dec 17  Multiprocessing No book material

Assignments

Solutions (password protected)

Week no. Date Topic Material
1 Sept 19  Intro & DataLab
Beat The Prof
2  Sept 26  Intro to C Programming assignment2-pdf
3 Oct 3  More C Programming
4  Oct 10 Assembly
5 Oct 17 Bomblab + Assembly
6 Oct 31 Memory Management assignment6-pdf
7 Nov 7  Linking assignment7-pdf
8 Nov 15 Floating point operations

assignment8-pdf assignment8-tar FP-assignment-evaluation

9 Nov 21 Performance Measurement and Optimization assignment9-pdf
10 Nov 28  Optimizations assignment10-pdf assignment10-tar-gz
11 Dec 5  Virtual Memory & Page Table Programming
12  Dec 12 Writing device drivers assignment12-pdf handout12-tar

Overview

This course introduces the fundamental concepts, mechanisms, and techniques that underpin how computer systems process information, execute programs, and interact with the outside world. We focus on computing immediately above and below the boundary between hardware and software, and expose students to the practical issues that affect performance, portability, robustness, and extensibility through assembly language, the C programming language, and computer hardware from the perspective of systems software.

Topics include:

  • Representing information in computer systems
  • Systems programming in C
  • Assembly language and compiled code
  • Sequential, pipelined, and multicore processor design
  • Caches and the memory hierarchy
  • Performance optimization and performance measurement
  • Devices, I/O, traps, and DMA
  • Memory management

Main Text and Reference books

  • R. Bryant, D. O'Hallaron: Computer Systems: A Programmer's Perspective, 2nd ed. 2002, Prentice Hall.
  • B. Kernighan, D. Ritchie: C Programming Language, 2nd ed. 1988, Prentice Hall.

Recommended Text and Reference books

  • D. Patterson, J. Hennessy: Computer Organization and Design, 4nd ed. 2008, Morgan Kaufmann.
  • S. Harbison, G. Steele: C: A Reference Manual, 5nd ed. 1994, Prentice Hall.
  • S. Oualline: Practical C Programming, 1997, O'Reilly.
  • S. Prata: C Primer Plus, 2004, Sams.
  • U Kirch-Prinz, P. Prinz: C Pocket Reference, 2002, O'Reilly.
  • Intel publishes a lot of material covering the IA-32 processors. The official web site for IA-32 and Intel 64 documentation is here.

Additional Material

Lecturer

Staff

Hilfsassistenten

  • Raphael Fuchs (En/De)
  • Reto Achermann (En/De)
  • Janosch Hildebrand (En/De)

Course Hours

Lecture

  • Tue 10-12h, CAB G 61: Timothy (En)
  • Wed 10-12h, CAB G 61: Timothy (En)

Exercise

  • Thu, 13-15h, CHN D 42
  • Thu, 13-15h, CHN G 46
  • Thu, 13-15h, IFW A 32.1
  • Thu, 13-15h, IFW C 33
  • Thu, 13-15h, LFW C 1

Exercise Groups

Group 1 (De): Thu 13:00-15:00, CHN D 42 (Reto)

Ardüser Luca Baumann Cédric Blöchliger Andreas
Boesch Lilian Evelyn Bruggisser Dominik Fabian Bühler Michael Bernhard
Burkhalter Lukas Canonica Andrea Davide Maria Chalumattu Ribin Mathew
Fischer Marc Jonas Goldener Flavio Mathias Heim Marc Dominik
Hess Andreas Holdener Stefan Anton Hüsser Melanie
Krähenbühl Cyrill Emanuel Neugebauer Urs Florian Parthasarathy Gaurav
Peiker Alexander Schüpfer Andrea Regula Signer Christopher
van der Goten Lennart Alexander Widmer Lukas  

Group 2 (De): Thu 13:00-15:00, CHN G 46 (Lucas)

Auf der Maur Lea Bieri Yves Birrer Mathias
Bösch Dario Burri Tino Durrer Anna
Enz Andreas Ernster Pierre Glauser Annika
Haslebacher Raphael Kryenbühl Toni Kuster Lukas
Lei Matthias Leu Thomas Peyer Simon
Risse Kilian Spiess Robin Striebel Lukas
Valério Sampaio Daniel van Schie Adrian Weingart Nino
Sivaranjini Chithambaram Maurer Jonas  

Group 3 (De): Thu 13:00-15:00, LFW C 1 (Raphael)

Alatur Pragnya Athresh Bichsel Benjamin Borer Dominik Tobias
Christen Fabienne Diana Loris Fehlmann Christian
Guenat Balz Simon Haug Till Keller David Nils
Keller Susanne Helene Soteres Koller Zeno Romano Mohler Marcel
Müller Fabian Reifler Marco Steffen Samuel Lutz
Vaaler Robin Milan Fiore Vogel Frédéric Henri Weber Jil
Woon Qifang Marie Yu Daniel Jonas Purtschert
Luca Tondelli Fabian David Tschopp  

Group 4 (En): Thu 13:00-15:00, IFW C 33 (Dimitris)

Pagani Sasha Banfi Fabio Bähler Alessio
Dolfi Luca Gianinazzi Lukas Bag Gökhan
Laufenberg Felix Demotz Vincent Profanter Romy
Habicht Arthur Kozmai Dorela Hächler Michael
Guerini Mauro Lanz Matthias Zinsli Nina
Weilenmann Lorin Schmid Sascha Ribeiro João Pedro
Haas Christian Türk Can  
     

Group 5 (En): Thu 13:00-15:00, IFW A 32.1  (Janosch)

Koradi Roger Richner Benjamin Kilzer Georg
Inglin Raphael Kayed Alexander Wohler Thomas
Bissig Fabian Furrer Andreas Linggi Tim
Roos Dominik Schaefer Simon Akhadov Sabir
Kaufmann Mirko Zilian Moritz Schmid Patrick
Printz Attila Havasi Emanuel Calderara Mauro
Keller Aaron Javet Noe Kudryavtsev Eugene