CS61C Review Midterm Spring 2008. Five Elements of a Computer Control Datapath Memory Input Output.

Slides:



Advertisements
Similar presentations
1 Lecture 3: MIPS Instruction Set Today’s topic:  More MIPS instructions  Procedure call/return Reminder: Assignment 1 is on the class web-page (due.
Advertisements

The University of Adelaide, School of Computer Science
Introduction to Memory Management. 2 General Structure of Run-Time Memory.
INSTRUCTION SET ARCHITECTURES
David Notkin Autumn 2009 CSE303 Lecture 13 This space for rent.
Unions The storage referenced by a union variable can hold data of different types subject to the restriction that at any one time, the storage holds data.
Lecture 6: MIPS Instruction Set Today’s topic –Control instructions –Procedure call/return 1.
Computer Architecture CSCE 350
Run-time organization  Data representation  Storage organization: –stack –heap –garbage collection Programming Languages 3 © 2012 David A Watt,
Memory allocation CSE 2451 Matt Boggus. sizeof The sizeof unary operator will return the number of bytes reserved for a variable or data type. Determine:
Chapter 8 Runtime Support. How program structures are implemented in a computer memory? The evolution of programming language design has led to the creation.
CS 61C L07 MIPS Intro (1) A Carle, Summer 2006 © UCB inst.eecs.berkeley.edu/~cs61c/su06 CS61C : Machine Structures Lecture #6: Intro to MIPS
CS 61C L07 More Memory Management (1) Garcia, Fall 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C.
CS61C L05 C Structures, Memory Management (1) Garcia, Spring 2005 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS61C Final Review Fall Overview 1 st Half (Jeremy) –Number Rep (Int/Float) –C (Pointers & Malloc) –MIPS Assembly –Combinational Logic –Audience.
CS 61C L06 Memory Management (1) A Carle, Summer 2006 © UCB inst.eecs.berkeley.edu/~cs61c/su06 CS61C : Machine Structures Lecture #6: Memory Management.
CS61C L4 C Memory Management (1) Beamer, Summer 2007 © UCB Scott Beamer, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #4.
1 Handling nested procedures Method 1 : static (access) links –Reference to the frame of the lexically enclosing procedure –Static chains of such links.
Review of CMPE12C Fall CMPE12cCyrus Bazeghi 2 Practice Final Exam Simply print out all the homework solutions and the Midterm solutions and do problems.
Intro to Computer Architecture
Run time vs. Compile time
The environment of the computation Declarations introduce names that denote entities. At execution-time, entities are bound to values or to locations:
CS61C Midterm Review on C & Memory Management Fall 2006 Aaron Staley Some material taken from slides by: Michael Le Navtej Sadhal.
Reference Counters Associate a counter with each heap item Whenever a heap item is created, such as by a new or malloc instruction, initialize the counter.
CS61C L07 More Memory Management (1) Garcia, Spring 2008 © UCB Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C.
Software Development and Software Loading in Embedded Systems.
University of Calgary – CPSC 441. C PROGRAM  Collection of functions  One function “main()” is called by the operating system as the starting function.
CS3012: Formal Languages and Compilers The Runtime Environment After the analysis phases are complete, the compiler must generate executable code. The.
CS61C L05 C Memory Management (1) Pearce, Summer 2010 © UCB inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 5 – C Memory Management
CS 61C L2.1.2 MM and MIPS (1) K. Meinz, Summer 2004 © UCB CS61C : Machine Structures Lecture Garbage Collection & Intro to MIPS Kurt Meinz.
Dynamic Memory Allocation Questions answered in this lecture: When is a stack appropriate? When is a heap? What are best-fit, first-fit, worst-fit, and.
MIPS coding. SPIM Some links can be found such as:
Review C Language Features –control flow –C operators –program structure –data types –I/O and files Problem Solving Abilities.
Stack and Heap Memory Stack resident variables include:
Lecture 4: MIPS Instruction Set
Chapter 17 Free-Space Management Chien-Chung Shen CIS, UD
CS61C Midterm 1 Review Summer 2004 Pooya Pakzad Ben Huang Navtej Sadhal.
Instructor: Justin Hsia 7/16/2013Summer Lecture #131 CS 61C: Great Ideas in Computer Architecture (Brief) Review Lecture.
1 CSC103: Introduction to Computer and Programming Lecture No 24.
C LANGUAGE Characteristics of C · Small size
Computer Organization CS345 David Monismith Based upon notes by Dr. Bill Siever and notes from the Patterson and Hennessy Text.
Spring, 2011 –– Computational Thinking – Dennis Kafura – CS 2984 Data Structures Mapping complex structures to linear memory.
ENEE150 – 0102 ANDREW GOFFIN More With Pointers. Importance of Pointers Dynamic Memory (relevant with malloc) Passing By Reference Pointer Arithmetic.
Compilation Lecture 13: Course summary: Advanced Topics Noam Rinetzky 1.
ENEE150 – 0102 ANDREW GOFFIN Dynamic Memory. Dynamic vs Static Allocation Dynamic  On the heap  Amount of memory chosen at runtime  Can change allocated.
CS61C L07 More Memory Management (1) Garcia, Spring 2010 © UCB Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C.
Carnegie Mellon Midterm Review : Introduction to Computer Systems October 15, 2012 Instructor:
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Linked Lists Outline Introduction Self-Referential Structures.
CS61C L05 C Memory Management (1) Chae, Summer 2008 © UCB Albert Chae Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 5 – C.
LECTURE 3 Translation. PROCESS MEMORY There are four general areas of memory in a process. The text area contains the instructions for the application.
Memory Management CSCI 2720 Spring What is memory management? “the prudent utilization of this scarce resource (memory), whether by conservation,
1 Programming Languages (CS 550) List Processing, Dynamic Memory Allocation and Garbage Collection Jeremy R. Johnson.
1 Binghamton University Exam 1 Review CS Binghamton University Birds eye view -- Topics Information Representation Bit-level manipulations Integer.
Lecture 3 Translation.
Storage Allocation Mechanisms
5.13 Recursion Recursive functions Functions that call themselves
Inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 7 – More Memory Management Lecturer PSOE Dan Garcia
Dynamic Memory Allocation
Lecture 4: MIPS Instruction Set
CSC 253 Lecture 8.
CSC 253 Lecture 8.
Lecture 4: MIPS Instruction Set
Strategies for automatic memory management
List Allocation and Garbage Collection
List Allocation and Garbage Collection
Data Path Diagrams.
C H A P T E R F I V E Memory Management.
Garbage collection Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 7 – More Memory Management Lecturer PSOE Dan Garcia
Run-time environments
Presentation transcript:

CS61C Review Midterm Spring 2008

Five Elements of a Computer Control Datapath Memory Input Output

Negative Numbers Sign/Magnitude One's Complement Two's Complement Pros, Cons of Each

C Topics Pointers! malloc, free Handles Pass by Value vs Pass by Reference Arrays Structs typedef

Memory Management Static The Stack The Heap

Memory Management Allocation Schemes Best-fit First-fit Next-fit Slab Buddy

MIPS R, I, J format instructions (on your green sheet!) MAL vs TAL MIPS to Binary, Binary to MIPS Difference between branches, jumps

Various Other Things Floats CALL (Compile, Assemble, Link, Load)

Garbage Collection Reference Counting Mark and Sweep Copying Pros and Cons