16
Resource Management for Robotic Applications ICESS-11 Changsha, China Nov.16-18 Yi-Zong Ou Department of Computer Science National Tsing-Hua University, Taiwan E. T.-H. Chu, Wen-Wei Lu, Jane W. S. Liu, Ta-Chih Hung, Jwu-Sheng Hu

Resource Management for Robotic Applications ICESS-11 Changsha, China Nov.16-18 Yi-Zong Ou Department of Computer Science National Tsing-Hua University,

Embed Size (px)

Citation preview

Resource Management for Robotic Applications

ICESS-11 Changsha, China Nov.16-18

Yi-Zong OuDepartment of Computer Science

National Tsing-Hua University, Taiwan 

E. T.-H. Chu, Wen-Wei Lu, Jane W. S. Liu, Ta-Chih Hung, Jwu-Sheng Hu

Collage of Service & Social Robots

2

Commonalities Low cost Responsive and easy to use Short time to market Easy to configure and customize

3

Built from components

on open platform

Difficulties Components are developed independently Their resource contention degrades

responsiveness

Our tools: Without source code: RAAPT-HV

Resource Allocation and Application Partition Tool

With source code: RC SSRobotic Class Scheduling Service

4

Scenario – Delivery Robot

5

Hi, Anderson!!Yes. Mr. Chen,

may I help you?

Go to library and get my

book.

Yes sir! Will go to library to get your

book

Video Surveillanc

e

Path Planning

Got it!

Face Detection

Speech Recognitio

n

Go this way!

RAAPT-HV

Performance Monitoring

Partitions Management

CPU Resource Determination

Performance Tuning

Microsoft Hyper-V

Face Detection

Response time : 88 ms

CPU Reserve : 70%CPU Reserve (%)R

esp

on

se t

ime

(m

s)

6

Partition A2 CPUs

50% Reserve

Partition B1 CPU

20% Reserve

Partition C2 CPUs

40% Reserve

Partition D1 CPU

10% Reserve

Partition A2 CPUs

50% Reserve

Partition B1 CPU

20% Reserve

Partition C2 CPUs

40% Reserve

Partition A Partition B Partition C

CPU Utilization

50% 45% 30%

Microsoft Hyper-V

7

Physical Hardware

Microsoft Hyper-V (hypervisor)

Windows Server 2008R2

VM worker process

Windows XP Windows XP

Time Critical Components

Normal Components

We use Hyper-V for isolation and protection of performance critical components

Parent Partition Child Partitions

User Mode

Kernel Mode

Resource Allocation

8

Processor

Number of logical processor

CPU reserve (%)

CPU limit (%)

Relative weight: 0~100

`

9

Specify experiments parameters

Initial and Connect Partitions

Return Status Return Status

Check status and Run experiments

Issue the Partitions Adjust Resources Adjust Resources

Executes CoIs

Generate logs(.txt)

Generate Config (.xml)

Ask for SummaryRead Config and

Logs

Generate Summary (.xls)

Ask for PlotRead Config. and

Summary files

Plot the charts on GUI

Developers RAAPT-HV Partition A Partition B

Scenario - ComputeMinimumCPUReserve

Execute ILPs

GUI - Determination of Required Bandwidth

10

0

200

400

600

800

10 20 30 40 50 60 70 80 90 100

Average response times of FDP (ms) VS percentage CPU reservation

88 ms, 70%

Generate Summary

Select Log files (.txt) : Select files Plot charts

3:24 PM : 10 log files have been selected.3:24 PM : CMCPUR_001.xls is generated.

Generate Summary

Increase APT

Decrease APT

Options

Set CPU reserve

Do it again

APT:

CPU Reserve:

Current Status

0

0

410

50

88

70

Functionalities for Performance Tuning Decrease the CPU resource usage by combing

components in the same partition. Decrease the overhead of switching between

partitions. Provide TunePerformanceToUseLessResource (TPTULR)

to decrease the overall CPU usage

11

If Sum of all CPU reserve < 100%then exit;

Else, do CombineComponentsIf it is successful, declare successful; exit;Else, declare “Unable to reduce total CPU reserve by combining CoIs”; exit;

`

12

Input a list of CoIs

Create and Initialize Partitions

Sort CoIs

Assign CoI-L to P1Start ILPs on P2

※Assign CoI-NL to P1

Set reservation

Run CoI-L and CoI-NL

Developers RAAPT-HV

Scenario - CombineComponents

Partition 1 Partition 2

Core Core Core Core

CoI-LCoI-NL

CPU Reserve:

CR% = Reserve-L + Reserve-

NL

CPU Reserve:

100% - CR%

PI-LPI-NLCompare PI-NL and

PI-L to APTs respectively

TryAgain MacroUpdate the list of CoIs, go to ※

If

worse than APTAPTs

thendo TryAgain macro

elseinvoke CMCPUR

Unsorted components list

CoI-LCoI-NL

Non-increasing order(according to performance criticality)

CoI-LCoI-NL

Non-increasing order

CoI-NL

ILPs

CoI-NL:Next to CoI-LCoI-L: The Last CoI

Robotic Class Scheduler Service

Prioritize components according to their timing requirements.

Built on Microsoft Multi-Media Class Scheduler Service (MMC SS).

Specify the component types rather than priority.

Give higher boost to components with more stringent timing requirements.

13

Scenario of RC SS

14

Set Thread Priority Level to HIGH

P = Normal

Obstacle Avoidance

P = Normal

Motion Control

P = Normal

Speech Recognition

Compete for CPU resource

P = Normal

Obstacle Avoidance

P = HIGH

Robotic Class Scheduler Service

(RC SS)

ObstacleAvoidnce , Localization

MotionControl, ObjectIdentification

SpeechRecognition

Type of Tasks

P = Normal

Time Critical ComponentTime Critical Component

AvSetMmThreadCharacteristics(ObstacleAvoidance)

Set Thread Priority Level to Normal

AvRevertMmThreadCharacteristics()

Summary RAAPT-HV supports a semi-automatic

iterative configuration and performance assessment and tuning process.

RAAPT-HV offers a way to reduce the ill-effects of resource contention when source code is not available.

RC SS offers the applications with the easiest and most light-weight mechanism for improved real-time performance with slight modification of source code.

15

Thank you

16