Instructor: Kyle C. Hale
Office Hours: M 4:30-6:00PM; Th 9:30-11:00AM, or by
appointment. (SB 229C)
E-mail: khale [at] cs [dot] iit [dot] edu
TAs:
Chaoqi Ma
Office Hours: M 12:00 - 1:00PM (SB 004)
E-mail: cma17 [at] hawk [dot] iit [dot] edu
Zachary Mckee (L01)
Office Hours: T 1:00 - 2:00PM (SB 108)
E-mail: zmckee [at] hawk [dot] iit [dot] edu
Philip Sijimon (L01)
Office Hours: T 2:00 - 3:00PM (SB 108)
E-mail: psijimon [at] hawk [dot] iit [dot] edu
Syed Rizvi (L02)
Office Hours: W 11:30AM - 12:30PM (SB 108)
E-mail: srizvi13 [at] hawk [dot] iit [dot] edu
Samuel Furr (L03)
Office Hours: F 2:10 - 3:10PM (SB 108)
E-mail: sfurr [at] hawk [dot] iit [dot] edu
Nathan Jones (L03)
Office Hours: F 4:05 - 5:05PM(SB 108)
E-mail: njones10 [at] hawk [dot] iit [dot] edu
Course number: CS 350
Semester: Spring 2018
Lecture Time: Mod/Wed 3:15PM - 4:30PM
Lecture Location:Siegel Hall 118
Lab 01 Time: Fri 3:15PM - 4:05PM
Lab 01 Location: SB 108
Lab 02 Time: Fri 3:15PM - 4:05PM
Lab 02 Location: SB 112E
Lab 03 Time: Fri 3:15PM - 4:05PM
Lab 03 Location: SB 112F
This course will be your entry into the world of computer systems. This is where you will begin to see the "nuts and bolts" of computers—how they're designed, how they're implemented, how they're programmed at the lowest levels, and how the whole system fits together. As such, this is a "bottom-up" course. By the end, when you write your high-level programs, whether they're in C, Python, Ruby, Node.js, or brainfuck, you should be able to reason about how the code you write turns into low-level operations on the hardware. You will be able to cut through levels of abstraction to gain a deeper understanding of how computer systems work. After finishing this course, you will no longer take for granted the mesmerizing array of languages and tools that "just work." The path will be open for you to become a practitioner of the dark arts of systems programming who shuns Clarke's third law and who, when in need of a Linux machine, writes it in C.
Note that CS 350 is a required core course for both the CS and CIS undergraduate curriculums
Week | Date | Item | Topic | Notes | Reading |
---|---|---|---|---|---|
1 | Mon 1/8 | Lec 1 | Intro, logistics, abstraction | No labs 1st week of class Lec 1 Notes Lec 1 Slides |
Optional reading: As
We May Think - Vannevar Bush Optional reading: Feynman Chs. 1/2 |
1 | Wed 1/10 | Lec 2 | Digital representations I | Optional reading: Annotated Turing (good book in general for intro to Turing Machines) | |
2 | Mon 1/15 | holiday | MLK Day | ||
2 | Wed 1/17 | Lec 3 | Digital representations II | Lec 2 notes | Optional reading: It from Bit |
3 | Mon 1/22 | Lec 4 | Intro to C Programmming | Lec 4 slides | |
3 | Wed 1/24 | Lec 5 | Transistors | Lec 5 slides Lec 5 notes |
Required reading:Weste & Harris Ch. 1 |
4 | Mon 1/29 | Lec 6 | Transistors contd., Boolean algebra & logic design | Lec 6 notes | |
4 | Wed 1/31 | Lec 7 | Logic, gates, bit operations | Lec 7 notes | Required reading:Feynman Ch. 2 |
5 | Mon 2/5 | Lec 8 | Bit twiddling, shifting, binary fractions, hex | Lec 8 notes | |
5 | Wed 2/7 | Lec 9 | Floating point, combinational logic | Lec 9 notes | |
6 | Mon 2/12 | Quiz 1; combinational logic contd. | (See Tests) | Lec 10 notes | |
6 | Wed 2/14 | Lec 11 | More combinational logic | Lec 11 notes | |
7 | Mon 2/19 | Lec 12 | Memory from gates | Lec 12 notes | |
7 | Wed 2/21 | No lecture, instructor out of town | |||
8 | Mon 2/26 | Lec 13 | Memory Architecture & Storage Cells | Lec 13 notes | |
8 | Wed 2/28 | Lec 14 | Sequential Circuits | Lec 14 notes | Required reading: Patt & Patel Ch. 3 |
9 | Mon 3/5 | Lec 15 | Exam review | ||
9 | Wed 3/7 | Exam 1 | (See Tests) | ||
10 | Mon 3/12 | holiday | Spring Break (No classes) | ||
10 | Wed 3/14 | holiday | Spring Break (No classes) | ||
10 | Fri 3/16 | holiday | Spring Break (No classes) | ||
11 | Mon 3/19 | Lec 16 | State Machines | Lec 16 notes | |
11 | Wed 3/21 | Lec 17 | State Machines contd. & von Neumann Architecture | Lec 17 notes | Required reading:PP 3.6 |
12 | Mon 3/26 | Lec 18 | von Neumann Architecture cont'd & ISA design | Lec 18 notes | Required reading:PP Ch. 4 |
12 | Wed 3/28 | Lec 19 | Control flow instructions, ISA design | Lec 19 notes | |
13 | Mon 4/2 | Lec 20 | LC-3 Intro, datapath design | Lec 20 notes | |
13 | Wed 4/4 | Quiz 2; Lec 21 | Assembly Language & Assemblers | Required reading:PP Ch. 7 | |
14 | Mon 4/9 | Lec 22 | Traps, Subroutines, Linkage | ||
14 | Wed 4/11 | Lec 23 | The Runtime Stack | Required Reading: PP Ch.
9 PP. Ch.10.1-10.3 PP. 14.3 |
|
15 | Mon 4/16 | Lec 24 | System Traps; Dynamic Memory | ||
15 | Wed 4/18 | Lec 25 | Linking & Loading; I/O; Interrupts; Memory-mapping | ||
16 | Mon 4/23 | Lec 26 | Potpurri | ||
16 | Wed 4/25 | Exam 2 | (See Tests) |
Week | Date | Item | Length | Covers | File Date | Note |
---|---|---|---|---|---|---|
6 | Mon 2/12 | Quiz 1 | 30 min | Lec 1-7, Lab 0-2 | ||
9 | Wed 3/7 | Exam 1 | 75 min | Apx 75% on Q1 material, 25% on Lec 11-14, Labs 3-4 | ||
13 | Wed 4/4 | Quiz 2 | 30 min | TBD | ||
16 | Wed 4/25 | Exam 2 | 75 min | TBD |
Lab | Covers Lec | Due Date | Handout | Notes (TBP = To Be Posted) |
---|---|---|---|---|
0 | --- | None | Lab 0 | Posted 1/9; Solutions posted 2/7 |
1 | 1-3 | 02/02/2018 11:59PM | Lab 1 | Posted 1/26; Solutions posted 2/7 |
2 | 4-8 | 02/09/2018 11:59PM | Lab 2 | Posted 2/2; Solutions posted 2/12 |
3 | -- | 02/25/2018 11:59PM | Lab 3 | Posted 2/18 |
4 | 8-11 | 03/05/2018 11:59PM | Lab 4 | Posted 2/26; Solutions posted 3/25 |
5 | 13-16 | 04/02/2018 11:59PM | Lab 5 | Posted 3/26; Solutions posted 4/12 |
6 | 17-20 | 04/11/2018 11:59PM | Lab 6 | Posted 4/4; Solutions posted 4/17 |
Final Project | --- | 04/27/2018 11:59PM | Final Project | Posted 4/1 |
There are no required textbooks for this course. This means it is absolutely essential that you attend class, participate in discussions, and come to office hours. I am, however, recommending the following textbook for this course, as it is where the project will come from:
A classic book on introductory computer architecture. If you'd like to learn more about processor architecture, and would like to learn how to design your own control and datapaths (this book uses MIPS), this is a great resource:
A good book dedicated to logic design, which we cover in the first half of this course.
This is also a useful book to have on your shelf. It is a bit newer. It does not go into quite as much detail, but does guide you through building your own virtual computer:
This course takes a "bottom-up" approach to programming, in that we start from the principles of digital logic design and computer organization. You'll soon be taking CS 351, which is closely related and complementary to this course. If you want to get ahead, you should consider purchasing this book (you'll need it anyway) and skimming. There is a good deal of overlap, but from a slightly different perspective:
For this class, though our programs will be written in C on Linux, this is not a class on how to program in C on Linux. We'll spend some time in class looking at pointers and structures, but we won't cover all of the C and Linux you need for the course. You'll need to learn the rest on your own (or with other students (see Working Together on Labs below). If you are considering specializing in computer systems, e.g. computer architecture, operating systems, networking, and distributed systems, you'll find that a mastery of the C language is absolutely essential.
Here is a good interactive, online reference for learning C. If you can make it through this tutorial, you will likely be fine with C in this course. Here is a quick reference card for C syntax and common functionality.
The following book is one you will find on the shelf of any good systems programmer. It is the definitive reference for the original ANSI C language, written by its designers. While we will be mostly using the updated C99 specification of the language, it is still an excellent book to own:
Here is another decent book for learning C with a more practical bent. It is aimed towards people intending to build real, resilient systems with the C language:
Of course, the best way to learn a programming language is to see examples from master programmers. In this light, we will be looking at some examples from one of the most widely used and successful open-source codebases in existence, the Linux kernel. We will be looking at C design patterns used there, possibly including more advanced uses like object-oriented design patterns in C.
At this point, you are probably still used to using a Mac or a Windows system. In the CS world however, if you want to have any hope of being productive, you absolutely must learn to work in a UNIX-like environment (e.g. Linux, FreeBSD). I encourage you to use a desktop hypervisor (such as Parallels, VMware, or VirtualBox ), download a Linux distribution of your choice (Ubuntu, Mint, Debian, Fedora, OpenSUSE, and Arch are good choices), and boot it as a VM to get the lay of the land.
Probably the most useful skill you'll need to acquire is navigation at the UNIX command shell. Here is a good tutorial for that. Here is a nice reference that will allow you to look up commands that you encounter but do not know.
Here is a nice overview of UNIX programming, especially the design philosophies and common themes.
Here is a good book on programming in the UNIX environment, from the lowest levels:
For more advanced shell usage and Linux system administration:
You will be mostly writing C and assembly in this course. You are free to write it any way you like. You must, however, make sure it compiles and runs correctly on the course server, described below. You'll want to make sure that your compiler (gcc) is roughly the same version as that on the course server, otherwise you can expect strange differences. If you want to play it safe, just write your code on the course server.
We'll be using the server named fourier.cs.iit.edu
. If you have
registered for the course already, you should already have received an e-mail
notifying you of your account creation. If this is not the case, you need to let
me know ASAP!
The first lab will have details on getting on the machine to do your work. If you want to get started early, you'll first want to use a terminal emulator. If you're on a Mac, you can just use the Terminal application (or iTerm2, which has some bells and whistles). If you're on Windows machine, you'll want to use Cygwin, which emulates a UNIX-like environment. If you're using a Linux distro, you probably don't even need to be reading this section.
From your terminal, you can log in to the course server this way:
$> ssh your-id@fourier.cs.iit.edu
Note that the $>
above simply indicates that you are sitting at
a terminal (it represents the prompt). You will probably see something different, depending on which
machine and which shell you're using. For example, you might see a prompt like:
[kyle@localhost]$
The command you enter actually starts with the ssh
component.
If you are not familiar with navigating in a command-line environment, now is the time. The sooner you wean yourself off a GUI-based point-and-click environment, the better off you'll be moving forward in your systems classes. See the Linux section for some pointers on how to get started.
This is a list of other resources that you might find useful for this class and for doing work in the systems area in general. Feel free to peruse them at your own convenience.
These books are not all technical, but are broadly applicaable to computer systems, science, engineering, and programming.