Computer Systems Programming

Instructor: Wu-chang Feng
Office hours: here
TA:
TA Office hours:
Resources
Required textbooks
  • Computer Systems: A Programmer's Perspective, 3rd ed., Bryant and O'Hallaron, Prentice Hall, 2015. ISBN-13: 978-0134092669.
  • The C Programming Language, 2nd ed., Kernighan and Ritchie, Prentice Hall, 1998. ISBN 0-13-110362-8.
Recommended textbooks
  • The C Book M. Doran. GB Direct on-line book.
  • SEI CERT C Coding Standard CERT, on-line site.

Schedule

Date Topic (Reading) SlidesAssignment
9/27 Introduction, The C Programming Language (K/R Ch 1-4) Slides A1, MetaCTF
9/29 The C Library, GDB (B/O Ch1, Ch 7, K/R Ch 7) Slides  
10/4 Computer System Organization (B/O Ch 7) Slides
10/6 Data Representation (B/O Ch 2.1-2.2) Slides A1 Due
Submission instructions
10/11 Arithmetic and Floating Point representation (B/O Ch 2.3-2.5) Slides
10/13 x86 Basics (B/O Ch 3.1-3.5) Slides
10/18 Midterm Exam (K/R Ch 1-4,7, B/O Ch 1-2,7) Sample | Practice A2 Due (A3 assigned)
Submission instructions
10/20 x86 Control Flow (B/O Ch 3.6) Slides
10/25 x86 Procedures (B/O Ch 3.7, K/R Ch. 5.11-5.12) Slides
10/27 x86 Stack Overflow (B/O Ch 3.10)
11/1 x86 Arrays (B/O Ch. 3.8 K&R Ch. 5.1-5.10) Slides
11/3 x86 Structures, Embedded Assembly, ARM (B/O Ch. 3.9, K&R Ch 6) Slides
11/8 Program optimization (B/O Ch 5) Slides
11/10 Program optimization - SIMD (B/O Ch 3.11) Slides Final project: MetaCTF level.
Sample source
11/15 Cache memories (B/O Ch 6) Slides
11/17 Cache memories Slides A3 Due (A5 assigned)
Submission instructions
11/22 Exceptional control flow (B/O Ch 8) Slides
11/29 Exceptional control flow, Exam practice Slides A4 Due
Final project due
Submission instructions
12/1 Final exam walkthrough
12/6 Final project CTF Rogue
12/8 Thursday
(10:15am-12:05pm)
Final Exam (K/R Ch 5,6, B/O Ch 3, 5, 6, 8) Sample Final | Solutions | Final Practice
FinalReviewQs | FinalReviewSolutions

Policies

Grading
A1 (C/libc)5%
A2 (bit ops/floats)10%
A3 (asm,SIMD)5%
A4 (caching)5%
MetaCTF20%
Final project10%
Midterm20%
Final25%
Assignments
  • Due at the beginning of class
  • Docked 10% for each day late up to 5 days.
  • Not accepted after 5 days late
Exams
  • In class
  • Closed book
  • Closed notes
  • No electronics

Academic integrity
  • All assigned work is to be completed individually
  • For assignments, source code plagiarism tools will check that code has not been duplicated
  • Ensure your code is kept private
Academic misconduct
  • Includes allowing another student to copy your work
  • Results in a grade of 0 for the assignment or exam
  • Forwarded to the university for disciplinary action.

Course objectives

  • Describe basic computer system organization including the operating system (processes, files, virtual memory) and the underlying hardware (CPU, registers, memory hierarchy).
  • Describe the compilation system (preprocessing, assembling, compiling, and linking) and the function of object/executable files and shared libraries, as well as how basic system utilities such as debuggers and Makefiles work.
  • Write C programs to illustrate basic systems programming concepts, including file I/O, system calls, memory management, exception handling and process management.
  • Do arithmetic in hexadecimal, decimal, octal, and binary notation, and convert among these notations.
  • Explain how data types such as integers, characters, floating point numbers, arrays, pointers, and structures are represented
  • Describe the basic instruction set architecture for the Intel x86 family (or similar machine), including the arithmetic/logic instructions, registers, memory model and addressing, and control instructions.
  • Explain how high-level programming constructs such as loops and stack-based function calls are implemented in underlying machine code.
  • Explain how exceptions, traps, and context switches occur and how they are handled at the machine level.
  • Explain the performance impact of hardware features such as pipelining, and architecture principles such as memory locality.
  • Understand and identify performance bottlenecks in C programs.