University of Washington
Computer Systems
CSE 410 Spring 2012
9 Memory Allocation and Buffer Overflow
06 April 2012
Buffer Overflow
1
University of Washington
Buffer Overflow
27 April 2012
Basics of memory allocation
Buffers on stacks
Overwriting buffers
University of Washington
Computer Systems
CSE 410 Spring 2012
1st Lecture, March 26
Instructor:
Hal Perkins
Teaching Assistants:
Cortney Corbin, Anton Devore, Soumya Vasisht
1
University of Washington
Todays Agenda
Administrivia
Course overview
Staff
Gene
CSE 410 Final Exam 12/10/13
Name _
Do not write your id number or any other confidential information on this page.
There are 10 problems worth a total of 120 points. The point value of each problem is
indicated in the table on the next page. Write your an
CSE 410 Final Exam 6/08/10
Name _
Do not write your id number or any other confidential information on this page.
There are 10 questions worth a total of 100 points. Please budget your time so you get to
all of the questions. Keep your answers brief and t
CSE 410 Final Exam
6/5/07
Name _ Do not write your id number or any other confidential information on this page.
There are 11 questions worth a total of 100 points. Please budget your time so you get to all of the questions. You will want to use a copy of
CSE 410 Midterm Sample Solution 11/8/13
1. Bits (16 points) The following two questions are similar to the questions in Lab 1 and
the same ground rules apply:
Assume all values are 32-bit 2s complement integers.
You may only use the operators !, ~, &, ^,
CSE 410 Midterm Sample Solution, Spring 2012
1. Bits (24 points) The following two questions are similar to the questions in Lab 1 and
the same ground rules apply:
Assume all values are 32-bit integers.
You may only use the operators !, ~, &, ^, |, +, <,
CSE410 Autumn 2013 Midterm Exam (Nov. 8, 2013)
Please read through the entire examination first! We designed this exam so that it can be
completed in 50 minutes and we hope this estimate will prove to be reasonable.
There are 5 problems worth a total of 1
CSE 410 Final Exam 6/05/12
Name _
Do not write your id number or any other confidential information on this page.
There are 13 problems worth a total of 100 points. The point value of each problem is
indicated in the table on the next page. Write your ans
CSE 410 Final Exam 6/09/09
Name _ Do not write your id number or any other confidential information on this page.
There are 12 questions worth a total of 100 points. Please budget your time so you get to all of the questions. Keep your answers brief and t
CSE410 Spring 2012 Midterm Exam (4 May 2012)
Please read through the entire examination first! We designed this exam so that it can be
completed in 50 minutes and, hopefully, this estimate will prove to be reasonable.
There are 4 problems worth a total of
Homework 1: Architecture overview,
instruction sets
CSE 410, Autumn 1999
Due in class, October 4th
Reading
H+P Chapter 1, sections 1, 2, and 3. Skim the rest of chapter 1.
H+P Chapter 3, sections 1, 2, 3, and 5.
To do on your own:
H+P Exercises 1.1-1.26.
Homework 3: Instruction sets, addressing,
procedure call
CSE 410, Autumn 1999
Due in class, October 18th
Reading
H+P Chapter 6, sections 1 and 2; don't bother to study the diagrams in detail.
H+P Chapter 8, sections 1, 3, skim sections 4 and 5.
To do on y
Homework 4: Pipelining, I/O, the memory
hierarchy, and caches
CSE 410, Autumn 1999
Due in class, October 25th
Reading
H+P Chapter 7, sections 1, 2, 3, and 5.
To do on your own
Review for the midterm. A review guide will be available on Friday.
To be turne
Homework 6: Synchronization and
communication
CSE 410, Autumn 1999
Due in class, November 15th
Reading
Threads: S+G Chapter 4 section 5
Synchronization: S+G Chapter 6 sections 1-5, 7. If you like, ignore the following
subsections: 6.2.1, 6.2.2, 6.5.1.
To
CSE 410 Final Exam Sample Solution 12/10/13
Question 1. (15 points) (some mystery code, or the ghosts of midterms past)
Once again one of the interns has lost the source code to an important function. We have
been able to discover that the function starts
CSE 410 Final Exam 6/09/09 Question 1. (10 points) (Caches) Suppose we have a memory and a direct-mapped cache with the following characteristics. Memory is byte addressable Memory addresses are 16 bits (i.e., the total memory size is 216 = 65536 bytes) T
CSE 410 Final Exam 6/05/12 Sample Solution
Question 1. (10 points) (bits) An array of boolean (0/1) values can be stored very
compactly if we store 8 bits of the array in each byte. For instance here is an array of 24
bits stored in 3 bytes.
0
23
0
22
0
2
University of Washington
Computer Systems
CSE 410 Spring 2012
2 Memory and its Data
Memory
1
University of Washington
Todays (and Fridays) topics
Memory and its bits, bytes, and integers
Representing information as bits
Bit-level manipulations
Boolean al
University of Washington
Computer Systems
CSE 410 Spring 2012
3 - Integers
02 April 2012
Integers
1
University of Washington
Todays Topics
Representation of integers: unsigned and signed
Casting
Arithmetic and shifting
Sign extension
Reading: Bryant/OHall
University of Washington
Computer Systems
CSE 410 Spring 2012
5 - Instruction Set Architecture
06 April 2012
Instruction Set Architecture
1
University of Washington
Machine Programming I: Basics
What is an ISA (Instruction Set Architecture)
A brief istory
University of Washington
Computer Systems
CSE 410 Spring 2012
6 x86 Machine-Level Programming
06 April 2012
Instruction Set Architecture
1
University of Washington
Machine Programming II: C to assembly
09 April 2012
Move instructions, registers, and opera
University of Washington
Computer Systems
CSE 410 Spring 2012
7 Procedures, parameters, and the call stack
06 April 2012
Instruction Set Architecture
1
University of Washington
Procedures and the Call Stack
18 April 2012
Stack
Procedures
Parameter passing
University of Washington
Computer Systems
CSE 410 Spring 2012
8 Data Structures: Arrays, Structs, and (a little about) Unions
06 April 2012
Data Structures
1
University of Washington
Data Structures in Memory!
Arrays
One-dimensional
Multi-dimensional (n
University of Washington
Computer Systems
CSE 410 Spring 2012
10 Memory Organization and Caches
06 April 2012
Memory Organization
1
University of Washington
Making memory accesses fast!
Memory hierarchy, caches, locality
Cache organization
Program optimiz
University of Washington
Computer Systems
CSE 410 Spring 2012
11 Processes and Exceptions
11 May 2012
Exceptional Control and Processes
1
University of Washington
Processes and control flow
Are branches/calls the only way we can get the processor to
go
s
University of Washington
Computer Systems
CSE 410 Spring 2012
12 Virtual Memory
16 May 2012
Virtual Memory
1
University of Washington
Virtual Memory (VM)
16 May 2012
Overview and motivation
VM as tool for caching
VM as tool for memory management
VM as too
University of Washington
Computer Systems
CSE 410 Spring 2012
20 OS Introduction & Structure
Slides adapted from CSE 451 material by Gribble, Lazowska, Levy, and Zahorjan
21 May 2012
OS Introduction & Structure
1
University of Washington
What is an Operat
University of Washington
Computer Systems
CSE 410 Spring 2012
21 Processes & Threads
25 May 2012
Processes & Threads
1
University of Washington
Processes Programmers View
Definition: A process is an instance of a running program
One of the most important
University of Washington
Computer Systems
CSE 410 Spring 2012
22 Disks and File Systems
Slides adapted from CSE 451 material by Gribble, Lazowska, Levy, and Zahorjan
31 May 2012
Disks and File Systems
1
University of Washington
Topics
Secondary Storage Di