thomas nolte, 2013-04-25

39
Inbyggda realtidssystem: En flerkärning frälsning Embedded real-time systems: A multi-core salvation Thomas Nolte, 2013-04-25

Upload: ayala

Post on 24-Feb-2016

26 views

Category:

Documents


0 download

DESCRIPTION

Inbyggda realtidssystem: En flerkärning frälsning Embedded real-time systems: A multi-core salvation. Thomas Nolte, 2013-04-25. 1997 – 2000 – 2006 – 2009 – 2012. Undergrad. Student. Grad./PHD Student. Assistant Professor. Associate Professor. Professor ABB CRC. 2002. 2005, 2006. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Thomas Nolte, 2013-04-25

Inbyggda realtidssystem: En flerkärning frälsning

Embedded real-time systems: A multi-core salvationThomas Nolte, 2013-04-25

Page 2: Thomas Nolte, 2013-04-25

1997 – 2000 – 2006 – 2009 – 2012Undergrad.

StudentGrad./PHD

StudentAssistant Professor

Associate Professor

ProfessorABB CRC

2002 2005, 2006

Page 3: Thomas Nolte, 2013-04-25

3

Page 4: Thomas Nolte, 2013-04-25
Page 5: Thomas Nolte, 2013-04-25

5

Embedded systems

Page 6: Thomas Nolte, 2013-04-25

Environment

Control program

sensors

actuators

TaskTaskTaskTask

CPU

Key properties of interest = performance & predictability

6

Embedded systems

Page 8: Thomas Nolte, 2013-04-25

8

Page 9: Thomas Nolte, 2013-04-25

9

Page 10: Thomas Nolte, 2013-04-25

Too EARLY inflation

Too LATE inflation

Perfect TIMING

Page 11: Thomas Nolte, 2013-04-25

Environment Control program

sensors

actuators

TaskTaskTaskTask

When software is executing, it is executing as tasks

void foo(){

…while(status){

in = read_sensor();action = take_action(in);…status = perform_action(action);sleep(1000);

}}

Task

11

Page 12: Thomas Nolte, 2013-04-25

12

Instruction and data memory (1)

Page 13: Thomas Nolte, 2013-04-25

13

Instruction and data memory (2)

DATAINSTRUCTION

void foo(){

…while(status){

in = read_sensor();action = take_action(in);…status = perform_action(action);sleep(1000);

}}

Task

Page 14: Thomas Nolte, 2013-04-25

14

Instruction and data memory (3)

cache memory

Page 15: Thomas Nolte, 2013-04-25

15

Instruction and data memory (4)

cache memory

Key properties of interest = performance & predictability

Page 16: Thomas Nolte, 2013-04-25

A simple model

Environment Control program

sensors

actuators

TaskTaskTaskTask

task task task

time

period

worst-case execution time

16

Page 17: Thomas Nolte, 2013-04-25

What to run and when

Environment Control program

sensors

actuators

TaskTaskTaskTask

task1 task1 task1

time

task2 task2 task2

time

task2

prio low

prio high

time

task2 task2 task2 task2task1 task1 task1

The scheduler decides which task to execute

17

Page 18: Thomas Nolte, 2013-04-25

Determining the response time

Environment Control program

sensors

actuators

TaskTaskTaskTask

time

task2 task2 task2 task2task1

preempted preempted

resumed resumed

finished

response time of task1

response timeof task2

18

Page 19: Thomas Nolte, 2013-04-25

Predictability wrt embedded control systems● Program, or task

● Instruction for how the computer should work, i.e., what the computer shall do

● Execution time● How long time it takes for the program/task to

execute● Response time

● How long time it takes for the program/task to execute to completion, also when running together with other programs/tasks

● Research conducted the past 30 yearsPretty good understanding how predictable embedded systems should be constructed

19

Page 20: Thomas Nolte, 2013-04-25

The multi-core arrived!● Isn’t more better?

Page 21: Thomas Nolte, 2013-04-25

The Free Lunch Is Over A Fundamental Turn Toward Concurrency in SoftwareBy Herb Sutter

21

Page 22: Thomas Nolte, 2013-04-25

22

The multi-core revolution

single core dual core quad core multi core

parallel computer = many cores

Page 23: Thomas Nolte, 2013-04-25

23

Multi-core memory hierarchy (1)

Page 24: Thomas Nolte, 2013-04-25

24

Multi-core memory hierarchy (2)

Page 25: Thomas Nolte, 2013-04-25

Challenges with many cores

● Sequential guarantee is not valid anymore● Programs could previously execute in parallel, but

at any given time only one program is executing

● Now at any given point in time as many programs as there are cores can be executing

25

pgm1

timepgm2 pgm2 pgm2

time

pgm2

Core 1

Core 2

pgm2 pgm2 pgm2 pgm2pgm1

timeCore

Page 26: Thomas Nolte, 2013-04-25

Performance on a parallel machine (1)● The way we construct programs become

different

26

100 chefs do not bake 1 cake 100x

faster than 1 chef

Page 27: Thomas Nolte, 2013-04-25

Performance on a parallel machine (2)● The way we execute programs become

different

27

pgm1

time

Core pgm1 pgm1

100

5149

pgm2

51

Page 28: Thomas Nolte, 2013-04-25

Performance on a parallel machine (3)● The way we execute programs become

different

28

pgm1

timepgm2 pgm2 pgm2

time

Core 1

Core 2

pgm1 pgm1

100 51

50%

Page 29: Thomas Nolte, 2013-04-25

Performance on a parallel machine (4)● The way we execute programs become

different

29

timepgm2 pgm2 pgm2

time

Core 1

Core 2

pgm1 pgm1 pgm1pgmj pgmj pgmj

Page 30: Thomas Nolte, 2013-04-25

Predictability under parallelism (1)● New techniques are required to resolve

conflicts

30

pgm1

timepgm2 pgm2 pgm2

time

pgm2

Core 1

Core 2

Page 31: Thomas Nolte, 2013-04-25

Predictability under parallelism (2)● New techniques are required to resolve

conflicts

31

pgm1

timepgm2 pgm2 pgm2

time

pgm2

Core 1

Core 2

shared memory

Page 32: Thomas Nolte, 2013-04-25

Predictability under parallelism (3)● New techniques are required to resolve

conflicts

32

pgm1

timepgm2 pgm2 pgm2

time

pgm2

Core 1

Core 2

shared memory

Page 33: Thomas Nolte, 2013-04-25

…and the many-core is here!● More is better?

Page 34: Thomas Nolte, 2013-04-25

34

EpophanyTM Multi-core Solution

Page 35: Thomas Nolte, 2013-04-25

single core dual core many core

76421

654321

53

1 2 3 4 5 6 7

emptycore

7

• task scheduling • task partitioning• task scheduling

• local• global

• task partitioning• task scheduling• idle?

1 2 3 4 5 6 7assume 7 tasks:

35

New challenges

Page 36: Thomas Nolte, 2013-04-25

task0

task1

task2

task3

task4

task5

task6

task7

task8

task9

• Less shared state and data among cores• Locality important when sharing data• More message passing (via powerful interconnects)•Sleep cores when idle to save power

Page 37: Thomas Nolte, 2013-04-25

Our efforts wrt. multi/many-core

● New ways to program and analyze● Meng Liu (PhD Student)● Hamid Reza Faragardi (PhD Student)

● New ways to partition and design● Moris Behnam (Senior Lecturer)● Daniel Hallmans (PhD Student)

● New ways to execute● Mikael Åsberg (PhD Student)● Nima M. Khalilzad (PhD Student)

● New ways to communicate and synchronize● Mohammad Ashjaei (PhD Student)● Sara Afshar (PhD Student)

37

Page 38: Thomas Nolte, 2013-04-25

PhD studen

tPost-doc

Key CORE main research areas (2013): Multi-core and many-core real-time systems Real-time systems scheduling and

synchronization Predictable execution of real-time systems Compositional execution and analysis of real-

time systems

Simulation-based analysis of embedded systems

Stochastic and statistical analysis of real-time systems

Real-time communications Adaptive and reconfigurable real-time

systemsCORE alumni:

The Complex Real-Time Embedded (CORE) research group:

Mikael Åsberg Nima M. Khalilzad Daniel Hallmans Mohammad Ashjaei Sara Afshar Meng Liu

Kristian Sandström Moris Behnam Thomas Nolte Hamid R. FaragardiTBD TBD

Insik Shin Holger Kienle Johan Kraft Farhang Nemati Yue Lu Anders Wall

Page 39: Thomas Nolte, 2013-04-25

Embedded real-time systems: A multi-core salvationThomas Nolte, 2013-04-25