building resource-aware applications and systems michael b. jones microsoft research

23
Building Resource- Building Resource- Aware Applications Aware Applications and Systems and Systems Michael B. Jones Microsoft Research

Post on 21-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Building Resource-Aware Applications and Systems Michael B. Jones Microsoft Research

Building Resource-Aware Building Resource-Aware Applications and SystemsApplications and Systems

Michael B. Jones

Microsoft Research

Page 2: Building Resource-Aware Applications and Systems Michael B. Jones Microsoft Research

Goal: Coexisting Independent Goal: Coexisting Independent Real-Time ApplicationsReal-Time Applications

Independently developed Predictable concurrent execution of

real-time and non-real-time apps Meeting all apps’ timing needs

Informing apps when not possible

Page 3: Building Resource-Aware Applications and Systems Michael B. Jones Microsoft Research

OverviewOverview

Review: Need for Resource Management Motivating Examples Resource Awareness

New: Systems support for resource-aware

applications and systems Call to Action

Page 4: Building Resource-Aware Applications and Systems Michael B. Jones Microsoft Research

Case for Explicit Resource Case for Explicit Resource Allocation and AccountingAllocation and Accounting

Time-sensitive applications need: different resources at different rates in different amounts

Even infinite resources insufficient if not given to apps in timely fashion

Page 5: Building Resource-Aware Applications and Systems Michael B. Jones Microsoft Research

Assumption: Multiple TasksAssumption: Multiple Tasks

Assumption: Multiple concurrent tasks At least one time-sensitive

Many such tasks to choose from: Media input, output Speech, vision-based UIs Software modems, sound cards, ... Industrial device control etc.

Page 6: Building Resource-Aware Applications and Systems Michael B. Jones Microsoft Research

One Real-Time Task EnoughOne Real-Time Task Enough

Time-aware resource management needed even if just one real-time task

Competing normal tasks can still cause real-time task to fail Round-robin with to large a period Fair share with too small a proportion

Page 7: Building Resource-Aware Applications and Systems Michael B. Jones Microsoft Research

Motivating ExamplesMotivating Examples Speech, vision based intelligent UIs

All the resources all the time Low-latency response required

Reducing PC costs via “soft migration” Soft modems, soft ADSL, etc.

Reliability Contain denial of service attacks

Consumer real-time applications Coexist with independently developed real-

time and non-real-time applications

Page 8: Building Resource-Aware Applications and Systems Michael B. Jones Microsoft Research

Resource AwarenessResource Awareness

Only apps know their timing requirements must have a vocabulary for expressing

them Only system can enforce resource

guarantees must do resource accounting to fulfill negotiated resource

guarantees Both must be Resource Aware

Page 9: Building Resource-Aware Applications and Systems Michael B. Jones Microsoft Research

Building Resource-Aware Building Resource-Aware Applications and SystemsApplications and Systems

Resource management uses negotiation among three parties:

Applications Resource consumers

Resource Planner Locus of policy decisions Acts on user’s behalf

Resource Providers Scheduler, memory manager, net

bandwidth, etc.

Page 10: Building Resource-Aware Applications and Systems Michael B. Jones Microsoft Research

Activity

SCSI Disk

IResource

IScsiDisk CPU

IResource

ICpu ATM Adapter

IResource

IAtmCard

File Sys

IResource

IFileSys Network

IResource

INetwork

ResourcePlanner

IPlanner(ScsiDisk, 60%)(CPU, 30%)(ATM, 20%)...

(Activity, 20%)(Activity, 30%)

(Activity, 60%)

Resource ManagementResource Management

Page 11: Building Resource-Aware Applications and Systems Michael B. Jones Microsoft Research

Determining Application Determining Application Resource NeedsResource Needs

Adaptive approach:1.Observe own resource usage

2.Compute expected needs from past observations

3.Reserve appropriate resource amounts Resource self-aware applications key

Only apps have knowledge to make appropriate resource tradeoffs

Uncertainty in amounts inherent Caches, busses, CPU speeds, contention

Page 12: Building Resource-Aware Applications and Systems Michael B. Jones Microsoft Research

Sacs Disk

IResource

IScsiDisk CPU

IResource

ICpu ATM Adapter

IResource

IAtmCard

File Sys

IResource

IFileSys Network

IResource

INetwork

Constraint-basedRequests

Quality-of-service Streaming

ActivityResourcePlanner

IPlanner

Using ResourcesUsing Resources

Page 13: Building Resource-Aware Applications and Systems Michael B. Jones Microsoft Research

Activity

Sacs Disk

IResource

IScsiDisk CPU

IResource

ICpu ATM Adapter

IResource

IAtmCard

File Sys

IResource

IFileSys Network

IResource

INetwork

ResourcePlanner

IPlannerNegotiate

PersistentOverload!

Another Activity

Reserve!

Resource NegotiationResource Negotiation

Page 14: Building Resource-Aware Applications and Systems Michael B. Jones Microsoft Research

Tying It All TogetherTying It All Together OS Results:

Built, studied effective mechanisms for scheduling and resource management

Separation of mechanism and policy Allows Resource Planner to manage

resources on user’s behalf Decision Theory, User Modeling:

Provides effective means for planner to determine appropriate policies

Goal maximizing value perceived by user User-aware UIs need these results!

Page 15: Building Resource-Aware Applications and Systems Michael B. Jones Microsoft Research

Missing Information PathsMissing Information Paths

In current general-purpose systems: Apps can’t tell system:

when code needs to be executed amounts of resources they need

System can’t tell apps: whether deadlines will be met amounts of resources available to them

Both flying blind

Page 16: Building Resource-Aware Applications and Systems Michael B. Jones Microsoft Research

Call To ActionCall To Action

Future systems must provide: Explicit resource management

interfaces Predictable low-latency scheduling

Enabling technology for: User interface advances Reduced cost computing More reliable computing Consumer real-time applications

Page 17: Building Resource-Aware Applications and Systems Michael B. Jones Microsoft Research

Building Resource-Aware Building Resource-Aware Applications and SystemsApplications and Systems

Discussion

Page 18: Building Resource-Aware Applications and Systems Michael B. Jones Microsoft Research

For More InformationFor More Information

Contact me: Mike Jones, [email protected]

Or see: http://research.microsoft.com/~mbj/

Page 19: Building Resource-Aware Applications and Systems Michael B. Jones Microsoft Research

““Back Pocket” Slides...Back Pocket” Slides...

Page 20: Building Resource-Aware Applications and Systems Michael B. Jones Microsoft Research

Scheduling ResearchScheduling Research

CPU scheduling built on Rialto OS Research version of MMOSA ITV OS

Provides both: Ongoing CPU Reservations

Guarantee at least X time every Y time period Fine-grained Deadline Scheduling

Do estimate work within time interval

Page 21: Building Resource-Aware Applications and Systems Michael B. Jones Microsoft Research

CPU ReservationCPU Reservation

Guaranteed execution rate and granularity for an activity X units of time out of every Y units, e.g.

800µs every 5ms 7.5ms every 33.3ms one second every minute

Continuously guaranteed

Page 22: Building Resource-Aware Applications and Systems Michael B. Jones Microsoft Research

Time ConstraintTime Constraint

Deadline-based thread execution Guarantees execution within interval, or Proactively denies constraint request

schedulable = BeginConstraint (time_interval, estimate);if (schedulable) then

Do normal work under constraintelse

Transient overload -- shed load if possibletime_taken = EndConstraint ();

Page 23: Building Resource-Aware Applications and Systems Michael B. Jones Microsoft Research

Adding Reservations to Existing AppsAdding Reservations to Existing Apps

0%

20%

40%

60%

80%

100%

Application

% F

ram

es R

ende

red

Round-robinscheduler

RialtoScheduler

1 MPEG & 5 AVI players, with reservations on Rialto

CPU reservations improve performance