This course is a broad introduction to computer science that focuses on how a computer works and how programs run on computers. We examine the hardware and software components required to go from a program expressed in a high-level programming language like C or Python to the computer actually running the program. This course takes a bottom-up approach to discovering how a computer works, and introduces parallel and distributed computing with a specific focus on parallelism for multicore and other shared memory systems. Topics include theoretical models of computation, data representation, machine organization, assembly and machine code, memory, I/O, the stack, the operating system, compilers and interpreters, processes and threads, and synchronization. In addition to parallel programming, we will discuss parallel computers and system-level support for parallel computing. Prerequisite: Completion of CS21 or its equivalent.
This course will use iClickers to facilitate feedback and discussion during class. Clickers may be purchased at the college bookstore or online. Please register your device as soon as you get it. Registering allows me to give you credit for quizzes and class participation. We will begin using clickers for credit at the start of week 2!
Rather than requiring a textbook, we're going to use readings from the web
as our introduction to new material. The textbook we've used in the past for
this course is: Computer
Systems: A Programmer's Perspective by Bryant and O'Hallaron (Second
edition: 2/E CS:APP2e). It's a great reference, and I recommend it as a
supplemental source of information, if you're interested. I will list
corresponding sections for this book, when applicable.
By the end of the course, we hope that you will have developed the skills to:
This is a tentative schedule; it may change as we go. You should read the assigned sections before class to prepare for the reading quiz. All section numbers refer to the Bryant and O'Hallaron textbook unless otherwise indicated.
|WEEK||DAY||ANNOUNCEMENTS||TOPIC & READING||ASSIGNMENTS||AUDIO|
|Course Introduction |
|Lab, Week 1||Lab 1||Audio|
|Data Representation |
Reading: This page
Textbook (supplemental): 2.1 - 2.1.3, 2.2 - 2.2.3
|Binary Arithmetic |
Reading: This page
Textbook (supplemental): 2.1.8, 2.1.10, 2.2.3, 2.3 - 2.3.1
|Lab, Week 2||Lab 2||Audio|
|Introduction to C Programming |
Reading: C for Python Programmers (Sections 1.5-2.5)
|Digital Circuits |
Reading: Page 1 and Page 2
Textbook (supplemental): 1.4.1, 4.2 - 4.2.4
|Lab, Week 3||Lab 3||Audio|
|Digital Circuits, Continued |
Reading: This page and the sections titled "Arithmetic logic unit", "Signals", and "Circuit operation" of this page.
Textbook (supplemental): 4.2.5
|ISAs and Assembly |
Reading: From this PDF, The introduction (first page) and sections 2.2, 2.3 - 2.3.3, 2.5.0 (don't continue into 2.5.1)
Textbook (supplemental): 3.0, 3.2
|Lab, Week 4||Audio|
|ISAs and Assembly, Continued |
Reading: X86 Assembly (Intro through "Registers" section), Addressing modes (Just the intro here / stuff above table of contents), and Branching
Textbook (supplemental): : 3.4 - 3.4.2, 3.6 - 3.6.4
|Pointers and Memory |
Reading: The 5-minute guide to C pointers
|Lab, Week 5||Lab 4||Audio|
|Pointers and Memory, Continued |
Reading: Pointer Arithmetic (skip "Two dimensional arrays" and "Pointer subtraction") and malloc & free
Textbook (supplemental): 3.5.1, 3.8.2, 9.9.1 - 9.9.2, 9.11 - 9.11.2, 9.11.7 - 9.11.10
|Functions and the Stack |
From this page, the intro through the "Structure" sections. (You can skip 'enclosing subroutine context' and 'lexically nested routines'.)
Textbook (supplemental): 3.7 - 3.7.3
Note: The textbook draws memory upside down as compared to how we draw it in class!
|Lab, Week 6||Lab 5||Audio|
|Functions and the Stack, Continued |
Reading: From this page, read about the call and ret instructions and the subsequent "Calling Convention" section (scroll down a little).
|Arrays, Structs, and Pointers |
Reading: page 1, page 2, and the intro of page 3.
Midterm exam 7:00 PM - 8:30 PM in SCI 101
|Lab, Week 7 - Midterm Q&A / Work on Maze||Audio|
|Arrays, Structs, and Pointers, Continued |
No reading quiz. Review the previous readings.
|Storage and the Memory Hierarchy |
Reading: this page and through "spatial locality" on this page.
Note: These pages are a work in progress. The links on the sidebar won't work and figures/tables aren't officially labeled yet. Please let me know if you catch any typos or have feedback about improving these sections!
|Lab, Week 8||Lab 6||Audio|
Reading: Through "Memory Address Division" on this page
Textbook (supplemental): 6.3 - 6.4.4
|Caching, Continued |
Reading: Everything after "Memory Address Division" on this page.
|Lab, Week 9||Lab 7||Audio|
|Operating Systems |
Reading: this page
Reading: this page, up to the first exercise.
|Lab, Week 10 (Same page as week 8)||Lab 8||Audio|
|Virtual Memory |
Reading: this page (through "paging")
Textbook (supplemental): 9.0 - 9.2, 9.5, 9.6.0
|Virtual Memory, Continued |
Reading: this page ("virtual and physical addresses in page systems" through "paging implementation")
|Lab, Week 11||Audio|
|Parallel Applications and Threading |
Reading: The Concurrency Revolution (Note: this article is from 2005)
|Lab, Week 12||Audio|
|Race Conditions and Synchronization |
Reading: this page, Intro through "multithreading" and this page, Intro
Textbook (supplemental): 12.4 - 12.5.3
|Race Conditions and Synchronization, Continued |
Reading: this page, Intro through "necessary conditions"
Textbook (supplemental): 12.7.4 - 12.7.5
|Lab, Week 13||Audio|
|Parallel Programming with pthreads |
Final Exam, 9:00 AM - 12:00 PM (Science Center 101)