Title: Embedded System Design Framework for Minimizing Code Size and Guaranteeing RealTime Requirements
1Embedded System Design Framework for Minimizing
Code Size and Guaranteeing Real-Time Requirements
- Insik Shin, Insup Lee, Sang Lyul Min
CIS, Penn, USA
CSE, SNU, KOREA
The 23rd IEEE International Real-Time Systems
SymposiumDecember 3-5Austin, TX. (USA)
2Outline
- Design problem in real-time embedded systems
- motivation
- problem statement
- Solution design framework
- overview
- problem formulation
- heuristic solutions and evaluations
- Conclusion
3Code Size Reduction in Embedded Systems
- Code size is a critical design factor
- For many embedded systems, code size reduction
can affect their design and manufacturing cost. - Code size reduction technique at ISA level
- a subset of normal 32-bit instructions can be
compressed into a 16-bit format as in ARM Thumb
and MIPS 16. - code size can be reduced by 30, while the number
of instructions can increase by 40.
4Code Size vs Execution Time Tradeoff
- Code size (s) / execution time (e) tradeoff
- a program unit (function or basic block) can be
compiled into 16 or 32 bit instructions.
- then, we can obtain a list of possible (s, e)
pairs for each program
Program
32 bit
16 bit
32 bit
5Tradeoff Function
- Discrete tradeoff function for each task ?i
- with the list of possible (s, e) pairs for each
program (task), we can define a discrete tradeoff
function s fi(e) for each task.
6Tradeoff Function
- Linear approximated tradeoff function
- we can safely approximate the discrete tradeoff
function with a linear tradeoff function.
s
e
7Challenging Problem
- Given the code size vs. execution time tradeoff
of each task in a real-time embedded system, -
- a natural problem is
- minimizing the total code size of the system
- while guaranteeing all the temporal
- requirements imposed on the system.
8Our Approach
- Much work on the real-time system design
framework guaranteeing the system temporal
requirements. - Traditional design frameworks are for minimizing
the system utilization, while our problem aims at
minimizing the system code size. - Instead of solving the problem from the scratch,
we chose to extend a traditional real-time design
framework considering code size minimization.
9Period Calibration Method (PCM)
- A popular design framework that transforms
real-time system requirements into real-time task
scheduling parameters while - guaranteeing the system timing requirements
- minimizing the system utilization
- R. Gerber et al. Guaranteeing End-to-End Timing
Constraints by Calibrating Intermediate
Processes, RTSS 94.
10Period Calibration Method (PCM)
- System Requirements Task Parameters
- Guaranteeing the system end-to-end timing
requirements - Minimizing the utilization
System Requirements
Task Precedence
PCM
Task Parameters
End-to-End Timing Requirements
Period, Offset, Deadline, Fixed Priority
Task Execution Time
11Overview of Our Approach
- System Requirements Task Tradeoff Task
Parameters - Guaranteeing the system end-to-end timing
requirements - Minimizing the total code size
System Requirements
Design Framework
Task Precedence
End-to-End Timing Requirements
Task Parameters
Task Tradeoff
Period, Offset, Deadline, Execution Time, Code
Size
Task 1
Task 2
Task n
12Design Framework Overview
Design Framework
System Requirements
Task Execution Time
Task Tradeoff
Task Parameters
13Design Framework Feasibility Analysis
- Feasibility Analysis
- for all time intervals t1,t2, the amount of
execution to be done within the interval is no
greater than the interval length,
- Task model
- asynchronous periodic tasks with pre-period
deadlines under EDF scheduling
- this feasibility analysis is NP-hard Baruah
90.
?1
?2
?3
0
5
10
15
20
14Design Framework Feasibility Analysis
- Synchronous time interval
- starts at the release time of a job and ends at
the deadline of a job.
- for all possible time intervals
- for all synchronous time intervals
?1
?2
?3
0
5
10
15
20
t2
t1
15Design Framework Optimization Framework
- Optimization problem
- objective minimizing
- constraint feasibility
-
- for all synchronous time intervals t1, t2
We want to determine task execution time to
minimize the total code size while guaranteeing
feasibility.
- it is a form of a LP problem with linear tradeoff
- regardless of feasibility analysis complexity,
it is NP-hard with discrete tradeoff
16Design Framework Optimization Framework
- Heuristics for solving the optimization problem
- Highest Best Reduction-Ratio First (HBRF)
- favors a task that reduces its code size the most
with the same amount of execution time increase - Longest Period First (LPF)
- favors a task with the longest period
- Highest Best Weighted-Reduction-Ratio First
(HBWF) - combines HBRF and LPF
- Complexity
- HBRF HBWF O(nh), LPF O(n)
- n of tasks, h of tradeoff values
- Performance evaluation through simulation
17Simulation
- Simulation parameters
- period 10, 20, 25, 50, or 100 ms
- offset deadline randomly chosen according to
period - 5 pairs of code size/execution time tradeoff are
randomly chosen according to offset, deadline,
and period - 4, 6, 8, 10, and 12 tasks (more than 100 times
each) - Simulation measure - closeness to OPT
- RA the reduced amount of total code size
- closeness to OPT
18Performance of algorithms with 8 tasks
Closeness to OPT ()
19Performance of BEST with various task numbers
Closeness to OPT ()
20Conclusion
- Design framework taking advantage of the code
size vs. execution time tradeoff - Future work
- To develop an integrated approach and to evaluate
the complexity and effectiveness. - To extend this framework so as to utilize
tradeoffs among code size, execution time, and
energy consumption.