4 July 2005 overview Traineeship: Mapping of data structures in multiprocessor systems Nick de Koning 0513849 1.

Slides:



Advertisements
Similar presentations
Introduction to C Programming
Advertisements

Semantics Static semantics Dynamic semantics attribute grammars
Context-Sensitive Interprocedural Points-to Analysis in the Presence of Function Pointers Presentation by Patrick Kaleem Justin.
1 Mooly Sagiv and Greta Yorsh School of Computer Science Tel-Aviv University Modern Compiler Design.
Chapter 7: User-Defined Functions II
Using Programmer-Written Compiler Extensions to Catch Security Holes Authors: Ken Ashcraft and Dawson Engler Presented by : Hong Chen CS590F 2/7/2007.
Eliminating Stack Overflow by Abstract Interpretation John Regehr Alastair Reid Kirk Webb University of Utah.
CS 330 Programming Languages 10 / 16 / 2008 Instructor: Michael Eckmann.
Run time vs. Compile time
Chapter 3 Program translation1 Chapt. 3 Language Translation Syntax and Semantics Translation phases Formal translation models.
Basic Definitions Data Structures: Data Structures: A data structure is a systematic way of organizing and accessing data. Or, It’s the logical relationship.
1 Run time vs. Compile time The compiler must generate code to handle issues that arise at run time Representation of various data types Procedure linkage.
Guide To UNIX Using Linux Third Edition
Names and Bindings Introduction Names Variables The concept of binding Chapter 5-a.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
Principle of Functional Verification Chapter 1~3 Presenter : Fu-Ching Yang.
DATA STRUCTURE Subject Code -14B11CI211.
Data Structures Lecture-1:Introduction
CSC 8310 Programming Languages Meeting 2 September 2/3, 2014.
C o n f i d e n t i a l Developed By Nitendra NextHome Subject Name: Data Structure Using C Title: Overview of Data Structure.
TIBCO Designer TIBCO BusinessWorks is a scalable, extensible, and easy to use integration platform that allows you to develop, deploy, and run integration.
Review for Midterm Chapter 1-9 CSc 212 Data Structures.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training course describes how to configure the the C/C++ compiler options.
CSC141 Introduction to Computer Programming
DATA STRUCTURE & ALGORITHMS CHAPTER 3: STACKS. 2 Objectives In this chapter, you will: Learn about stacks Examine various stack operations Discover stack.
Unit III : Introduction To Data Structures and Analysis Of Algorithm 10/8/ Objective : 1.To understand primitive storage structures and types 2.To.
1 Names, Scopes and Bindings Aaron Bloomfield CS 415 Fall
Chapter 5: Programming Languages and Constructs by Ravi Sethi Activation Records Dolores Zage.
CIS 842: Specification and Verification of Reactive Systems Lecture Specifications: Sequencing Properties Copyright , Matt Dwyer, John Hatcliff,
Input, Output, and Processing
Computer Science Department Data Structure & Algorithms Lecture 8 Recursion.
Basic Semantics Associating meaning with language entities.
Efficient RDF Storage and Retrieval in Jena2 Written by: Kevin Wilkinson, Craig Sayers, Harumi Kuno, Dave Reynolds Presented by: Umer Fareed 파리드.
COMP3190: Principle of Programming Languages
Chapter 1 Introduction. Chapter 1 - Introduction 2 The Goal of Chapter 1 Introduce different forms of language translators Give a high level overview.
CS 460/660 Compiler Construction. Class 01 2 Why Study Compilers? Compilers are important – –Responsible for many aspects of system performance Compilers.
C++ Programming: From Problem Analysis to Program Design, Fourth Edition Chapter 19: Stacks and Queues (part 2)
C++ Programming: Program Design Including Data Structures, Fourth Edition Chapter 18: Stacks and Queues (part 2)
CSCI Rational Purify 1 Rational Purify Overview Michel Izygon - Jim Helm.
CHP-3 STACKS.
Computer Organization Instructions Language of The Computer (MIPS) 2.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
Overview of Previous Lesson(s) Over View VP is the methodology in which development allows the user to grab and use the desired tools like menus, buttons,
An Offline Approach for Whole-Program Paths Analysis using Suffix Arrays G. Pokam, F. Bodin.
LECTURE 19 Subroutines and Parameter Passing. ABSTRACTION Recall: Abstraction is the process by which we can hide larger or more complex code fragments.
Run-Time Environments Presented By: Seema Gupta 09MCA102.
Shellcode COSC 480 Presentation Alison Buben.
Advanced Computer Systems
Run-Time Environments Chapter 7
Efficient Evaluation of XQuery over Streaming Data
ASIC Design Methodology
Planning & System installation
Type Checking Generalizes the concept of operands and operators to include subprograms and assignments Type checking is the activity of ensuring that the.
Midterm Review.
Introduction to Design Patterns
CO4301 – Advanced Games Development Week 2 Introduction to Parsing
Intro to PHP & Variables
Array Lists Chapter 6 Section 6.1 to 6.3
Operation System Program 4
Computer Organization & Compilation Process
Lecture 15 (Notes by P. N. Hilfinger and R. Bodik)
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
Binding Times Binding is an association between two things Examples:
Review CSE116 2/21/2019 B.Ramamurthy.
UNIT V Run Time Environments.
Computer Organization & Compilation Process
Understanding and Preventing Buffer Overflow Attacks in Unix
Chapter 3 Discussion Pages
Topic 2b ISA Support for High-Level Languages
Presentation transcript:

4 July 2005 overview Traineeship: Mapping of data structures in multiprocessor systems Nick de Koning

Content 1.Introduction 2.Problem definition 3.Approach 4.Implementation 5.To do list 6.Future work 2

Content 1.Introduction 2.Problem definition 3.Approach 4.Implementation 5.To do list 6.Future work 3

Introduction Why this project? –Mapping of data structures in multiprocessor systems Chips are getting memory dominated Upcoming of multiprocessor systems 4

Introduction Estimations: > 90% chip area is memory in 2010! Chips are increasingly becoming memory dominated: –Logic scales faster with chip technology then memory –Increasing memory requirements of multimedia applications 5 TriMedia 32A 200 Mhz 0.18u 16.9 mm2

Introduction Power consumption is (becoming) the bottleneck in chip design Power consumption is crucial in embedded systems!!! 6

Introduction Solution: multiprocessor system-on-chip! 100 MHz50 MHz P 1 = f C V 1 P 2 = 2 f/2 C V 2 [simplified] If V 2 < V 1 then P 2 < P 1 7

Introduction 2005 Intel developer forum, San Francisco 8

Introduction 9

Introduction Memory spaces seen by an application: –Stack: stores local data structures –Heap: holds dynamically allocated memory –Global data space: stores global (and static) data structures System-on-chips of the future incorporate many IP cores and memories: need for memory re-use! A designer sees all these memories... How and which data structures of the application will (s)he put in what memory ? 10

Introduction In order to map the data structures onto the available memories, a designer needs to know: 1.What are the data structures that are used in the application? 2.What are the memory requirements of the application? 11

Content 1.Introduction 2.Problem definition 3.Approach 4.Implementation 5.To do list 6.Future work 12

Problem definition Memory requirements application: –Stack size requirements –Memory required for global data structures –Heap not considered: Dynamic memory allocation is hardly used in embedded systems Applications in C-programming language –THE programming language for embedded systems –Stack size requirements only accurate without compiler optimisations 13

Problem definition Multiprocessor template: Local memory Remote memory 14

Problem definition Calculating stack size requirements, example: Scope tree 15

Problem definition But, what happens if the C-code changes to this? 16

Problem definition Scope tree 17

Problem definition Problem: not every function call in the application code is executed in practice due to control flow and data flow, how to deal with them ?! 18

Content 1.Introduction 2.Problem definition 3.Approach 4.Implementation 5.To do list 6.Future work 19

Approach An automated memory requirements calculator only ‘sees’ the function call graph! F C G: nodes are functions; arrows represents the call of another function 20

Approach Intermezzo: Let’s introduce some notations! 21

Approach Define the following sets: In this context: a string represents a sequence of function calls. For example: Alphabet F = {main, foo1, foo2, foo3}   F   = (main, foo1, foo3) 22

Approach 23

Approach Writing out a recursive cycle as a string can be quite a job… Let’s introduce a shorthand notation based on logical expressions: 24

Approach A recursive cycle written as a logical expression can contain nested recursive cycles Length, prefix and concatenation also operate on strings written as logical expression Example:  = foo_1, foo_2, foo_1, foo_2, foo_1, foo_2  = (foo_1, foo_2) 3 Example: 25

Approach Q: Why are these strings required? A1: –The automated memory size calculator does not take control flow and data flow into account! –It only ‘knows’ the function call graph For instance, recall 26

Approach Or, more abstract: Bound by FCG Tighter bound due control + data flow 27

Approach Q: Why are these strings required? A2: –The user must limit the observed space to only contain the feasible region! –The user specifies the sequences of function calls that are feasible as strings to the memory requirements calculator! 28

Approach Specifying strings for an application: –Use logical expression to capture recursive cycles efficiently –Use prefix strings to re-use common parts in strings For example, the following sequences can appear in an application: ( s1 = main, foo_3, foo_1, foo_2, foo_1, foo_2, foo_2, foo_2 s2 = main, foo_3, foo_1, foo_2, foo_1, foo_3, foo_3,foo_3. s3 = main, foo_3, foo_3. Prefix strings are: prefix1 = main, foo_3prefix2 = prefix1, foo_1, foo_2, foo_1 The user specifies: s1 = prefix2, (foo_2) 3 s2 = prefix2, (foo_1) 3 s3 = prefix1, foo_3 29

Approach Optimisations are possible! 30

Content 1.Introduction 2.Problem definition 3.Approach 4.Implementation 5.To do list 6.Future work 31

Implementation Implemented tool statesize: –Linux, C++ –Based on SUIF Compiler system –Evaluates: C-programs –Calculates memory requirements of applications –Detects used global variables in the functions + global memory requirements User input: –All allowed sequences of functions as strings –Strings written as logical expressions in XML input file XML provides high level of re-use –Supports use of: prefix, logical expressions 32

Implementation Stack size calculation algorithm (pseudo code): 33

Implementation Path + function Valid / invalid Is implemented 34

Implementation Example: Path = main, foo_3, foo_1 Function = foo_3 s1 = main, foo_3, foo_1, (foo_2) 10 s2 = main, foo_3, foo_2 35

Implementation Path + function Recursion = foo_2 Repeat = 10 Path = main, foo_3, foo_1 Function = foo_2 s1 = main, foo_3, foo_1, (foo_2) 10 s2 = main, foo_3, foo_2 Not implemented yet 36

Implementation Example XML input file and FCG: 37

Implementation Example program output: 38

Implementation 39

Implementation 40

Implementation 41

Implementation Statesize: –Calculates stack size requirements With / without function calls –Calculates global memory requirements Detects which global data structures are used Directly / indirectly –Parses user specified ‘strings’ (XML input file) 42

Content 1.Introduction 2.Problem definition 3.Approach 4.Implementation 5.To do list 6.Future work 43

To do list Statesize enhancements: –Implement optimisations –Command line option: write out all detected (nested) recursion cycles to XML file –? FCV: add suffix checking [e.g. * foo3, foo1] ? Report: –Problem definition: add section –Implementation: spec. FCV, spec. user input –Write ‘Case study’ and ‘Future Work’ Case study –Test on real multimedia application 44

Future work Add function overloading support: –Pre processing pass –Embed in statesize [uglier] Full support regular expressions in XML input file –In functions: foo_* –In strings:prefix, *, suffix 45