CS 0449 - Introduction to Systems Software

Fall 2020

 

Contact Information

Instructor

 

 

Office Hours

Sherif Khattab, 6307 SENSQ

(412) 624-8438

skhattab@cs.pitt.edu

TH: 1:00 pm-5:00 pm and by appointment

Zoom link: https://pitt.zoom.us/my/khattab

Please reserve at: https://khattab.youcanbook.me/

TA

 

 

 

Office Hours

 

Wenyu Li (18394)

wel104@pitt.edu

Jared Frank (18628)

jaf216@pitt.edu

Somdipa Majumdar (Grader)

som37@pitt.edu

MW: 14:30-16:30

https://pitt.zoom.us/j/6456728744

 

MTW: 10:00–12:00

TH: 14:45–16:00

https://pitt.zoom.us/j/6106096497

 

Please make appointments at: https://jared-frank.youcanbook.me/

 

MW: 15:00-18:00

Tu: 23:00-00:00

Th: 15:00-17:00

F: 14:00-17:00

https://pitt.zoom.us/j/9564392928

 

Please make appointments at: https://somdipa-majumdar.youcanbook.me/

 

 

 

Lectures

 

TH 11:05-12:20 @ Zoom

(Please find the Zoom link on Canvas)

Recitations

18628: Friday 8:55-9:45 @ UCLUB 211 and Zoom

18394: Friday 13:15-14:05 @ LAWRN 120 and Zoom

(Please find the Zoom link in Canvas)

Student Feedback

Please send us your anonymous feedback

Top Hat Join Code

389666

 

Course Description and Goals

 

A Computer System is comprised of both hardware and software working in concert to accomplish useful work. In this course, we will explore the issues of programming a real computer system by examining the abstractions, interfaces, and design decisions that influence the way that software runs. This includes the role the Operating System has in communication and resource management.

 

The perspective we will take is one of the lifecycle of a program from implementation to execution. The simple act of compiling and running a program, a sequence of events we often take for granted, is a complex interaction of many different components that work together to manage the computer’s resources and perform the desired task. Together, these components form a working computer system.

 

This course begins with the creation of executable programs in the C programming language. We will then explore the resultant program as it is stored on disk and as it is loaded for execution. Next, we will examine the interactions between our code and the code provided via libraries or the operating system to facilitate common, low-level tasks. Finally, we will look at the abstractions and resource management undertaken by the OS and its drivers to facilitate communication and hardware interaction.

 

The goals of the course are:

 

1.     Learning C programming. C is the most common language used for systems software.

2.     Exploring the layout of an executable programs code and data both as stored on disk and loaded into memory.

3.     Interacting with the abstractions that libraries and the operating system provide.

4.     Implementing our own abstractions and managing hardware resources through device drivers.

 

Prerequisites

 


Before enrolling in this course, you need to have completed CS/COE 0445 Data Structures and have completed or be currently enrolled in CS/COE 0447 Computer Organization and Assembly Language Programming. If you have any questions about the prerequisite material for the course, please ask at the beginning of the term.

 

Textbooks

 


We will be using one primary textbook extensively. You should acquire a copy if possible:

 

CS:APP3e: Randal E. Bryant and David R. O'Hallaron, Computer Systems: A Programmer's Perspective, Third Edition, Pearson, 2016

 

Electronic version is available for $34.99. See: https://www.vitalsource.com/products/computer-systems-a-programmer-39-s-perspective-randal-e-bryant-david-r-v9780134092997.

 

A good reference on the C programming language is recommended. There are many online resources of various quality. One classic book is:

 

1.     K&R 2e: Brian W. Kernighan and Dennis M. Ritchie, The C Programming Language, Second Edition, Prentice Hall, 1988 . ISBN: 0-13110-362-8.

2.     Oualline: Steve. Practical C Programming. OReilly, Sebastopol, CA, 1997. ISBN: 1-56592-306-5

 

There are additional textbooks that are available online in PDF form and are highly relevant to the course topics.

Misurda: Jonathan Misurda, CS 0449: Introduction to Systems Software (online).

ALP: Mark Mitchell, Jeffrey Oldham, and Alex Samuel, Advanced Linux Programming (online).

LDD3: Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman, Linux Device Drivers, Third Edition (online).

 

Grading Policy

 

Labs (50%): There are eight programming lab assignments that are the fundamental piece of this course and will be conducted during recitations. Lab assignments will be posted on Canvas and turned in electronically on Gradescope and will be graded mostly automatically. It is worth noting that much of what you learn in this course will be through completing these assignments. Late submissions are allowed for up to two days with a 10% reduction per late day.

Midterm and Final exams (20%): There will be one midterm exam and a final exam. There will be questions to test your understanding of the topics covered in lecture material and lab assignments. No collaboration of any form is allowed on exams. Students must not discuss any aspect of any exam question with someone who has not yet taken the exam. Make-up exams can be scheduled well in advance. The exams are remote and non-cumulative.

 

Homework assignments (20%)

 

Lecture Participation (10%): Mini-quizzes on Top Hat during each lecture. The join code for Top Hat is 389666.

 

Regrade requests should be submitted within a week of when the grade item was graded.

 

Important Dates

(Tentative)

 

Midterm Exam

Th 10/8 at regular class time (remote)

Final Exam

W 12/2 10:00-11:50 (remote)

 

 

 

 

 

 

Weekly Schedule

(Tentative)

Lab #

Out on

Due on @11:59pm

Weight Percentage

0 Hello Lab

T 8/25

T 9/1

1%

1 Data Lab

T 9/1

T 9/8

4%

2 Pointer Lab

T 9/8

T 9/15

3%

3 Queue Lab

T 9/15

Th 9/24

6%

4 Bomb Lab

Th 9/24

T 10/6

6%

5 Attack Lab

Th 10/8

T 10/20

6%

6 Cache Lab

T 10/20

T 11/3

7%

7 Malloc Lab

T 11/3

Th 11/19

9%

8 Parallel Lab

Th 11/19

Su 12/6

8%

 

 

Week

Topic

Reading

Announcements

Wk 1 (8/24-8/28)

Intro to the Course

C Programming: Data Types and Representation, Pointers

CS:APP3e Ch. 2.1-2.4

K&R 2e Ch. 1-5, C for Java Programmers, Harvey's Intro to C

Wk 2 (8/31-9/4)

C Arrays, Strings, and (more) Pointers

K&R 2e Ch. 5-6

Fall Term add/drop period ends on 9/4

Wk 3 (9/7-9/11)

C Memory Management

Intro to x86 assembly

K&R 2e Ch. 7.8.5, 8.7

CS:APP3e Ch. 3.1-3.5, Ch. 3.8-3.9

Wk 4 (9/14-9/18)

x86 Control Flow

Buffer overflow

CS:APP3e Ch. 3.6-3.7

CS:APP3e Ch. 3.10

Wk 5 (9/21-9/25)

Linking & Executables

Memory Hierarchy

CS:APP3e Ch. 7

CS:APP3e Ch. 6.1-6.3

 

Wk 6 (9/28-10/2)

Cache Memories

Virtual Memory

CS:APP3e Ch. 6.4-6.7

CS:APP3e Ch. 9.1-9.5

Wk 7 (10/5-10/9)

Address Translation

Midterm exam

CS:APP3e Ch. 9.6

Midterm exam on Thursday 10/8

Wk 8 (10/12-10/16)

Memory Allocation I

Memory Allocation II

CS:APP3e Ch. 9.9

CS:APP3e Ch. 9.10-9.13

 

Wk 9 (10/19-10/23)

Exceptions & Processes I

Exceptions & Processes II

CS:APP3e Ch. 8.1-8.3

CS:APP3e Ch. 8.4

Wk 10 (10/26-10/30)

Concurrent Programming I

Concurrent Programming II

CS:APP3e Ch. 12.1-12.3

CS:APP3e Ch. 12.4-12.5

Wk 11 (11/2-11/6)

Synchronization

Thread-level Parallelism

CS:APP3e Ch. 12.5.4-5, 12.7-8

CS:APP3e Ch. 12.6

Wk 12 (11/9-11/13)

System Level I/O

Network Programming

CS:APP3e Ch. 10

CS:APP3e Ch. 11.1-11.4

Wk 13 (11/16-11/20)

Review for Final

Finals Week

(11/30-12/3)

Final exam will be remote.

W 12/2 10:00-11:50

 

Communication Policy

 

 

There are many ways to communicate with the teaching team. Please reach out to us as early as possible and as frequently as possible. You can reach us on:

·       Piazza

·       Canvas Messages

·       Email

Please expect a response within 72 hours.

 

COVID-19 Statement

 

I would like to emphasize that my number one concern is your safety and health, both physical and mental.  My goal is for each and every one of you to succeed in the course. I am here to support you and I will remain understanding and flexible given the challenges that we are all facing together. The lectures and recitations will be recorded, and the recorded sessions include your participation. The recorded sessions will be made available through Canvas and only to this term's class. Although I expect you to attend the live lectures and recitations, attendance is not taken. The Tophat questions that are offered during the live lectures will also be assigned as homework. 

 

Minimum Technology Requirements

Basic computer hardware that includes camera and microphone for the Zoom meetings. Basic software (e.g., Microsoft Suite, Canvas, Panopto, Top Hat, Zoom, Gradescope, Piazza, PuTTY, WinSCP or FileZilla, a text editor (e.g., Atom, Sublime, VS Code, Notepad++, Brackets, etc.).

 

Students with Disabilities

 

If you have a disability for which you are or may be requesting an accommodation, you are encouraged to contact both your instructor and Disability Resources and Services (DRS), 140 William Pitt Union, (412) 648-7890, drsrecep@pitt.edu, (412) 228-5347 for P3 ASL users, as early as possible in the term. DRS will verify your disability and determine reasonable accommodations for this course.

Academic Integrity

 

All assignment submissions must be the sole work of each individual student. Students may not read or copy another student's solutions or share their own solutions with other students. Students may not review solutions from students who have taken the course in previous years. Submissions that are substantively similar will be considered cheating by all students involved, and as such, students must be mindful not to post their code publicly. The use of books and online resources is allowed, but must be credited in submissions, and material may not be copied verbatim. Any use of electronics or other resources during an examination will be considered cheating. If you have any doubts about whether a particular action may be construed as cheating, ask the instructor for clarification before you do it. The instructor will make the final determination of what is considered cheating. Cheating in this course will result in a grade of F for the course and may be subject to further disciplinary action. Should a student be accused of a breach of academic integrity or have questions regarding faculty responsibilities, procedural safeguards including provisions of due process have been designed to protect student rights. These may be found in Guidelines on Academic Integrity: Academic Integrity Policy of the School of Computing and Information.

Pay attention to the following examples of cheating, which include:

§      Sharing code: either by copying, retyping, looking at, or supplying a copy of a file from this or a previous semester.

§      Describing code: Verbal description of code from one person to another.

§      Coaching: Helping your friend to write a lab, line by line.

§      Copying: Copying code from the Web or another student. You are only allowed to use code that we provide you.

§      Searching: Searching the Web for solutions or for any advice on the lab.

Cheating is also looking at other students’ code or allowing others to look at yours. This includes one person looking at code and describing it to another. Be sure to store your work in protected directories (e.g., under the private folder on your AFS space on the department servers), and log off when you leave a remote server, to prevent others from copying your work without your explicit assistance.

You may find it useful to know what is not cheating:

§      Clarifying ambiguities or vague points in class handouts, lectures, or textbooks.

§      Helping others use the computer systems, networks, compilers, debuggers, profilers, or other system facilities.

§      Helping others with high-level design issues only, but algorithm/coding and other such details are not ``high-level design issues''.

§      Helping others with high-level (not code-based) debugging.

§      Using code from the skeleton/package provided in class is always OK.

For a first offense, a student caught collaborating or cheating in any way will receive a zero for the exam, homework, lab, or project in question. In the event of a second offense, the student will receive an F for the course and may be subject to stronger action. They will be reported to the school following University procedures. Submissions that are alike in a substantive way (not due to coincidence) will be considered to be cheating by ALL involved parties. Please protect yourselves by only storing your files in private directories, and by retrieving all printouts promptly.

Religious Observances

 

In order to accommodate the observance of religious holidays, students should inform the instructor (by email, within the first two weeks of the term) of any such days which conflict with scheduled class activities.

Diversity and Inclusion Statement

I consider this classroom to be a place where you will be treated with respect, and I welcome individuals of all ages, backgrounds, beliefs, ethnicities, genders, gender identities, gender expressions, national origins, religious affiliations, sexual orientations, ability – and other visible and nonvisible differences. All members of this class are expected to contribute to a respectful, welcoming and inclusive environment for every other member of the class. (American Society for Engineering Education)

 

Copyright Statement

These materials may be protected by copyright. United States copyright law, 17 USC section 101, et seq., in addition to University policy and procedures, prohibit unauthorized duplication or retransmission of course materials. See Library of Congress Copyright Office and the University Copyright Policy.

 


Classroom Recording

 

To ensure the free and open discussion of ideas, students may not record classroom lectures, discussion and/or activities without the advance written permission of the instructor, and any such recording properly approved in advance can be used solely for the student’s own private use.

 

Acknowledgements

 

The material of this course are based on Dr. Petrucci's CS 0449 course.