58
MARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background Scheduling Memory- Aware Scheduling Multicore VCPU Scheduling Evaluation Conclusion MARACAS: A Real-Time Multicore VCPU Scheduling Framework Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Computer Science Department Boston University

MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

MARACAS: A Real-Time Multicore VCPUScheduling Framework

Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng

Computer Science DepartmentBoston University

Page 2: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Overview

1 Introduction

2 Quest RTOS

3 Background Scheduling

4 Memory-Aware Scheduling

5 Multicore VCPU Scheduling

6 Evaluation

7 Conclusion

Page 3: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Motivation

Multicore platforms are gaining popularity in embeddedand real-time systems

concurrent workload supportless circuit arealower power consumptionlower cost

Complex on-chip memory hierarchies pose significantchallenges for applications with real-time requirements

Page 4: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Motivation

Multicore platforms are gaining popularity in embeddedand real-time systems

concurrent workload supportless circuit arealower power consumptionlower cost

Complex on-chip memory hierarchies pose significantchallenges for applications with real-time requirements

Page 5: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Motivation

Shared cache contention:

page coloringhardware cache partitioning (Intel CAT)static VS dynamic

Memory bus contention:

bank-aware memory managementmemory throttling

Page 6: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Motivation

Shared cache contention:

page coloringhardware cache partitioning (Intel CAT)static VS dynamic

Memory bus contention:

bank-aware memory managementmemory throttling

Page 7: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Contribution

We proposed the use of foreground (reservation) +background (surplus) scheduling model

improves application performanceeffectively reduces resource contentionwell-integrated with real-time scheduling algorithms

We proposed a new bus monitoring metric that accuratelydetects traffic

Page 8: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Contribution

We proposed the use of foreground (reservation) +background (surplus) scheduling model

improves application performanceeffectively reduces resource contentionwell-integrated with real-time scheduling algorithms

We proposed a new bus monitoring metric that accuratelydetects traffic

Page 9: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Application

Imprecise computation/Numeric integration

MPEG video decoding: mandatory to process I-frames,optional to process B- and P-frames to improve frame rate

Mixed-criticality systems running performance-demandingapplications

machine learningcomputer vision

Page 10: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Application

Imprecise computation/Numeric integration

MPEG video decoding: mandatory to process I-frames,optional to process B- and P-frames to improve frame rate

Mixed-criticality systems running performance-demandingapplications

machine learningcomputer vision

Page 11: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Quest RTOS

VCPU model (C, T) inQuest RTOS

C: CapacityT: Period

Partitioned schedulingusing RMS

Schedulability test∑n1(Ci

Ti) ≤ n( n

√2− 1)

Page 12: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Quest RTOS

VCPU model (C, T) inQuest RTOS

C: CapacityT: Period

Partitioned schedulingusing RMS

Schedulability test∑n1(Ci

Ti) ≤ n( n

√2− 1)

Page 13: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Quest RTOS

VCPU model (C, T) inQuest RTOS

C: CapacityT: Period

Partitioned schedulingusing RMS

Schedulability test∑n1(Ci

Ti) ≤ n( n

√2− 1)

Page 14: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Background Scheduling

VCPU enters backgroundmode upon depleting itsbudget (C)

Core enters background mode when all VCPUs are inbackground mode

Background CPU Time (BGT): time a VCPU runs whencore in background mode

Background scheduling: schedule VCPUs when core is inbackground mode

fair share of BGT amongst VCPUs on core

Page 15: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Background Scheduling

VCPU enters backgroundmode upon depleting itsbudget (C)

Core enters background mode when all VCPUs are inbackground mode

Background CPU Time (BGT): time a VCPU runs whencore in background mode

Background scheduling: schedule VCPUs when core is inbackground mode

fair share of BGT amongst VCPUs on core

Page 16: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Background Scheduling

VCPU enters backgroundmode upon depleting itsbudget (C)

Core enters background mode when all VCPUs are inbackground mode

Background CPU Time (BGT): time a VCPU runs whencore in background mode

Background scheduling: schedule VCPUs when core is inbackground mode

fair share of BGT amongst VCPUs on core

Page 17: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Background Scheduling

VCPU enters backgroundmode upon depleting itsbudget (C)

Core enters background mode when all VCPUs are inbackground mode

Background CPU Time (BGT): time a VCPU runs whencore in background mode

Background scheduling: schedule VCPUs when core is inbackground mode

fair share of BGT amongst VCPUs on core

Page 18: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

DRAM structure

Page 19: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Memory-Aware Scheduling

Prior work [MemGuard] uses ”Rate Metric”:number of DRAM accesses over a certain period

Bank-level parallelismRow buffersSync Effect

Page 20: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Memory-Aware Scheduling

Prior work [MemGuard] uses ”Rate Metric”:number of DRAM accesses over a certain period

Bank-level parallelism

Row buffersSync Effect

Page 21: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Memory-Aware Scheduling

Prior work [MemGuard] uses ”Rate Metric”:number of DRAM accesses over a certain period

Bank-level parallelismRow buffers

Sync Effect

Page 22: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Memory-Aware Scheduling

Prior work [MemGuard] uses ”Rate Metric”:number of DRAM accesses over a certain period

Bank-level parallelismRow buffersSync Effect

Page 23: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Sync Effect

Each task reduces its access rate by a factor of (T-t)/T

Contention in [0, t] remains the same

Page 24: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Sync Effect

Each task reduces its access rate by a factor of (T-t)/T

Contention in [0, t] remains the same

Page 25: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Latency Metric

requests = 3, occupancy = 10

latency = 103 = 3.3

Page 26: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Latency Metric

requests = 3, occupancy = 10

latency = 103 = 3.3

Page 27: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Latency Metric

UNC ARB TRK REQUEST.ALL (requests):counts all memory requests going to the memorycontroller request queue

UNC ARB TRK OCCUPANCY.ALL (occupancy):counts cycles weighted by the number of pending requestsin the queue

Average latency:latency = occupancy

requests

Page 28: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Latency Metric

UNC ARB TRK REQUEST.ALL (requests):counts all memory requests going to the memorycontroller request queue

UNC ARB TRK OCCUPANCY.ALL (occupancy):counts cycles weighted by the number of pending requestsin the queue

Average latency:latency = occupancy

requests

Page 29: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Memory Throttling

When core gets throttled, background scheduling isdisabled

Latency threshold: MAX MEM LATif latency ≥ MAX MEM LAT thennum throttle + +

Proportional throttling

Every core is throttled at some pointThrottled time proportional to core’s DRAM access rate

Page 30: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Memory Throttling

When core gets throttled, background scheduling isdisabled

Latency threshold: MAX MEM LATif latency ≥ MAX MEM LAT thennum throttle + +

Proportional throttling

Every core is throttled at some pointThrottled time proportional to core’s DRAM access rate

Page 31: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Memory Throttling

When core gets throttled, background scheduling isdisabled

Latency threshold: MAX MEM LATif latency ≥ MAX MEM LAT thennum throttle + +

Proportional throttling

Every core is throttled at some pointThrottled time proportional to core’s DRAM access rate

Page 32: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Predictable Migration

Run migration thread with highest priority on each core:pushing local VCPUs to other cores (starts from highestutilization ones)

Only one migration thread active during a migration period

Its execution of its entire capacity C does not lead to anyother local VCPUs missing their deadlines

Constraint on C:

C ≥ 2× Elock + Estruct

Page 33: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Predictable Migration

Run migration thread with highest priority on each core:pushing local VCPUs to other cores (starts from highestutilization ones)

Only one migration thread active during a migration period

Its execution of its entire capacity C does not lead to anyother local VCPUs missing their deadlines

Constraint on C:

C ≥ 2× Elock + Estruct

Page 34: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Predictable Migration

Run migration thread with highest priority on each core:pushing local VCPUs to other cores (starts from highestutilization ones)

Only one migration thread active during a migration period

Its execution of its entire capacity C does not lead to anyother local VCPUs missing their deadlines

Constraint on C:

C ≥ 2× Elock + Estruct

Page 35: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Predictable Migration

Run migration thread with highest priority on each core:pushing local VCPUs to other cores (starts from highestutilization ones)

Only one migration thread active during a migration period

Its execution of its entire capacity C does not lead to anyother local VCPUs missing their deadlines

Constraint on C:

C ≥ 2× Elock + Estruct

Page 36: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Predictable Migration

Run migration thread with highest priority on each core:pushing local VCPUs to other cores (starts from highestutilization ones)

Only one migration thread active during a migration period

Its execution of its entire capacity C does not lead to anyother local VCPUs missing their deadlines

Constraint on C:

C ≥ 2× Elock + Estruct

Page 37: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

VCPU Load Balancing

For every core, define Slack-Per-VCPU (SPV):

SPV =1−

∑n1(Ci/Ti )n

SPV = 1−(10%+30%)2 = 30%

Page 38: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

VCPU Load Balancing

For every core, define Slack-Per-VCPU (SPV):

SPV =1−

∑n1(Ci/Ti )n

SPV = 1−(10%+30%)2 = 30%

Page 39: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

VCPU Load Balancing

Balance Background CPU Time (BGT) used by everyVCPU across cores: equalize SPVs of all cores

BGT fair sharingbalanced memory throttling capability on each core

Page 40: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

VCPU Load Balancing

Balance Background CPU Time (BGT) used by everyVCPU across cores: equalize SPVs of all cores

BGT fair sharing

balanced memory throttling capability on each core

Page 41: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

VCPU Load Balancing

Balance Background CPU Time (BGT) used by everyVCPU across cores: equalize SPVs of all cores

BGT fair sharingbalanced memory throttling capability on each core

Page 42: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

VCPU Load Balancing

Balance Background CPU Time (BGT) used by everyVCPU across cores: equalize SPVs of all cores

BGT fair sharingbalanced memory throttling capability on each core

Page 43: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Cache-Aware Scheduling

Static cache partitioning amongst cores

page coloring

New API:bool vcpu create(uint C, uint T, uint cache);

Extension of VCPU Load Balancing:destination core meets the cache requirement

Page 44: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Cache-Aware Scheduling

Static cache partitioning amongst cores

page coloring

New API:bool vcpu create(uint C, uint T, uint cache);

Extension of VCPU Load Balancing:destination core meets the cache requirement

Page 45: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Cache-Aware Scheduling

Static cache partitioning amongst cores

page coloring

New API:bool vcpu create(uint C, uint T, uint cache);

Extension of VCPU Load Balancing:destination core meets the cache requirement

Page 46: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Evaluation

MARACAS running on the following hardware platform:

Page 47: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Rate VS Latency

Micro-benchmark m jump:byte array[6M];for (uint32 j = 0; j < 8K; j += 64)

for (uint32 i = j; i < 6M; i += 8K)< Variable delay added here >

(uint32)array[i] = i;

Three m jump (task 1,2,3) running on separate coreswithout memory throttling, utilization (C/T) 50%

Each run, insert a different time delay in task1 and task2,task3 has no delay

Page 48: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Rate VS Latency

Micro-benchmark m jump:byte array[6M];for (uint32 j = 0; j < 8K; j += 64)

for (uint32 i = j; i < 6M; i += 8K)< Variable delay added here >

(uint32)array[i] = i;

Three m jump (task 1,2,3) running on separate coreswithout memory throttling, utilization (C/T) 50%

Each run, insert a different time delay in task1 and task2,task3 has no delay

Page 49: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Rate VS Latency

Micro-benchmark m jump:byte array[6M];for (uint32 j = 0; j < 8K; j += 64)

for (uint32 i = j; i < 6M; i += 8K)< Variable delay added here >

(uint32)array[i] = i;

Three m jump (task 1,2,3) running on separate coreswithout memory throttling, utilization (C/T) 50%

Each run, insert a different time delay in task1 and task2,task3 has no delay

Page 50: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Rate VS Latency

Record the total memory bus traffic, average memoryrequest latency and task3’s instructions retired inforeground mode:

Bus Traffic (GB) Latencytask3 Instructions

Retired (×108)

H 1128 228 249

M 1049 183 304

L 976 157 357

Setting comparable thresholds:

rate-based: derived from Bus Traffic (1128/time)latency-based: from Latency (228)

Last column serves as reference, showing the expectedperformance of task3 using the corresponding thresholds

Page 51: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Rate VS Latency

Record the total memory bus traffic, average memoryrequest latency and task3’s instructions retired inforeground mode:

Bus Traffic (GB) Latencytask3 Instructions

Retired (×108)

H 1128 228 249

M 1049 183 304

L 976 157 357

Setting comparable thresholds:

rate-based: derived from Bus Traffic (1128/time)latency-based: from Latency (228)

Last column serves as reference, showing the expectedperformance of task3 using the corresponding thresholds

Page 52: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Rate VS Latency

Record the total memory bus traffic, average memoryrequest latency and task3’s instructions retired inforeground mode:

Bus Traffic (GB) Latencytask3 Instructions

Retired (×108)

H 1128 228 249

M 1049 183 304

L 976 157 357

Setting comparable thresholds:

rate-based: derived from Bus Traffic (1128/time)latency-based: from Latency (228)

Last column serves as reference, showing the expectedperformance of task3 using the corresponding thresholds

Page 53: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Rate VS Latency

Record the total memory bus traffic, average memoryrequest latency and task3’s instructions retired inforeground mode:

Bus Traffic (GB) Latencytask3 Instructions

Retired (×108)

H 1128 228 249

M 1049 183 304

L 976 157 357

Setting comparable thresholds:

rate-based: derived from Bus Traffic (1128/time)latency-based: from Latency (228)

Last column serves as reference, showing the expectedperformance of task3 using the corresponding thresholds

Page 54: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Rate VS Latency

Repeat experiment with memory throttling enabled andfixed delay for task1/task2

Page 55: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Rate VS Latency

Repeat experiment with memory throttling enabled andfixed delay for task1/task2

Page 56: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Conclusion

MARACAS uses background time to improve taskperformance; when memory bus is contended, it getsdisabled through throttling

MARACAS uses a latency metric to trigger throttling,outperforming prior rate-based approach

MARACAS fairly distributes background time across cores,for both fairness and better throttling

Page 57: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Conclusion

MARACAS uses background time to improve taskperformance; when memory bus is contended, it getsdisabled through throttling

MARACAS uses a latency metric to trigger throttling,outperforming prior rate-based approach

MARACAS fairly distributes background time across cores,for both fairness and better throttling

Page 58: MARACAS: A Real-Time Multicore VCPU Scheduling Frameworkrichwest/slides/maracas_rtss2016.pdfMARACAS Ying Ye, Richard West, Jingyi Zhang, Zhuoqun Cheng Introduction Quest RTOS Background

MARACAS

Ying Ye,Richard West,Jingyi Zhang,

ZhuoqunCheng

Introduction

Quest RTOS

BackgroundScheduling

Memory-AwareScheduling

MulticoreVCPUScheduling

Evaluation

Conclusion

Conclusion

MARACAS uses background time to improve taskperformance; when memory bus is contended, it getsdisabled through throttling

MARACAS uses a latency metric to trigger throttling,outperforming prior rate-based approach

MARACAS fairly distributes background time across cores,for both fairness and better throttling