Course Overview Computer Systems Organization (Fall 2016)

Slides:



Advertisements
Similar presentations
Carnegie Mellon Course Overview Computer Systems Organization (Fall 2014) Section 001 (Honors) and Section 002 (Regular) Professor Andrew Case Teaching.
Advertisements

Computer Systems & Programming (CS 367) Section 002: Prof. Elizabeth White Spring 2010.
Introduction to Computer Systems Topics: Theme Five great realities of computer systems How this fits within CS curriculum S ‘08 class01a.ppt
Introduction to Computer Systems Topics: Staff, text, and policies Lecture topics and assignments Lab rationale and infrastructure F ’08 class01b.ppt.
Introduction to Computer Systems Topics: Theme Five great realities of computer systems How this fits within CS curriculum CS 213 F ’03 class01a.ppt
Introduction to Computer Systems* Topics: Theme Five great realities of computer systems How this fits within CS curriculum F ’07 class01a.ppt
CSCE 312 Computer Organization Lecture 0: Course Administration EJ Kim Department of Computer Science and Engineering 338B Bright
Slide 1 Instructor: Dr. Hong Jiang Teaching Assistant: Mr. Sheng Zhang Department of Computer Science & Engineering University of Nebraska-Lincoln Classroom:
CS 213 Introduction to Computer Systems Course Organization David O’Hallaron August 28, 2001 Topics: Staff, text, and policies Lecture topics and assignments.
COMP 321: Introduction to Computer Systems Scott Rixner Alan L. Cox
Computer Network Fundamentals CNT4007C
CS 3305 Course Overview. Introduction r Instructor: Dr Hanan Lutfiyya r Office: MC 355 r hanan at csd dot uwo ca r Office Hours: m Drop-by m Appointment.
Winter 2015 COMP 2130 Introduction to Computer Systems Computing Science Thompson Rivers University Introduction and Overview.
David O’Hallaron Carnegie Mellon University Processor Architecture Overview Overview Based on original lecture notes by Randy.
Carnegie Mellon Course Overview Computer Systems Organization (Fall 2015) Instructor: Jinyang Li.
Introduction and Overview Summer 2014 COMP 2130 Introduction to Computer Systems Computing Science Thompson Rivers University.
1 Carnegie Mellon The course that gives CMU its “Zip”! Course Overview (18-213): Introduction to Computer Systems 1 st Lecture, Aug. 26, 2014 Instructors:
Course Information Sarah Diesburg Operating Systems COP 4610.
Course Information Andy Wang Operating Systems COP 4610 / CGS 5765.
Introduction to Computer Systems Topics: Theme Five great realities of computer systems (continued) “The class that bytes”
Introduction to Computer Systems Topics: Staff, text, and policies Lecture topics and assignments Lab rationale CS 213 F ’02 class01b.ppt “The Class.
Introduction to Computer Systems Topics: Theme Five great realities of computer systems How this fits within CS curriculum F ’06 class01a.ppt
Computer Organization II Topics: Theme Five great realities of computer systems How this fits within CS curriculum CS 2733.
Assembly Language and Computer Organization Topics: Theme Programming in C Great realities of computer systems How this fits within CS curriculum Logistical.
Copyright ©: Nahrstedt, Angrave, Abdelzaher1 University of Illinois at Urbana-Champaign Welcome to CS 241 Systems Programming University of Illinois at.
1 Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition Carnegie Mellon Overview Course theme Five realities How the course.
CS 213 Introduction to Computer Systems Course Organization David O’Hallaron August 25, 1998 Topics: Staff, text, and policies Lecture topics and assignments.
Computer Networks CNT5106C
Introduction and Overview Winter 2013 COMP 2130 Introduction to Computer Systems Computing Science Thompson Rivers University.
1 Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition Carnegie Mellon Course Overview Introduction to Computer Systems 1.
CMPT 201 Computer Science II for Engineers
Computer Network Fundamentals CNT4007C
Course Overview - Database Systems
CS 450/550 Operating Systems Loc & Time: MW 1:40pm-4:20pm, 101 ENG
Welcome to The Hardware/Software Interface
CS101 Computer Programming I
Course Overview CSE 238/2038/2138: Systems Programming
The course that gives CMU its “Zip”!
CSCE 451/851 Operating System Principles
Final exam: Wednesday, March 20, 2:30pm
Computer Networks CNT5106C
CS 213 Introduction to Computer Systems Course Organization Todd C
Computer Systems & Programming (CS 367)
Course Overview CSCI 2400/ ECE 3217: Computer Architecture
Course Overview CENG331 - Computer Organization
Computer Systems: A Programmer’s Perspective aka: CS:APP
Course Information Mark Stanovich Principles of Operating Systems
Topics: Staff, text, and policies Lecture topics and assignments
Assembly Language and Computer Organization
Programming COMP104: Fundamentals and Methodology Introduction.
Computer Networks CNT5106C
Computer Systems Summary
Course Overview - Database Systems
Andy Wang Operating Systems COP 4610 / CGS 5765
Introduction to Computer Systems
Introduction to Computer Systems
CDA 3100 Summer 2013.
Andy Wang Operating Systems COP 4610 / CGS 5765
Distributed systems [Fall 2016] G Jinyang Li
Andy Wang Operating Systems COP 4610 / CGS 5765
Andy Wang Operating Systems COP 4610 / CGS 5765
Introduction to Computer Systems
Systems Programming University of Ilam
Overview Course theme Five realities
Introduction to Computer Systems
Andy Wang Operating Systems COP 4610 / CGS 5765
Andy Wang Operating Systems COP 4610 / CGS 5765
Sarah Diesburg Operating Systems CS 3430
Term Dr Abdelhafid Bouhraoua
CS201 – Course Expectations
Presentation transcript:

Course Overview Computer Systems Organization (Fall 2016) Carnegie Mellon Course Overview Computer Systems Organization (Fall 2016) Instructor: Jinyang Li

Staff Lecturer: Recitation instructor: TAs: Carnegie Mellon Staff Lecturer: Jinyang Li jinyang@cs.nyu.edu Recitation instructor: Hassan Mujtaba Zaidi hmz224@nyu.edu TAs: Subhankar Ghosh subhankar.ghosh@nyu.edu Will Zhou will.zhou@nyu.edu

Computer Systems Organization Not that kind of organization

This class adds to your CV… C programming UNIX X86 assembly Not what the class is about either

What this class is about Those details that set hackers apart from novice programmers How your program runs on the hardware Why it fails Why it is slow Modern computer systems are shrouded in layers of abstraction

What is an abstraction (in computer systems)? A technique for managing the complexities in engineered systems. Establish an “abstract” interface for interacting with a system/module Hide details behind the interface

Abstractions: the car example user-level mechanic-level designer/builder-level

Abstractions: computer systems applications programming language system tools Operating systems Hardware

Many layers of abstraction

Course Theme: Abstraction Is Good But Don’t Forget Reality Most CS classes stay within a single layer of abstraction This class: Help you peek ``under-the-hood’’ in many layers Goal: Make you more effective programmers Debug problems Tune performance Prepare you for later “systems” classes in CS Compilers, Operating Systems, Networks, Computer Architecture, Distributed Systems

Reality #1: Ints are not Integers, Floats are not Reals x2 ≥ 0? (x + y) + z = x + (y + z)? Public class Test { public static void main(String[] args) { int x = Integer.parseInt(args[0]); Systems.out.println(x * x); } First one not true for int x*x overflow Second one not true for float 1e20+(-1e20+3.14)!=3.14 java Test 12 ➙ 144 java Test 123456 ➙ ???

Reality #1: Ints are not Integers, Floats are not Reals First one not true for int x*x overflow Second one not true for float 1e20+(-1e20+3.14)!=3.14 Source: xkcd.com/571

Reality #2: You’ve Got to Know Assembly Carnegie Mellon Reality #2: You’ve Got to Know Assembly No need to program in assembly Knowledge of assembly helps one understand machine-level execution Debugging Performance tuning Writing system software (e.g. compilers , OS) Creating / fighting malware x86 assembly is the language of choice!

Reality #3: Memory Matters Carnegie Mellon Reality #3: Memory Matters Memory is not unbounded It must be allocated and managed Memory referencing bugs are esp. wicked Memories of diff applications are isolated

Memory Referencing Errors Carnegie Mellon Memory Referencing Errors C/C++ let programmers make memory errors Out of bounds array references Invalid pointer values Double free, use after free Errors can lead to nasty bugs Corrupt program objects Effect of bug observed long after the corruption

Memory Referencing Bug Example Carnegie Mellon double fun(int i) { double d[1] = {3.14}; /* allocate an array of 1 double*/ int a[2]; /* allocate an array of 2 integers */ a[i] = 1073741824; /* Possibly out of bounds */ return d[0]; } fun(0) ➙ 3.14 fun(1) ➙ 3.14 fun(2) ➙ 3.1399998664856 fun(3) ➙ 2.00000061035156 fun(4) ➙ 3.14 fun(6) ➙ Segmentation fault Critical State 6 ? 5 4 d7 ... d4 3 d3 ... d0 2 a[1] 1 a[0]

Reality #4: Asymptotic performance is not always sufficient Carnegie Mellon Reality #4: Asymptotic performance is not always sufficient Constant factors matter In order to optimize performance: How programs compiled and executed How to measure performance and identify bottlenecks How to speedup using multiple CPU cores

Example Matrix Multiplication Carnegie Mellon Example Matrix Multiplication Matrix-Matrix Multiplication (MMM) on 2 x Core 2 Duo 3 GHz (double precision) Gflop/s 160x Best code (K. Goto) Triple loop Both implementations have exactly the same operations count (2n3) Reason for 20x: Multi-threading, blocking, loop unrolling, array scalarization

Course Perspective Most Systems Courses are Builder-Centric Carnegie Mellon Course Perspective Most Systems Courses are Builder-Centric Computer Architecture Design pipelined processor in Verilog Operating Systems Implement large portions of operating system Compilers Write compiler for simple language Networking Implement and simulate network protocols

Course Perspective (Cont.) Carnegie Mellon Course Perspective (Cont.) This course is programmer-centric Understanding of underlying system makes a more effective programmer Bring out the hidden hacker in everyone

Textbooks Randal E. Bryant and David R. O’Hallaron, Carnegie Mellon Textbooks Randal E. Bryant and David R. O’Hallaron, “Computer Systems: A Programmer’s Perspective, 3nd Edition”, http://csapp.cs.cmu.edu

Textbooks Brian Kernighan and Dennis Ritchie, “The C Programming Language, 2nd Edition”, Prentice Hall, 1988, On reserve at NYU library

Course Components Lectures (M/W 3:30-4:45pm) Recitation (W 8-9:15am) Carnegie Mellon Course Components Lectures (M/W 3:30-4:45pm) Recitation (W 8-9:15am) In-class exercises provide hands-on instruction 5 Programming labs 2-3 weeks each Mid-term Final exam

Grade breakdown Participation (5%) Labs (35%) Midterm (25%) Q&A during lecture/recitation helpfulness on class discussion board Labs (35%) Midterm (25%) Final (35%)

Course Syllabus Basic C Assembly: Representation of program and data Carnegie Mellon Course Syllabus Basic C L1 (CLab), L2 (Rabin-Karp Lab) Assembly: Representation of program and data L3 (Binarylab) Virtual Memory: address translation, allocation L4 (Malloclab) Concurrent programming L5 (Threadlab)

Carnegie Mellon Getting Help Class Web Page: http://www.news.cs.nyu.edu/~jinyang/fa16-cso Class schedule (subject to change...) Lectures notes, assignments Piazza is our message board

Lab Policies You must work alone on all assignments Hand-ins Carnegie Mellon Lab Policies You must work alone on all assignments You may post questions on Piazza, You are encouraged to answer others’ questions, but refrain from explicitly giving away solutions. Hand-ins Assignments due at 11:59pm on the due date Everybody has 5 grace days Zero score if a lab is handed in >2 days late

Integrity and Collaboration Policy Carnegie Mellon Integrity and Collaboration Policy We will enforce the policy strictly. The work that you turn in must be yours You must acknowledge your influences You must not look at, or use, solutions from prior years or the Web, or seek assistance from the Internet You must take reasonable steps to protect your work You must not publish your solutions If there are inexplicable discrepancies between exam and lab performance, we will over-weight the exam and interview you.

Integrity and Collaboration Policy Carnegie Mellon Integrity and Collaboration Policy Academic integrity is very important. Fairness If you don’t do the work, you won’t learn anything

Integrity and Collaboration Policy Carnegie Mellon Integrity and Collaboration Policy We will enforce this policy strictly and report violators to the department and Dean. If you cannot complete an assignment, don’t turn it in: one or two uncompleted assignments won’t result in F.