Carnegie Mellon Midterm Review 15-213: Introduction to Computer Systems October 15, 2012 Instructor:

Slides:



Advertisements
Similar presentations
Calling sequence ESP.
Advertisements

Exam #1 Review By sseshadr. Agenda Reminders – Test tomorrow! One 8.5 x 11 sheet, two sides – Pick up your datalabs in OH – Cachelab comes out tomorrow.
Machine/Assembler Language Putting It All Together Noah Mendelsohn Tufts University Web:
David Brumley Carnegie Mellon University Credit: Some slides from Ed Schwartz.
10/9: Lecture Topics Starting a Program Exercise 3.2 from H+P Review of Assembly Language RISC vs. CISC.
Computer Architecture and Operating Systems CS 3230 :Assembly Section Lecture 2 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
C Programming and Assembly Language Janakiraman V – NITK Surathkal 2 nd August 2014.
Assembly Language for Intel-Based Computers Chapter 8: Advanced Procedures Kip R. Irvine.
RECITATION - 09/20/2010 BY SSESHADR Buflab. Agenda Reminders  Bomblab should be finished up  Exam 1 is on Tuesday 09/28/2010 Stack Discipline Buflab.
PC hardware and x86 3/3/08 Frans Kaashoek MIT
1 ICS 51 Introductory Computer Organization Fall 2006 updated: Oct. 2, 2006.
Accessing parameters from the stack and calling functions.
Assembly תרגול 8 פונקציות והתקפת buffer.. Procedures (Functions) A procedure call involves passing both data and control from one part of the code to.
September 22, 2014 Pengju (Jimmy) Jin Section E
CEG 320/520: Computer Organization and Assembly Language ProgrammingIntel Assembly 1 Intel IA-32 vs Motorola
6.828: PC hardware and x86 Frans Kaashoek
Computer Architecture and Operating Systems CS 3230 :Assembly Section Lecture 7 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Y86 Processor State Program Registers
Carnegie Mellon Introduction to Computer Systems /18-243, spring 2009 Recitation, Jan. 14 th.
1 IA-32
1 Carnegie Mellon Stacks : Introduction to Computer Systems Recitation 5: September 24, 2012 Joon-Sup Han Section F.
Assembly Language for Intel-Based Computers, 6 th Edition Chapter 8: Advanced Procedures (c) Pearson Education, All rights reserved. You may.
1 Carnegie Mellon Recitation : Introduction to Computer Systems Recitation 15: December 3, 2012 Daniel Sedra Section C.
Recitation 6 – 2/26/01 Outline Linking Exam Review –Topics Covered –Your Questions Shaheen Gandhi Office Hours: Wednesday.
Recitation 2: Outline Assembly programming Using gdb L2 practice stuff Minglong Shao Office hours: Thursdays 5-6PM Wean Hall.
Carnegie Mellon 1 Midterm Review : Introduction to Computer Systems October 14, 2013.
5. Assembly Language. Basics of AL Program data Pseudo-ops Array Program structures Data, stack, code segments.
1 ICS 51 Introductory Computer Organization Fall 2009.
Microprocessors The ia32 User Instruction Set Jan 31st, 2002.
ECE 353 Introduction to Microprocessor Systems Michael G. Morrow, P.E. Week 6.
Carnegie Mellon 1 Midterm Review : Introduction to Computer Systems Recitation 8: Monday, Oct. 19, 2015 Ben Spinelli.
1 Carnegie Mellon Assembly and Bomb Lab : Introduction to Computer Systems Recitation 4, Sept. 17, 2012.
Introduction to Assembly II Abed Asi Extended System Programming Laboratory (ESPL) CS BGU Fall 2013/2014.
1 Carnegie Mellon Welcome to recitation! : Introduction to Computer Systems 3 rd Recitation, Sept. 10, 2012 Instructor: Adrian Trejo (atrejo) Section.
Compiler Construction Code Generation Activation Records
October 1, 2003Serguei A. Mokhov, 1 SOEN228, Winter 2003 Revision 1.2 Date: October 25, 2003.
Carnegie Mellon 1 Midterm Review : Introduction to Computer Systems Recitation 8: Monday, Oct. 14, 2013 Marjorie Carlson Section A.
Carnegie Mellon 1 Midterm Review : Introduction to Computer Systems Recitation 8: Monday, Oct. 13, 2014 Lou Clark.
Introduction to Intel IA-32 and IA-64 Instruction Set Architectures.
1 Assembly Language: Function Calls Jennifer Rexford.
Recitation 3 Outline Recursive procedure Complex data structures –Arrays –Structs –Unions Function pointer Reminders Lab 2: Wed. 11:59PM Lab 3: start early.
Calling Procedures C calling conventions. Outline Procedures Procedure call mechanism Passing parameters Local variable storage C-Style procedures Recursion.
Overview of Back-end for CComp Zhaopeng Li Software Security Lab. June 8, 2009.
Carnegie Mellon 1 Stacks and Buflab : Introduction to Computer Systems Recitation 4: Monday, Sept. 23, 2013 Marjorie Carlson Section A.
Introduction to Computer Systems Topics: Assembly Stack discipline Structs/alignment Caching CS 213 S ’12 rec8.pdf “The Class That Gives CMU Its.
Section 5: Procedures & Stacks
Recitation 3: Procedures and the Stack
Assembly function call convention
Reading Condition Codes (Cont.)
Instructor: Your TA(s)
143A: Principles of Operating Systems Lecture 4: Calling conventions
Exploiting & Defense Day 2 Recap
Aaron Miller David Cohen Spring 2011
Introduction to Compilers Tim Teitelbaum
Machine-Level Programming 4 Procedures
LING 408/508: Programming for Linguists
Machine-Level Programming 2 Control Flow
Introduction to Intel IA-32 and IA-64 Instruction Set Architectures
Fundamentals of Computer Organisation & Architecture
Machine-Level Programming 2 Control Flow
Machine-Level Programming III: Procedures Sept 18, 2001
MIPS Procedure Calls CSE 378 – Section 3.
Machine-Level Programming 2 Control Flow
EECE.3170 Microprocessor Systems Design I
EECE.3170 Microprocessor Systems Design I
Computer Instructions
X86 Assembly Review.
Computer Architecture and System Programming Laboratory
Presentation transcript:

Carnegie Mellon Midterm Review : Introduction to Computer Systems October 15, 2012 Instructor:

Agenda Midterm tomorrow! – Cheat sheet: One 8.5 x 11, front and back Review – Everything up to caching Questions Carnegie Mellon

Brief Overview of Topics Labs! – We try to reward people who did them well. Data Representation – Primitive types – Floating Point – Arrays – Structs Carnegie Mellon

Brief Overview of Topics Assembly – Registers – Memory addressing – Control flow – Stack discipline – Translation to C Caching – Locality – The cache itself – Miss / hit analysis – Blocking Carnegie Mellon

Primitive Types Recall datalab – bit operators Sizes of primitive types Casting – Sign extension, truncation Signed vs. Unsigned – If unsigned and signed are mixed in a single expression, signed values are implicitly cast to unsigned Two’s Complement Carnegie Mellon

Floating Point Carnegie Mellon

Floating Point - Example

Structs Padding and alignment Data type size vs. Alignment – On 32-bit x86 Linux, a double is eight bytes wide by has four-byte alignment x86 vs. x86-64 – Pointer width – Some other primitives Alignment rules (Windows vs. Linux) What accessing looks like in assembly Carnegie Mellon

Struct - Example

Assembly Registers – Stack pointer: %esp – Frame pointer: %ebp – Program counter: %eip – Return value: %eax – General purpose Caller vs. Callee saved Equivalent registers in x86-64 Differences between x86 and x86-64 Carnegie Mellon

Assembly Instructions – Addressing: lea, mov – Arithmetic: add, sub, imul, idiv – Stack manipulation: push, pop, leave – Conditionals: cmp, test – Local jumps: jmp, je, jg, jle, etc. – Procedure calls: call, ret What do they do? How do certain calls change the stack? Carnegie Mellon

Assembly - Example

Caching Dimensions: S, E, B – S: Number of sets – E: Associativity – number of lines per set – B: Block size – number of bytes per block (1 block per line) Why do caches exist? When do they help? Why have main memory at all, if cache is so fast? Why use LRU for eviction? Recall arrays are accessed in row-major order… Carnegie Mellon

Caching - Example

Carnegie Mellon Questions/Advice Relax! Work past exams. us