CS 240: Introduction to Computer Systems, Fall 2015

(a.k.a. Introduction to Machine Organization)

Course Staff

Instructor: Ben Wood, SCI E128 or microfous, office hours / contact on website
Lab Instructor: Jean Herbst, SCI E129, office hours / contact on website
Tutors: Amy and Meera

  • Monday 7pm - 9pm (SCI microfocus)
  • Tuesday 4:15pm - 5:15pm and 7pm - 8pm (SCI microfocus or S173)
  • Thursday 7pm - 9pm (SCI microfocus or S173)

Website: https://cs.wellesley.edu/~cs240/fall15/

Google Group: We will use the Google Group email list for announcements, course discussion, and help. You are subscribed automatically on registration. Please stay subscribed and check your email.

Class Meetings

  • Lecture: Tuesdays + Fridays 1:30pm - 2:40pm, SCI E111, Ben
  • Lab: Wednesdays 2:15pm - 5:15pm or 5:30 - 8:30pm, SCI S173, Jean

Attendance and active participation is expected at all labs and lectures. Lecture meetings will mix lecture-style instruction with small hands-on activities. Lab will focus on extended hands-on activities.

Textbooks

Additional reading material as well as reference material for tools and languages will be posted on the course website.

Course Description and Goals

Prerequisite: One of CS 111, CS 112, CS 118 [2012-2013], or permission of the instructor.

CS 240 examines how modern computer systems run programs, introducing key software and hardware abstractions between high-level programming languages and hardware circuits. The course traces themes of data representation and program translation, with a focus on how each level of abstraction (and its implementation) in a computer system impacts the execution of a high-level program. Topics include the C programming language, basic concepts of program compilation and assembly, machine code, instruction set architecture, basic microarchitecture, number representation and computer arithmetic, digital logic, the memory hierarchy, the operating system process model, virtual memory, and memory management. Students explore computer systems through projects ranging from simple hardware circuits through software memory allocators. Students are required to attend one three-hour laboratory.

Goals of this course include:

  • To understand key software and hardware abstractions (and their implementations) that comprise modern computer systems.
  • To understand how programs in high-level languages are executed by computer systems.
  • To understand how data is represented, stored, and manipulated in hardware.
  • To understand when and how features of an underlying computer system interact with high-level language programs to affect performance.
  • To understand the role of operating system abstractions.
  • To design and implement small tools and systems at the C programming language level of abstraction.
  • To become proficient at reasoning about program execution by inspecting execution state with debugging tools.

Schedule

We will follow the rough schedule outlined below. A more concrete working schedule and list of topics is available on the course website. Expect this schedule to shift somewhat as the semester evolves.

  • Weeks 0-4: Course themes, binary data representation, digital logic
  • Week 2: Number representation and computer arithmetic
  • Week 3: Sequential logic and memory implementation
  • Week 4: microarchitecture
  • Week 5: C, memory organization, pointers, arrays, and structs
  • Weeks 6-8: Instruction set architecture, assembly and machine code, program translation
  • Week 9: Memory hierarchy and cache
  • Week 10: Operating system support and processes
  • Week 11: Virtual memory
  • Week 12: Dynamic memory allocation
  • Week 13: Odds and edns: Linking/loading, compilers, run-time systems, parallelism and concurrency

Course Work and Grading

Reading

Readings posted on the working schedule on the course website cover much of the same material as lecture. Effective reading of a science textbook or paper takes a somewhat different form than reading material for other disciplines.

You are encouraged to do an initial reading of the material in preparation for the lecture to which it is attached. In this initial reading, you should aim for a big-picture understanding of the material to help you follow (or better yet, lead) the concepts in lecture. If you get stuck on a detail, move on. After lecture, revisit the reading more carefully and work through practice problems to help cement the concepts we have learned. Our textbook sometimes goes into more detail than we will cover, so learning to “read around” extra detail is a useful skill, especially in your pre-lecture reading. If you are curious about this additional detail, by all means read it. Unless explicitly directed to read further, you are not expected to be familiar with details we do not cover in lecture, lab, or assignments. Tia Newhall at Swarthmore College has more good advice on reading science textbooks here.

Assignments

CS 240 explores concepts in computer systems through a number of extended assignments, including software and hardware implementation, reverse engineering, and performance experiments.

[Updated for clarity, 20 September 2015]

CS 240 assignments have a few forms:

  • lab Short weekly pre-lab assignments prepare for hands-on work during the upcoming lab meeting. Pre-lab assignments are posted on the lab web page 1 or 2 days before lab.
  • ex Moderate written exercises explore concepts in the small or in the abstract.
  • code Large applied assignments involve signficant effort on programming, reverse engineering, and debugging. These assignments:
    • may link with ex or lab assignments;
    • are often introduced or started in lab;
    • often run longer than a week and include an intermediate checkpoint due date (some checkpoints are graded);
    • are managed and collected using [Mercurial and Bitbucket][hg], as covered in the first lab; and
    • should be completed (and will be graded) on a CS240-approved computing platform. See the Tools page on the course website for information about computing resources.

Our goal is to pose a challenge for you and to provide the support you need to meet that challenge successfully. Hopefully we will have fun along the way!

Laboratory

Weekly 3-hour lab meetings apply concepts we learn in the course. Many labs are closely linked with assignments, focusing on tools, concepts, and strategies that are key to the assignment. Labs include a small pre-lab exercise and result in a lab report. The hands-on lab experience is vital to the course. Attendance is required at all lab meetings.

[End update]

Exams

I plan two exams:

  • An in-class exam on Friday 2 October.
  • A take-home exam around Friday 13 November November. (Friday the 13th!?)

Projects

The last couple assignments will be implementation assignments, one of which will extend to become an open-ended final project, involving additional design, programming, evaluation, and a written report.

Grading

  • 50% assignments
  • 15% lab
  • 30% exams
  • 5% participation, etc.

This course complies with the Wellesley College policy (http://www.wellesley.edu/registrar/grading/gradingpolicyfaq). While that policy asks faculty to hold each 100- and 200-level course with 10 or more students to an average of no higher than 3.33, it does not require faculty to grade on a “curve.” There is no arbitrary limit on the number of A’s, B’s, C’s etc., and every student will be assigned the grade they earn and deserve according to the grading standards of the college.

Late Policy

Assignments are due at the date and time specified. This deadline is strict. You are each allotted a budget of 3 24-hour time-turner passes to use during the semester. Each pass may be redeemed to delay one deadline by exactly 24 hours. (e.g., turning in an assignment 1 hour late or 23.5 hours late both cost exactly one 24-hour pass.) Save your time-turner passes for emergencies. A 25%-per-day penalty is assessed for late work if you have no more passes to redeem. Passes are non-transferable and may not be applied to exams or projects. There is no guarantee about how long we will take to grade late work.

Honor Code and Collaboration

I encourage you to talk with other students about the course and to form study groups.

Unless otherwise instructed, feel free to discuss problems with other students and exchange ideas about how to solve them, but do not collaboratively develop a full solution. You must write (or otherwise implement) your own solution to each problem from scratch. With your solution to each problem, you must explicitly name each person with whom you discussed the problem and strategies to solve it.

On some problems, we may explicitly allow (and recommend) pairs of students to work together to produce a single solution. In this case, similar rules apply: you may discuss high-level strategies and ideas with others, but your solution must be the work of you and your partner only and you must cite your discussion collaborators in your work.

On other problems, we may explicitly disallow any collaboration. These problems must be solved alone, without discussing solution strategies with anyone except the instructors.

You are welcome to consult “external” material beyond the course material for CS 240, but you must cite any sources that contribute to your solution. (You do not need to cite documentation of tools, like compilers or debuggers.)

Exams will give explicit instructions on what sources (if any) are allowed.

Failure to cite collaborators or sources on assignments is a violation of the Honor Code, as is any collaboration or consultation of outside sources where these have been explicitly disallowed.

In general, common sense applies. If you are unsure of the boundaries of acceptable collaboration or use of reference material, please ask your instructor. In this case, it is far better to ask permission than to seek forgiveness.

Accommodations

Please feel free to speak with me about concerns or suggestions about how I can make the course more accessible to you. I will keep our conversations confidential and do my best to help. An anonymous feedback form is available in the Google Group if you would prefer.

Students with disabilities who are taking this course and who need disability-related accommodations are encouraged to work with Jim Wice (781.283.2434 or jwice@wellesley.edu), the Director of Disability Services. Jim’s office is located in the Pforzheimer Learning & Teaching Center on the third floor of Clapp Library. If you have a physical disability or a learning disability, Jim is the person to see to arrange for accommodations. If your learning disability is undocumented or if you are uncertain as to whether you have a disability, Jim can arrange for you to be tested.

Course Feedback

Please share suggestions and comments about the course at any time. Tell me what works well and what does not. I will do my best to address it. An anonymous feedback form is available if you would prefer.

Acknowledgments

This course draws extensively on materials developed by the CSAPP authors at Carnegie Mellon University, as well as adaptations of this material used in CSE 351 at the University of Washington. Material on digital logic and microarchitecture draws on previous iterations of CS 240 at Wellesley.