Fall 2020
-->

# syllabus

## info

A close look at what goes on "under the hood" of a computer, examining how machine code for a C program runs on a linux computer. Sometimes called "Computer Organization", a course like this one is a required part of most computer science degree programs, typically taken by in the second or third year.

Topics include a review of the C programming language, machine-level data representation and assembly language, processor organization, system performance, memory caching and virtual memory, code compilation and linking, processes, signals, and some networking.

Prequisites: Permission of the instructor. Two previous computer science courses such as Introduction to Computer Science and a Data Structures course, or the equivalent are required, including familiarity with the unix shell and C programming language.

## learning outcomes

By taking this course, students will see the inner workings of the unix operating system. In particular, they will

• explore the bit representations of characters, integers, and floating point numbers
• reverse engineer x86 machine code into higher level programming descriptions
• examine the unix virtual memory model including the heap, stack, allocation, and caches
• understand the unix process model in detail, including the x86 assembly calling conventions, and inter-process communication
• practice coding common system-level utilities such as shells and client-server applications

## format

We'll meet twice weekly in a zoom session, Tue and Fri from 2-4pm, to make sure we're all on the same page and to discuss the material.

I'll post regular course notes describing what you should be doing, as well as twice weekly assignments. I may also post some videos of myself explaining some topics if that seems appropriate.

We'll be following a Carnegie Melon course which has videos, pdf slides, and packaged coding "labs" , all by the authors of the textbook.

So the course will consist of :

• Weekly reading and coding assignments from the "Computer Systems" textbook and CMU materials.
• Video summaries of the key ideas, as I would have explained them in a face-to-face setting.
• A number of intense "labs" developed by the folks at CMU.
• Opportunities each week to discuss the material, ask questions, and get help in zoom meetings and slack conversations.

While I've taught this course a number of times before at Marlboro College, doing it entirely online is new to me, so this plan may well change as we go along. Please do give me feedback about what is and isn't working.

You should expect to spend at least twenty hours per week on this course, and perhaps more depending on your background and inclinations.

This material is technical and detailed; you'll need to both to dig in and study the sources, and to be persistent in working on the assignments and labs.

All work in this class is to be completed and submitted by each student - none of these are to be submitted as group projects. However, you may work with others if you choose, as long as you document in your submission what was your work and what wasn't. You may also search online for hints as needed - as long as you clearly quote your sources, and give credit where credit is due.

For all the work that you turn in, I am looking for you to demonstrate that you understand the material and have engaged with the problem fully. Simply finding an answer online and quoting it is not enough - your goal should be to convince me that after reading, studying, and with whatever assistance you found, you have understood and accomplished the task at hand.

## expectations and academic integrity

• First and foremost, you are expected to act as adults in this class, behaving responsibly and fostering a safe and welcoming environment for everyone.
• You will participate in all required activities. More than two absences (excused or unexcused) will jeopardize your standing in the course.
• You will be an active participant and collaborator in group sessions.
• You will submit all assigned work by their due dates. Some late work may be accepted for reduced credit.
• You will seek out help promptly if you are struggling or falling behind.
• Work submitted will be your own, with appropriate references to sources and resources used. Academic dishonesty will not be tolerated, and will be passed along to the appropriate administrative or judicial entity.

A note on attribution, code, and the culture of programming...

The "culture" surrounding programming is one that encourages sharing and collaboration. Open-source software, online communities such as StackOverflow, GitHub/Gist, and the fast-paced nature of the technology world have all led to a vast collection of places where programmers can quickly and easily get help in solving common and not-so-common problems. This is a fantastic and vital part of being a 'programmer', and I encourage you to use and contribute to these communities.

This being said, there are a few important guidelines that MUST be followed in order to strike a balance between collaboration and academic integrity:

• You must provide attribution for ALL ideas you have consumed from sources outside of your own scope of knowledge. This may be done in a variety of ways, but must be noted explicitly - either via code comments, a note at the time of submission, or via some other mechanism that clearly indicates:
• What part of your work, specifically, has been influenced by an outside source, and how.
• What the outside source was - whether another student, a web site, other code, etc.
• Outside contributions to your work must not comprise a substantial portion of the solution to the problem or module you are working on. Your work must be your own and your Google or interpersonal skills, no matter how sophisticated, do not equate to mastery of course material!
• If you provide assistance to others (in individual projects), or other groups (in group work), you must share this information with the instructor. Helping your fellow students learn is an essential and valuable part of the learning experience. However, providing "too much" help by providing answers or clues that substantially undermine the challenge and learning objectives of an assignment is not helpful and, in fact, a violation of academic integrity. Therefore:
• If you assist another student in class, indicate who was helped, when, and what the nature of the help was.
• It is also expected (per the 'attribution' paragraph above), that the student who was assisted will also indicate that they were assisted as part of the work they turn in.
• Those helping or being helped should feel secure in the knowledge that the exchange of assistance will not negatively or positively impact their grade on the assignment or work in question.
• Some work may explicitly be given to you to do on your own, or with limited online resources, for example a take-home test. In those cases you must follow the assignment's guidelines.

Here's an example of quoting your sources : a lot of the preceding language in this syllabus is from Andrew Cencini's Fall 2019 Intro CS course. ("Hi Andrew!")

## schedule

This is the schedule I have in mind as of Oct 19. It may change depending on how things go.

In any case, go by what's on the assignments page for what's due when.

 date       calendar        deadlines         book     topic
----       --------        ---------         ----     ----

Tue Oct 20 first_class
Wed     21                                   chap 1   shell, C, tools
Thu     22
Fri     23                 HW 0

Mon     26                                   chap 2   bits, bytes, ints
Tue     27                 HW 1
Wed     28
Thu     29 plan day
Fri     30                 data lab due      chap 3   machine code

Mon Nov  2
Tue      3                 HW 2
Wed      4 plan day
Thu      5
Fri      6                 bomb lab due

Mon      9
Tue     10 plan day        HW 3
Wed     11                                   chap 6    cache memory
Thu     12
Fri     13                 attack lab due

Mon     16                                   chap 8    processes
Tue     17                 HW 4 (memory)
Wed     18
Thu     19
Fri     20                 HW 5 (processes)

Mon     23
Tue     24                 shell lab due
Wed     25 thanksgiving
Thu     26 thanksgiving
Fri     27 thanksgiving

Mon     31                                   chap 9    virtual memory
Tue Dec  1                 HW 6
Wed      2
Thu      3
Fri      4                 malloc lab due

Mon      7                                   chap 11   networking
Tue      8                 HW 7
Wed      9
Thu     10
Fri     11 last_class      proxy lab due



The labs are challenging. I would like you to

• start all of them and submit a short discussion, and
• choose at least three to pursue in more depth and discuss in writing in more detail.

Your course evaluation will be based on

• The number of weekly homework assignments completed
• Three lab write-ups, chosen from the five we'll look at.

For each of those four pieces I'll assign a letter grade (A=excellent, B=good, C=fair, etc) and then average those grades.

For the homework part, a reasonable effort to engage in the material for a homework assignment is worth 1.0 point. If there are for example 10 assignments, then there are a total of 10 possible points for homework complete. Turning in a partial assignment or a late work is worth less than 1.0, perhaps 0.5 depending on how late or how much is done. I often use placeholder words such as "yes" (i.e. 1.0) or "partly" (i.e. < 1.0), and then use my judgement to assign numeric values and an overall grade at the end of the term.

For the labs, your work will be judged on how how well it shows your understanding of the material. Explain what you did in a way that would make sense to someone else in the course, including a bibliography of your sources and enough context to make it clear what you're talking about.

If circumstances outside of your control - illness, technology issues, your dog ate your homework - get in the way, please do let me know, and we will try to work things out.

## questions

Questions about anything at all? Ask jim.