- 167 students
- 14 recitations sections (12 students each)
- 14 faculty doing recitations
- 8 faculty doing lectures
All topics concerning the contents and the use of the textbook:
R.E. Bryant & D.R. O'Hallaron, Computer Systems: A Programmer's Perspective
C had predecessors: The B language developed by Ritchie's colleague Ken Thompson, which in turn arose from BCPL, developed by Martin Richards of Cambridge University in 1966. These predecessors had many limitations, however, and so C really is the first, and arguably still the best, language for implementing system software.
C was, to my knowledge, the first high-level language that embraced the byte (although referred to as char) as a first-class data element---something that could be used as a data value, read from or written to memory, and replicated as an array. Having the ability to operate on byte arrays enables C programmers to create arbitrary system-level data structures, such as page tables, I/O buffers, and network packets. Such a capability was previously only available to assembly language programmers.
The early C compilers did not produce very good code. To get C programs to run fast, programmers had to do a lot of low-level tweaking of the code, such as declaring local variables to be of type register, converting array references to pointers, and explicitly performing such optimizations as code motion, common subexpression elimination, and strength reduction. This had the property of making the programs nearly illegible. Serious code tuners often resorted to assembly language. Fortunately, modern compilers make most of this low-level hacking unnecessary.
Consider how much code is still being written in C: all of Linux, all GNU software, and much more. If we extend to its younger brother C++, we get the vast majority of computer systems worldwide.
Dennis, thanks for the great language you created.
Interestingly, in their textbook Digitaltechnik—Eine praxisnahe Einführung (Digital Technology, a Practical Introduction), Armin Biere and Daniel Kroening present the design of a processor that executes a subset of the Y86 instructions using the actual IA32 encodings of the instructions.
Apparently, we weren’t the only ones to think of the name “Y86” as a variant of “x86.” Randall Hyde introduces a stripped down 16-bit instruction set, which he names “Y86” in his book Write Great Code, published in 2004, several years after the first edition of CS:APP came out.
The domain names “y86.com” and “y86.net” are already taken, but it looks like they’re been occupied by a cybersquatter named Richard Strickland since 2003. Perhaps he’s just waiting for us to buy him out!
In the end, I think the choice of teaching x86 vs. a cleaner language to a computer scientist or computer engineer is a bit like teaching English, rather than Spanish, to someone from China. Spanish is a much cleaner language, with predictable rules for how to pronounce words, far fewer irregularities, and a smaller vocabulary. It’s even useful for communicating with many other people, just as learning MIPS (or better yet, ARM) would be for programming embedded processors. But, as English is the main language for commerce and culture in this world, so x86 is the main language for machines that our students are likely to actually program. Like Chinese parents who send their children to English-language school, I’m content teaching my students x86!
What really made a difference in 15-213 was our ability to present interesting and engaging lab exercises, all done on computers. We had a set of Alpha 21164 processors (Digital Equipment Corporation---may they rest in peace---was always a great friend to CMU) that the students accessed over the network. Some of them were connected together via a separate Ethernet cable so that we could allow students to snoop packets in promiscuous mode.
Here are some of labs we offered that fall:
Instructors for our upper-level systems courses have come to appreciate the preparation that 15-213 provides. Dave Eckhardt, one of our OS instructors, says that he can reliably predict how well a student will do in their course based on how they did with the Malloc lab. 15-213 has become a prerequisite for courses in operating systems, networking, compilers, computer graphics (they want students to understand floating point), embedded systems, and computer architecture. The course is now required of all CS and ECE majors.
One sign of our success is the course ratings. Here’s my average scores for “instructor effectiveness” on a five-point scale:
I have now taught the course eleven times, and I still really enjoy it, as do the students. Dave has also taught the course many times, sometimes with me and sometimes with other instructors. He received the CMU School of Computer Science’s Herbert A. Simon Award for Teaching Excellence in Computer Science in 2004, based largely on our students’ appreciation of his efforts in teaching 15-213.
Meanwhile, at one of our faculty lunches, Garth Gibson described the challenges he had in his operating systems course with the students’ lack of understanding of how programs are executed. He would say “To do a context switch, the OS needs to push the values of the registers onto the stack,” to which the students responded “Registers? Stack? What are those?” I told Garth that the students learned all that in my architecture course, but we realized that my course was not a prerequisite for operating systems, and it wouldn’t really work to make it so, in terms of student schedules.
So, Dave O’Hallaron (who had cotaught the computer architecture course with me) and I started thinking about a new course that would
At CMU, I used to teach a junior-level computer architecture course that was required of all CS majors. I really liked showing how to construct a 5-stage pipeline to implement a processor that could execute MIPS code, as well as nuances of cache design, virtual memory, and data storage. Unfortunately, the students did not share my enthusiasm. They were much more oriented toward software, and, in their minds, this course formed a not-very-useful, dead-end branch in our curriculum.
We are creating this blog as a way to further build and support the CS:APP community. In this blog, we will post interesting stories, updates on the book contents and extra material, and our experiences in using this book in courses at CMU.
We welcome your suggestions, comments, and feedback!