building a rtos for mpsoc dataflow programming

47
Publication Authors EEL 6935 – Spring 2014 1 of 38 Building a RTOS for MPSoC Dataflow Programming Jonathan David 2013 IEEE International Conference on Communications, pp.4373,4378, 9-13 June 2013 Osman Salem, Alexey Guerassimov, and Ahmed Mehaoua University of Paris Descartes – LIPADE Division of ITCE, POSTECH, Korea Anthony Marcus and Borko Furht, Department of Computer and Electrical Engineering and Computer Science, Florida Atlantic University

Upload: helen

Post on 23-Feb-2016

59 views

Category:

Documents


1 download

DESCRIPTION

Building a RTOS for MPSoC Dataflow Programming. Osman Salem, Alexey Guerassimov , and Ahmed Mehaoua University of Paris Descartes – LIPADE Division of ITCE, POSTECH, Korea Anthony Marcus and Borko Furht , - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Building a  RTOS for  MPSoC Dataflow Programming

Publication

Authors

EEL 6935 – Spring 2014

1 of 38

Building a RTOS for MPSoC Dataflow Programming

Jonathan David

2013 IEEE International Conference on Communications, pp.4373,4378, 9-13 June 2013

Osman Salem, Alexey Guerassimov, and Ahmed Mehaoua University of Paris Descartes – LIPADE Division of ITCE, POSTECH, Korea

Anthony Marcus and Borko Furht,Department of Computer and Electrical Engineering and Computer Science, Florida Atlantic University

Page 2: Building a  RTOS for  MPSoC Dataflow Programming

2 of 382 of 38

The Need for Improvement Multiprocessor System-on-Chip (MPSoC) designs are becoming standard in high performance DSP applications Zync Altera SoC ZigBee

Thus, being able load balance and make efficient use of parallel resources is of increasing importance

Need for a tool to ease MPSoC programming

Page 3: Building a  RTOS for  MPSoC Dataflow Programming

3 of 383 of 38

The Solution Design of a real-time operating system capable of

effectively managing resources Use of dataflow models shown to favor parallel

algorithms Favors data locality Reduces multi-core scheduling constraints to data dependencies

Use of data flow graphs instead of thread declarations Execution handled by MPSoC RTOS Frees programmer from creating program primitives for

task migration and synchronization

Page 4: Building a  RTOS for  MPSoC Dataflow Programming

4 of 384 of 38

How does it work? Partitions each application between available

cores Parallelism of each application is stated inside of a

dataflow graph Ensures good load balancing Reduces computation latency

MPSoC RTOS reuses C/C++ code for its actors Combines it with parameterized dataflow coordination

language

Page 5: Building a  RTOS for  MPSoC Dataflow Programming

5 of 38

HIGHLY DEPENDENT UPON DATAFLOW MODEL!!!

Page 6: Building a  RTOS for  MPSoC Dataflow Programming

6 of 386 of 38

Dataflow Model Well suited for applications based on a loop

Telecommunications Video processing

Describes computation by splitting loop into actors Data exchanged through inputs/outputs only State of actor is not shared

Flow model is created before execution, and can be totally reconfigured once before starting a new executions

Page 7: Building a  RTOS for  MPSoC Dataflow Programming

7 of 387 of 38

Dataflow Model Graph is represented by C++ objects

Compile within dataflow management module On each OS clock tick:

Dataflow graph parameterized Temporary graph of execution obtained Each actor gets an RTOS task

Page 8: Building a  RTOS for  MPSoC Dataflow Programming

8 of 388 of 38

Dataflow Graph Management An expansion is performed on the application

Dataflow graph transformed into temporary graph Each actor is executed only once in an iteration Temporary graph is dependent on parameter values that

change between each iteration

Page 9: Building a  RTOS for  MPSoC Dataflow Programming

9 of 389 of 38

Dataflow Graph Management

Page 10: Building a  RTOS for  MPSoC Dataflow Programming

10 of 38

EXPANSION PHASE CAN BE PERFORMED IN REAL TIME!!!

Page 11: Building a  RTOS for  MPSoC Dataflow Programming

11 of 3811 of 38

Dataflow Graph Management RTOS task is created for each actor

Tasks then scheduled on the cores of the MPSoC device

Alternate algorithms for dataflow management can be created, only restriction is that a dataflow graph can be produced

Page 12: Building a  RTOS for  MPSoC Dataflow Programming

12 of 3812 of 38

Scheduling Split into two phases

Master/Slave Phase Symmetric Phase

Page 13: Building a  RTOS for  MPSoC Dataflow Programming

13 of 3813 of 38

Master/Slave Phase Master core executes dataflow graph

management, posts actors to the slave cores, and finally posts actors to itself

Each core has a 1-place queue to receive an order to execute a task Message contains address of the task in shared memory Input/output buffer information contained

After first task dispatching is complete, all cores become pairs and the symmetric phase begins

Page 14: Building a  RTOS for  MPSoC Dataflow Programming

14 of 3814 of 38

Master/Slave Phase

Page 15: Building a  RTOS for  MPSoC Dataflow Programming

15 of 3815 of 38

Symmetric Phase Each core can access the schedule function

Mutex semaphores provided within library Highest priority task executed first Scheduler called in two scenarios

Execution of task is preempted by higher execution task Task execution completes

If a core has no remaining tasks, the scheduler saves the current task’s context state and the core returns to its private memory

Page 16: Building a  RTOS for  MPSoC Dataflow Programming

16 of 3816 of 38

Symmetric Phase

Page 17: Building a  RTOS for  MPSoC Dataflow Programming

17 of 3817 of 38

Results

OS takes up a lot of space (more than 50%)! Due to the size and task stacks allocated by kernel

Page 18: Building a  RTOS for  MPSoC Dataflow Programming

18 of 3818 of 38

Results

Different number of actors for each iteration

Page 19: Building a  RTOS for  MPSoC Dataflow Programming

19 of 3819 of 38

Results

Performance improves with number of cores Definite diminishing returns Shared memory accesses creates a bottleneck

Page 20: Building a  RTOS for  MPSoC Dataflow Programming

20 of 3820 of 38

Shortfalls of the Study Study is focused primarily on signal processing Does not mention how the dataflow graphs are

created, or how much time it takes (only mentions it falls within parameters for the tested algorithm)

Does not mention how much of a bottleneck is created by using one core as a master

No comparison against traditional/hand coded method

Page 21: Building a  RTOS for  MPSoC Dataflow Programming

21 of 3821 of 38

Conclusions Proposed MPSoC RTOS can ease difficulty of

programming for modern day DSP applications Increase in performance with number of cores

Bottleneck with increased memory accesses Large amount of memory occupied by proposed

OS Actors can be written in C or C++ Where is the competition?

Can’t compare, does it result in a trade-off?

Page 22: Building a  RTOS for  MPSoC Dataflow Programming

22 of 38

QUESTIONS?

Page 23: Building a  RTOS for  MPSoC Dataflow Programming

Publication

Authors

EEL 6935 – Spring 2014

23 of 38

R3TOS: Reliable Reconfigurable Real-Time Operating System

Jonathan David

2013 IEEE International Conference on Communications, pp.1720,1724, 9-13 June 2013

Mai Abdelhakim, Leonard E. Lightfoot, Jian Ren, Tongtong LiDepartment of Electrical & Computer Engineering, Michigan State UniversityAir Force Research Laboratory, Wright-Patterson Air Force Base

Page 24: Building a  RTOS for  MPSoC Dataflow Programming

24 of 3824 of 38

The Need for Improvement FGPAs provide promising possibilities for the future as semiconductor manufacturing reaches its physical limits Obtain best performance per transistor count per unit of

consumed energy Increase in reliability High amount of computation in given space and time

Page 25: Building a  RTOS for  MPSoC Dataflow Programming

25 of 3825 of 38

The Solution Use of online specialization

Intelligent reuse of resources in the FPGA Architecture kept fault-free by reconfiguring around

damaged areas of the chip Maintain a “software look and feel” to avoid a

collapse in productivity and cost Satisfy requirements of high-performance, real-

time, fault-tolerance necessary in applications

Page 26: Building a  RTOS for  MPSoC Dataflow Programming

26 of 38

RTOS != ROS

Page 27: Building a  RTOS for  MPSoC Dataflow Programming

27 of 3827 of 38

Fundamental ROS Services Software OS augmented with functions to manage reconfigurable hardware

Task loading Memory management Scheduling and allocation Communications

Hardware hardware Hardware software

Input/output Accessible through AP, with runtime support

Page 28: Building a  RTOS for  MPSoC Dataflow Programming

28 of 3828 of 38

R3TOS Foundations Resource reusability and computation

ephemerality Intensive use of fine-grained reconfiguration

Aims to keep resources available to any incoming task at any time

Circuits configured when required, then removed Clock distribution wires Task communication channels

Resources can be used for either computation or communication purposes

Page 29: Building a  RTOS for  MPSoC Dataflow Programming

29 of 3829 of 38

R3TOS Foundations Control logic to drive tasks is attach to their own

circuitry, as opposed to predefined reconfigurable slots with fixed control logic and comm structures Self-contained, closed structures Fully relocatable within FPGA

Page 30: Building a  RTOS for  MPSoC Dataflow Programming

30 of 3830 of 38

Task Control Logic (TCL) Includes input data buffer, output data buffer, and

hardware semaphore enable/disables computation Provides means to virtually lock physical data and

control data of hardware tasks to logical positions in the configuration memory of the FPGA

Frees the allocation of a task from being constrained by communication interfaces during design time TCLs are accessible through the configuration interface

of whichever memory position they are mapped to

Page 31: Building a  RTOS for  MPSoC Dataflow Programming

31 of 3831 of 38

TCL Advantages Number of tasks executed concurrently only

limited by resources on the FPGA Tasks can be allocated around damaged resource Increased computation density Complexity of allocation algorithms reduced

No need to be aware of underlying implementation-related irregularities in the reconfigurable area

No need to preserve static routes

Page 32: Building a  RTOS for  MPSoC Dataflow Programming

32 of 3832 of 38

TCL Advantages Tasks can be de-allocated quickly using multiple

frame write configuration commands Simply blank an entire region

Each task can be clocked at its highest frequency, rather than running entire fabric on same clock

Device ages uniformly

Page 33: Building a  RTOS for  MPSoC Dataflow Programming

33 of 3833 of 38

The Downsides Bottleneck from the internal configuration access

port leads to significant time overheads Configuration of a hardware task delays its

execution Configuration of on-demand communication

channels incurs an overhead greater than the time needed for created a virtual connection through a network-on-chip

Page 34: Building a  RTOS for  MPSoC Dataflow Programming

34 of 3834 of 38

Computing Model Task definitions and interactions described using

parallel software syntax (POSIX Pthreads) Body of some tasks implemented in hardware

R3TOS addresses two main hardware tasks: Data-stream processing, to be used with data-intensive

applications with regular dependencies Hardware-acceleration tasks

User relies on the R3TOS API to program their reconfigurable application

Execution of tasks controlled by main CPU

Page 35: Building a  RTOS for  MPSoC Dataflow Programming

35 of 3835 of 38

Computing Model The software microkernel (SWuK) interacts with

the hardware microkernel (HWuK) SWuK schedules/executes software tasks and forwards

hardware tasks to the HWuK Hardware related services offered in the API are

determined by the HWuK Scheduler server to schedule hardware tasks Allocator server manages FPGA resources Configuration manager to translate high-level operations

into reconfiguration commands for the FPGA

Page 36: Building a  RTOS for  MPSoC Dataflow Programming

36 of 3836 of 38

Computing Model

Page 37: Building a  RTOS for  MPSoC Dataflow Programming

37 of 3837 of 38

General Architecture A little bit complex, probably

Page 38: Building a  RTOS for  MPSoC Dataflow Programming

38 of 3838 of 38

General Architecture Three main parts

HWuK Main CPU Memory

Page 39: Building a  RTOS for  MPSoC Dataflow Programming

39 of 3839 of 38

Hardware Microkernel Each component is implemented separately to

allow for parallelism in the HWuK processes Allows for low runtime overhead and area overhead Main core of all HWuK components is the PicoBlaze Requires only 96 slices

HWuK components mastered by scheduler Allocator and configuration manager act as slaves

Communication between components managed by a very strict set of rules, overseen by two monitors (to detect malfunctions)

Page 40: Building a  RTOS for  MPSoC Dataflow Programming

40 of 3840 of 38

R3TOS Main CPU Xilinx on-chip processor (32-bit MicroBlaze soft-

core) is used as main CPU Timer and interrupt peripherals included to expand

functionality Program executed by CPU is held in directly

accessible program memory (BRAMs in FPGA) Interfaced with the HWuK based on interrupts and

shared memory

Page 41: Building a  RTOS for  MPSoC Dataflow Programming

41 of 3841 of 38

Memory Bitstream memory and main memory held on one

external chip Data and code segments of software tasks Data segments and bitstreams of hardware tasks Bitstreams of the data relocating tasks

Lowest part of memory contains a pointer table, allowing the HWuK to know the exact location of each task bitstream

Page 42: Building a  RTOS for  MPSoC Dataflow Programming

42 of 3842 of 38

Proof of Concept

Page 43: Building a  RTOS for  MPSoC Dataflow Programming

43 of 3843 of 38

Proof of Concept

Page 44: Building a  RTOS for  MPSoC Dataflow Programming

44 of 3844 of 38

Shortfalls of the Study Has yet to be seen if the implementation is

practical for most applications Can’t be seen how execution times are effected How difficult is coding? Energy usage of device? That’s is about it…the paper is pretty solid

Page 45: Building a  RTOS for  MPSoC Dataflow Programming

45 of 3845 of 38

Conclusions R3TOS allows for a viable, reconfigurable, real-

time operating system Many advantages gained by freeing hardware

from static communication lines Better able to use resources Even wear over device Possible performance increases

Viability of design must wait for practical implementation, currently only proof of concept

Page 46: Building a  RTOS for  MPSoC Dataflow Programming

46 of 38

QUESTIONS?

Page 47: Building a  RTOS for  MPSoC Dataflow Programming

47 of 38

THANK YOU!