01 Overview
01 Overview
Course Overview
15-213/18-213/15-513: Introduction to Computer Systems
1st Lecture, May 25, 2021
Instructors:
Brian Railing
Overview
Big Picture
▪ Course theme
▪ Five realities
▪ How the course fits into the CS/ECE curriculum
Academic integrity
Logistics and Policies
Course Theme:
(Systems) Knowledge is Power!
Systems Knowledge
▪ How hardware (processors, memories, disk drives, network infrastructure)
plus software (operating systems, compilers, libraries, network protocols)
combine to support the execution of application programs
▪ How you as a programmer can best use these resources
Useful outcomes from taking 213/513
▪ Become more effective programmers
Able to find and eliminate bugs efficiently
▪
▪ Able to understand and tune for program performance
▪ Prepare for later “systems” classes in CS & ECE
▪ Compilers, Operating Systems, Networks, Computer Architecture,
Embedded Systems, Storage Systems, etc.
▪ Int’s:
▪ 40000 * 40000 --> 1600000000
▪ 50000 * 50000 --> ?
Example 2: Is (x + y) + z = x + (y + z)?
▪ Unsigned & Signed Int’s: Yes!
▪ Float’s:
▪ (1e20 + -1e20) + 3.14 --> 3.14
▪ 1e20 + (-1e20 + 3.14) --> ??
Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition
Source: xkcd.com/571 8
Carnegie Mellon
Computer Arithmetic
Does not generate random values
▪ Arithmetic operations have important mathematical properties
Cannot assume all “usual” mathematical properties
▪ Due to finiteness of representations
▪ Integer operations satisfy “ring” properties
Commutativity, associativity, distributivity
▪
▪ Floating point operations satisfy “ordering” properties
▪ Monotonicity, values of signs
Observation
▪ Need to understand which abstractions apply in which contexts
▪ Important issues for compiler writers and serious application programmers
double fun(int i) {
volatile struct_t s;
s.d = 3.14;
s.a[i] = 1073741824; /* Possibly out of bounds */
return s.d;
}
Explanation:
Critical State 6
? 5
? 4
d7 ... d4 3 Location accessed by
fun(i)
d3 ... d0 2
struct_t
a[1] 1
a[0] 0
4.3ms 81.8ms
2.0 GHz Intel Core i7 Haswell
Hierarchical memory organization
Performance depends on access patterns
▪ Including how step through multi-dimensional array
16000
14000
Read throughput (MB/s)
12000
10000
8000
6000
4000
2000
copyji
0
s1 32k
s3 128k
s5 512k
2m
s7
Stride (x8 bytes) 8m
s9 Size (bytes)
32m
s11
128m
Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition 17
Carnegie Mellon
Course Perspective
Most Systems Courses are Builder-Centric
▪ Computer Architecture
Design pipelined processor in Verilog
▪
▪ Operating Systems
▪ Implement sample portions of operating system
▪ Compilers
▪ Write compiler for simple language
▪ Networking
▪ Implement and simulate network protocols
ECE Systems
CS Systems • 18-330 Computer Security
• 15-319 Cloud Computing • 18-349 Intro to Embedded Systems
• 15-330 Computer Security • 18-441 Computer Networks
• 15-410 Operating Systems • 18-447 Computer Architecture
• 15-411 Compiler Design • 18-452 Wireless Networking
• 15-415 Database Applications • 18-451 Cyberphysical Systems
• 15-418 Parallel Computing
• 15-440 Distributed Systems CS Graphics
• 15-441 Computer Networks • 15-462 Computer Graphics
• 15-445 Database Systems • 15-463 Comp. Photography
Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition 21
Carnegie Mellon
Academic Integrity
Please pay close attention, especially
if this is your first semester at CMU
Cheating/Plagiarism: Description
Unauthorized use of information
▪ Borrowing code: by copying, retyping, looking at a file
▪ Describing: verbal description of code from one person to another.
▪ Searching the Web for solutions
▪ Copying code from a previous course or online solution
▪ Reusing your code from a previous semester (here or elsewhere)
Cheating/Plagiarism: Description
What is NOT cheating?
▪ Explaining how to use systems or tools
▪ Helping others with high-level design issues
▪ Using code supplied by us
▪ Using code from the CS:APP web site
Cheating: Consequences
Penalty for cheating:
▪ Best case: -100% for assignment
▪ You would be better off to turn in nothing
▪ Worst case: Removal from course with failing grade
▪ This is the default
▪ Permanent mark on your record
▪ Loss of respect by you, the instructors and your colleagues
▪ If you do cheat – come clean asap!
Don’t do it!
▪ Manage your time carefully
▪ Ask the staff for help when you get stuck
Cheating Notes
Prof. Railing has written over 100 letters for cheating cases
▪ Don’t add to this total
▪ Some have been for years earlier
Another Scenario
Alice is working on malloc lab and is just plain stuck. Her code is seg faulting and
she doesn't know why. It is only 2 days until malloc lab is due and she has 3
other assignments due this same week. She is in the cluster.
Bob is sitting next to her. He is pretty much done.
Sitting next to Bob is Charlie. He is also stuck.
1. Bob offers to help Alice and they go over her code together.
▪ Who cheated: Bob? Alice?
2. Bob gets up to go to the bathroom and Charlie looks over at his
screen to see how Bob implemented his free list.
▪ Who cheated: Charlie? Bob?
Logistics
Instructor
Brian Railing
Lecture Style
You are going to be active learners
▪ Come prepared to class based on the readings / videos
▪ Practice and gain assessment feedback in class
▪ Immediately address misconceptions with expert intervention
▪ You will work in teams (Zoom breakout rooms of ~20)
▪ 70% attendance (~21/30), you are “pre-excused” to miss 9.
Textbooks
Randal E. Bryant and David R. O’Hallaron,
▪ Computer Systems: A Programmer’s Perspective, Third Edition (CS:APP3e),
Pearson, 2016
▪ http://csapp.cs.cmu.edu
▪ This book really matters for the course!
▪ How to solve labs
▪ Practice problems typical of exam problems
▪ Digital materials at: https://cmu.redshelf.com/
Course Components
Lectures
▪ Higher level concepts
Recitations
▪ Material is part of lectures during summer
Written Assignments (~10)
▪ 1 – 2 Paragraphs long
▪ Drop the 2 lowest
Labs (7)
▪ The heart of the course
▪ 1-2+ weeks each
▪ Provide in-depth understanding of an aspect of systems
▪ Programming and measurement
Exam (final)
▪ Test your understanding of concepts & mathematical principles
Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition 40
CarnegieMellon
Carnegie Mellon
Getting Help
Class Web page: http://www.cs.cmu.edu/~213
▪ Complete schedule of lectures, exams, and assignments
▪ Copies of lectures, assignments, exams, solutions
▪ FAQ
Piazza
▪ Best place for questions about assignments
▪ By default, your posts will be private
▪ We will fill the FAQ and Piazza with answers to common questions
Canvas
▪ Daily formative quizzes
▪ Can provide access to Piazza and occasional material
Getting Help
Office hours (starting later this week):
▪ TAs: TBD
▪ Faculty: Brian Railing (Zoom): TBD
1:1 Appointments
▪ You can schedule 1:1 appointments with the instructor
Facilities
Labs will use the Intel Computer Systems Cluster
▪ The “shark machines”
▪ linux> ssh shark.ics.cs.cmu.edu
Timeliness
Grace days
▪ 5 grace days for the semester
▪ Limit of 0, 1, or 2 grace days per lab used automatically
▪ Covers scheduling crunch, out-of-town trips, illnesses, minor setbacks
Lateness penalties
▪ Once grace day(s) used up, get penalized 15% per day
▪ No handins later than 3 days after due date
Catastrophic events
▪ Major illness, death in family, …
Advice
Really, Really Hard!
▪ Formulate a plan (with your academic advisor) to get back on track
Policies: Grading
Exams (30%): final (30%)
Assignments
▪ L1 (datalab): Manipulating bits
▪ L2 (bomblab): Defusing a binary bomb
▪ L3 (attacklab): The basics of code injection attacks
Assignments
▪ L4 (cachelab): Building a cache simulator and optimizing for locality.
▪ Learn how to exploit locality in your programs.
Virtual Memory
Topics
▪ Virtual memory, address translation, dynamic storage allocation
▪ Includes aspects of architecture and OS
Assignments
▪ L5 (malloclab): Writing your own malloc package
▪ Get a real feel for systems-level programming
Assignments
▪ L6 (tshlab): Writing your own Unix shell.
▪ A first introduction to concurrency
Assignments
▪ L7 (proxylab): Writing your own Web proxy
▪ Learn network programming and more about concurrency and
synchronization.
Lab Rationale
Each lab has a well-defined goal such as solving a puzzle or
winning a contest
Autolab (https://autolab.andrew.cmu.edu)
Labs are provided by the CMU Autolab system
▪ Project page: http://autolab.andrew.cmu.edu
▪ Developed by CMU faculty and students
▪ Key ideas: Autograding and Scoreboards
Autograding: Providing you with instant feedback.
▪
▪ Scoreboards: Real-time, rank-ordered, and anonymous summary.
▪ Used by over 3,000 students each semester
With Autolab you can use your Web browser to:
▪ Download the lab materials
▪ Handin your code for autograding by the Autolab server
▪ View the class scoreboard
▪ View the complete history of your code handins, autograded results,
instructor’s evaluations, and gradebook.
▪ View the TA annotations of your code for Style points.
Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition 56
Carnegie Mellon
Autolab accounts
Students enrolled 12pm on Wed, May 25 have Autolab accounts
You must be enrolled to get an account
▪ Autolab is not tied in to the Hub’s rosters
▪ We will update the autolab accounts approximately once a day, so check back
in 24 hours.
Linux/Git bootcamp
How to tar and untar files
How to set permissions on local and afs directories
How to recover old files from git
How to ssh to the lab machines
How to use a make file
And all the other things you were always afraid to ask …
Waitlist questions
15-213: Amy Weis alweis@andrew.cmu.edu
18-213: ECE Academic services (ece-asc@andrew.cmu.edu)
15-513: Amy Weis alweis@andrew.cmu.edu
Welcome
and Enjoy!