Docsity

Slides on Performance Analysis and Optimization | CS 4833, Study notes of Computer Science

Toggle sidebar
bg1
1
Fall 2008 CS 4833:Embedded Systems 1
Performance Analysis and
Optimization
CS 4833: Embedded Systems 2
Fall 2008
Outline
aPerformance and measures
aPerformance analysis
¾High level complexity analysis: Big-O
¾Low level instruction time: assembly language
¾Metrics for analysis
aEvaluation of performance
¾Analysis, simulation, and measurement
aPerformance optimization and related issues
¾Problems, common mistakes and hardware accelerators
¾Power consumption and cache effects
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Slides on Performance Analysis and Optimization | CS 4833 and more Study notes Computer Science in PDF only on Docsity!

Fall 2008 CS 4833:Embedded Systems 1

Performance Analysis and

Optimization

Outline

aPerformance and measures

aPerformance analysis

¾ High level complexity analysis: Big-O ¾ Low level instruction time: assembly language ¾ Metrics for analysis

aEvaluation of performance

¾ Analysis, simulation, and measurement

aPerformance optimization and related issues

¾ Problems, common mistakes and hardware accelerators ¾ Power consumption and cache effects

Fall 2008 CS 4833: Embedded Systems 3

Overview for Performance

aPerformance of an embedded systems: aspects

¾ Response time ¾ Time loading ¾ Memory loading

aQuantify performance

¾ Complexity, time, power, size/weight and cost ¾ Others: development time, maintenance effort and extensibility

aWhat to measure?

¾ Best, Worst or Average cases

The Embedded System

aThe scope of performance analysis and optimization

¾ System hardware and software

aHardware

¾ Computational and control elements ¾ Communication subsystem ¾ Memory

aSoftware (firmware)

¾ Algorithms and data structures ¾ Control and scheduling

Fall 2008 CS 4833: Embedded Systems 7

Asymptotic Complexity: Big-O

aNotation: f(N)=O(g(N)): big-O of g(N)

¾ N: size of the problem ¾ Highest order of increase e.g., 37N 5 + 7N^2 + 455000 Æ O(N^5 )

aLarge/big numbers

Analyzing Codes

aBasic flow of control constructs

aConstant time statement

¾ Basic calculation and assignment, etc

aLoop constructs

¾ Number of iterations ¾ Steps in each iteration

aConditional statements

¾ Maximum of all possibilities

aFunction calls

¾ Call, argument passing, function execution, value return

Fall 2008 CS 4833: Embedded Systems 9

Example: Algorithm Analysis

aLinear search

aIdentify number

of operations and

how many times

they are executed

Analyzing Data Structures

aImportant data structures:

¾ Array ¾ Linked list

aComplexity for basic operations

¾ Insert/delete at beginning/end/middle ¾ Access at the beginning/end/middle

Fall 2008 CS 4833: Embedded Systems 13

Performance Metrics

aTime

¾ Hardware vs. software ¾ Exact vs. bounded

aMetrics:

¾ Response time: execution time vs. throughput ¾ Time load: percentage of CPU time for useful/app. Work ¾ Memory load: share of memory for application

Response Time

aSituations: different control of flows

aPolled loops

aCo-routine

aInterrupt-driven

¾ Preemption vs. non-preemptive

Fall 2008 CS 4833: Embedded Systems 15

Performance Evaluation

aAnalytical modeling

¾ early design stage

aSimulation:

¾ early/middle stage

aMeasurement:

¾ later stage after prototype is done

Performance Optimization

aQuestions

¾ What is being optimized? ¾ Why is it being optimized? ¾ What will be the effect on overall systems? ¾ Is the optimization appropriate for the operating context?

Fall 2008 CS 4833: Embedded Systems 19

Power Consumption Optimization

aACPI: advanced configuration and power interface

aSoftware and hardware

Example: Power Management

Fall 2008 CS 4833: Embedded Systems 21

Cache and Performance

aIn general, cache improve performance Æ faster

aCache behaviors are non-deterministic

¾ Comes from conditional branch and shared access ¾ Not feasible for real-time systems

aAdvanced solutions

¾ Cache partitioning

Summary

aPerformance and measures

aPerformance analysis

¾ High level complexity analysis: Big-O ¾ Low level instruction time: assembly language ¾ Metrics for analysis

aEvaluation of performance

¾ Analysis, simulation, and measurement

aPerformance optimization and related issues

¾ Problems, common mistakes and hardware accelerators ¾ Power consumption and cache effects