Boomerang: Real-Time I/O Meets Legacy Systems Ahmad Golchin, Soham - - PowerPoint PPT Presentation

boomerang real time i o meets legacy systems
SMART_READER_LITE
LIVE PREVIEW

Boomerang: Real-Time I/O Meets Legacy Systems Ahmad Golchin, Soham - - PowerPoint PPT Presentation

Boomerang: Real-Time I/O Meets Legacy Systems Ahmad Golchin, Soham Sinha, Richard West Boston University Introduction Key challenges: How to extend real-time system with legacy functionality? How to extend legacy system with


slide-1
SLIDE 1

Boomerang: Real-Time I/O Meets Legacy Systems

Ahmad Golchin, Soham Sinha, Richard West Boston University

slide-2
SLIDE 2

2

Introduction

  • Key challenges:

– How to extend real-time system with legacy functionality? – How to extend legacy system with real-time capabilities? – How to isolate tasks and services of difgerent criticality

levels?

– How to guarantee I/O processing is real-time

  • Input → Processing → Output
  • Contribution:

– Boomerang: I/O system built using Quest-V partitioning

hypervisor and Quest RTOS

– Composable tuned pipes

slide-3
SLIDE 3

3

Spatial and Temporal Isolation

  • Spatial

– Ensure one software component cannot alter another’s

private code or data, or interfere with control of its devices

  • T

emporal

– Ensure a software component cannot afgect when

another component accesses a resource

slide-4
SLIDE 4

4

Spatial and Temporal Isolation

  • Lack of isolation leads to timing and functional

failures

– Potentially catastrophic for high-criticality tasks

  • Enforce isolation using separate hardware for each

functional component

– e.g., separate ECU in an automotive system – Not scalable or cost-efgective

slide-5
SLIDE 5

5

Spatial and Temporal Isolation

  • Single hardware solution

– Use machine virtualization for spatial isolation of tasks

  • f difgerent criticalities

– Separate cores statically mapped to difgerent virtual

machines

– Difgerent cores used for timing-critical tasks

  • Use a partitioning hypervisor to manage system

– Quest-V

slide-6
SLIDE 6

6

Conventional vs Boomerang I/O

LEGACY OS RTOS LEGACY OS (e.g. Linux)

Core Memory Devices

1 2 3

(a) Conventional (b) Boomerang

Core(s) I/O handling

...

T asks Memory Devices Core(s) Real-Time T asks + I/O handling

...

Memory Devices Core(s) Low-criticality T asks + I/O handling

...

  • Boomerang uses Quest-V partitioning hypervisor to support

tuned pipes between RTOS & legacy OS

– Allows legacy OS to contribute to real-time I/O without

interference from low-criticality device interrupts

slide-7
SLIDE 7

7

Tuned Pipes

  • Like POSIX pipes but guarantee throughput and delay
  • n communication
  • Boomerang I/O subsystem supports real-time I/O

(Tuned Pipes) across Quest RTOS and legacy OSes

– Empowers legacy OSes (Linux, Android) with real-time

capabilities

– Leverages Quest RTOS VCPU scheduling of tasks and

interrupts

slide-8
SLIDE 8

8

VCPU Scheduling in Quest

Main VCPUs I/O VCPUs Threads PCPUs (Cores) Address Space

slide-9
SLIDE 9

9

Boomerang: Tuned Pipes

VCPU

Input Endpoint

tpipe

Output Endpoint

T ask / Handler

tpipe_id_t tpipe (ep_t *inp[], int n_inp, ep_t *outp, qos_t spec, tpipe_task_t func, void* arg); Boomerang automatically calculates VCPU parameters to meet QoS spec when all inputs and outputs are connected

slide-10
SLIDE 10

10

Tuned Pipes Bufgering Semantics

  • Pipeline composition of two or more tuned pipes
  • RT_ASYNC – Simpson’s 4-slot asynchronous communication
  • RT_FIFO – Ring-bufgered semi-asynchronous communication

VCPU

T ask

VCPU

T ask tpipe1 tpipe2

slide-11
SLIDE 11

11

Tuned Pipes Bufgering Semantics

  • Pipeline composition of two or more tuned pipes
  • Device Pipe – Interrupt handling (IO VCPU) + scatter/gather

processing (Main VCPU)

  • T

ask Pipe – Data processing (Main VCPU only)

Device Endpoint Bufger

IO VCPU

Handler

MAIN VCPU

Scatter, Gather Device Pipe

VCPU

T ask Task Pipe

RT_ASYNC

Pipe Bufger

slide-12
SLIDE 12

12

Example Pipeline Composition

[∗](A | B), C | D | E, F [e2e_tput | loss_rate, e2e_delay]

  • Parallel pipelines separated by commas
  • Asterisk enforces ring-bufgered lossless communication
  • e2e_tput: min msgs/time exiting fjnal pipe (for lossless comms)
  • e2e_delay: applies to longest path

A B C D E F

slide-13
SLIDE 13

13

Boomerang: Pipeline Constraints

  • Automatically establish VCPU (C,T) tuned pipe parameters

satisfying:

  • For FIFO and 4-slot:

1) 2)

  • For FIFO only:

3) 4)

  • For 4-slot only:

3)

i∈l

Ti≤e2e _ delay forlongest pathl min ∀i{ mi T i }≥e2e _tput ,for mi≥1messagestransferred by tpipeievery Ci All FIFObuffersare sized toensure noadditional blockingdelays Alltask scheduling constraints aremet max{ 1−T p T c }≤loss _ rate , for allT p≤T c

slide-14
SLIDE 14

14

Boomerang: Experimental Setup

LINUX Quest RTOS 2 1

Memory Core 0 Memory Core 1 Devices

USB-CAN Interface USB-CAN Interface

Devices

ECU1 ECU1 ECU2 ECU2 ECU3 ECU3 ECU4 ECU4 (CAN1) (CAN2-3) (CAN4) (CAN5)

Real-Time Tasks & I/O Handling

... ...

Low-criticality tasks & non-real-time I/O

SSD NIC NIC

UP Squared SBC

  • Boomerang tuned pipe path (1) spans Quest + Linux + USB-CAN
  • Boomerang tuned pipe path (2) spans Quest + USB-CAN
slide-15
SLIDE 15

15

Boomerang: Experimental Setup

LINUX SMP

T asks and IRQs partitioned

SHM

2 1

Memory Core 0 Memory Core 1 Devices

USB-CAN Interface USB-CAN Interface

Devices

ECU1 ECU1 ECU2 ECU2 ECU3 ECU3 ECU4 ECU4 (CAN1) (CAN2-3) (CAN4) (CAN5)

Real-Time Tasks & I/O Handling

... ...

Low-criticality tasks & non-real-time I/O

SSD NIC NIC

UP Squared SBC

  • Boomerang tuned pipe path (1) spans Quest + Linux + USB-CAN
  • Boomerang tuned pipe path (2) spans Quest + USB-CAN
slide-16
SLIDE 16

16

Boomerang: Asynchronous Results

  • Boomerang meets communication timing guarantees
  • A Linux SMP (multicore) OS with real-time extensions cannot perform I/O

predictably Pipeline 1 (Asynchronous, no loss) Pipeline 2 (Asynchronous, no loss)

slide-17
SLIDE 17

17

Boomerang: Loss-tolerant Results

  • Boomerang guarantees Pipeline 1 (3.5% loss) and Pipeline 2 (0% loss)
  • Linux SMP fails Pipeline 1 (55% loss) and Pipeline 2 (50% loss)

Pipeline 1 (Asynchronous, ≤20% loss) Pipeline 2 (Asynchronous, ≤20 % loss)

slide-18
SLIDE 18

18

Boomerang: Synchronous Results

Pipeline 1 (FIFO bufgering) Pipeline 2 (FIFO bufgering)

slide-19
SLIDE 19

19

ACRN: Partitioning Hypervisor

vLAPIC

Service OS

ACRN hypervisor

User OS

Virtio Front End Driver

TCP Stack

Other Device Drivers Kernel Space User Space

Socket API

Virtio API

Remote MMAP Notifjcation

VMExit

ACRN Service Module Remote MMAP Notifjcation

Hardware

Device Drivers Virtio BE Driver TCP Stack

Virtio Back End Service (VBS-K) Virtio Back End Service (VBS-U) ACRN Device Model

Socket API App App App

Shared Memory Bufger

slide-20
SLIDE 20

20

ACRN: Results

Pipeline 1 (Asynchronous, no loss) Pipeline 2 (Asynchronous, no loss)

  • ACRN generally worse than Linux SMP
  • Neither as good as Boomerang (previously shown)
slide-21
SLIDE 21

21

Conclusions

  • Boomerang I/O system built for Quest-V partitioning

hypervisor

– Supports composable tuned pipes between guests – Empowers Non-RT OS with RT capabilities – Automatically tunes VCPU parameters – Guarantees E2E throughput, delay & loss – Outperforms Linux SMP (RT-PREEMPT + DEADLINE) & ACRN