40
Tessellation: Space- Time Partitioning in a Manycore Client OS Rose Liu 1,2 , Kevin Klues 1 , Sarah Bird 1 , Steven Hofmeyr 3 , Krste Asanovic 1 , John Kubiatowicz 1 1 Parallel Computing Laboratory, UC Berkeley 2 Data Domain 3 Lawrence Berkeley National Laboratory

Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Embed Size (px)

Citation preview

Page 1: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Tessellation: Space-Time Partitioning in a Manycore Client OS

Rose Liu1,2, Kevin Klues1, Sarah Bird1, Steven Hofmeyr3, Krste Asanovic1, John Kubiatowicz1

1Parallel Computing Laboratory, UC Berkeley2Data Domain 3Lawrence Berkeley National Laboratory

Page 2: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Client Device

Single-user device Runs a heterogeneous mix of interactive, real-time and

batch applications simultaneously Generally battery constrained

Page 3: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Why a new Client OS? Enter the Manycore world Must address

parallelism Current client OSs weren’t designed for parallel

applications Existing OSs addressing parallelism targets

servers or HPC contexts, not clients Servers – emphasis on throughput vs. Client – emphasis on user experience/responsiveness HPC – machine dedicated to one parallel application vs. Client – runs many heterogeneous parallel applications Client - Longer battery life

Page 4: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Outline Why a new OS for Manycore Clients? A Case for Space-time Partitioning

Define space-time partitioning Use cases for space-time partitioning

Implementing Space-Time Partitioning in a Manycore OS

Status

Page 5: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Spatial Partitions

5

Memory

Radio

Isolated unit containing a subset of physical machine resources

Page 6: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Spatial Partitions

6

Memory

Radio

Isolated unit containing a subset of physical machine resources

Page 7: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Spatial Partitions

7

Memory

Radio

Isolated unit containing a subset of physical machine resources

Page 8: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Spatial Partitions

8

Memory

Radio

Isolated unit containing a subset of physical machine resources

QoS enforcedshare ofinterconnect bandwidth

Page 9: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Spatial Partitions

9

Memory

Radio

Isolated unit containing a subset of physical machine resources

Energy or PowerBudget

Page 10: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Machine divided into spatial partitions

10

Wirelessradio

Memory

Page 11: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Put applications in spatial partitions

11

Radio

Memory

Media Player

Browser

Page 12: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Benefits of spatial partitions

12

Radio

Memory

Media Player

Browser

• Each app can run a custom user-level runtime for best performance• Provides apps with resource guarantees for performance predictability• Functional & Performance Isolation

• Natural unit for fault containment, energy management

Page 13: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Put OS Services in spatial partitions

13

Wirelessradio

Memory

Media PlayerNetworkDriver

Filesystem

Browser

Page 14: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Put sub-components in spatialpartitions

14

Wirelessradio

Memory

Media Player NetworkDriver

Filesystem

Browser

Video decoder GUI

Page 15: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Put virtual machines in spatial partitions

15

Wirelessradio

Memory

Media Player NetworkDriver

Filesystem

Browser

Video decoder GUI

WindowsVM

Page 16: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Partitions need to communicate

16

Wirelessradio

Memory

Media Player NetworkDriver

Filesystem

Browser

Video decoder GUI

WindowsVM

Spatial Communicationoccurs without a context switch

Page 17: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Communication Challenges

17

Wirelessradio

Memory

Media Player NetworkDriver

Filesystem

Browser

Video decoder GUI

WindowsVM

Communication relaxes the isolation boundaries of partitions andintroduces issues like:• Security• Service-level QoS and/or resource accounting of requestors within service partitions

Page 18: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Space-time partitioning virtualizes spatial partitions

18

Wirelessradio

Memory

Media Player NetworkDriver

Filesystem

Browser

Video decoder GUI

WindowsVM

De-scheduled Partitions

• Partition Context SwitchCost ~ Process ContextSwitch Cost• Time multiplex at a coarse granularity to allow for user-level scheduling

Page 19: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Space-Time Partition Scheduling

Time

Partition resourcesput in low power state

DescheduledPartitions:

Real-time appis always scheduled

Partitions are dynamically resized while running without a reboot or application restart

Page 20: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Space-Time Partition Scheduling

Time

DescheduledPartitions:

Challenges:1. How to determine the right resource allocation for a partition?

2. What granularity to time multiplex each partition? Don’t need to use same time quanta

for all partitions.

3. We can deschedule partitions from each type of resource independently. E.g. time multiplex off cores more frequently than multiplex partition data off caches. How to determine ‘best’ policy?

Partitions are dynamically resized while running without a reboot or application restart

Page 21: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Communication in space and time

21

Wirelessradio

Memory

Media Player NetworkDriver

Filesystem

Browser

Video decoder GUI

WindowsVM

De-scheduled Partitions

Page 22: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Outline Why a new OS for Manycore Clients? A Case for Space-time Partitioning Implementing Space-Time Partitioning in a

Manycore OS (Tessellation) Status

Page 23: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Tessellation OS

23

Wirelessradio

Memory

Media Player NetworkDriver

Filesystem

Browser

Video decoder GUI

WindowsVM

De-scheduled Partitions

VideoDriver

VirusChecker

USB Driver

Page 24: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Tessellation Kernel

24

Hardware Partitioning Mechanisms

CPUsPhysical Memory

InterconnectBandwidth

CachePerformance

Counters

ApplicationOr

OS Service

CustomScheduler

Library OS Functionality

MessagePassing

Page 25: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Tessellation Kernel

25

Hardware Partitioning Mechanisms

CPUsPhysical Memory

InterconnectBandwidth

CachePerformance

Counters

ApplicationOr

OS Service

CustomScheduler

Library OS Functionality

MessagePassing

Marshalls syscalls into messages for the respective OS Service Partition

App-specific scheduler for best parallel performance. (See Lithe talk on user-levelscheduling.)

Page 26: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Tessellation Kernel

26

Tessellatio

nK

ernel

Hardware Partitioning Mechanisms

CPUsPhysical Memory

InterconnectBandwidth

CachePerformance

Counters

ApplicationOr

OS Service

CustomScheduler

Library OS Functionality

MessagePassing

Page 27: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Tessellation Kernel

27

Tessellatio

nK

ernel

Partition Management

Layer

Hardware Partitioning Mechanisms

CPUsPhysical Memory

InterconnectBandwidth

CachePerformance

Counters

Partition Mechanism

Layer(Trusted)

ApplicationOr

OS Service

CustomScheduler

Library OS Functionality

MessagePassing

Page 28: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Partition Mechanism Layer

28

Tessellatio

nK

ernel

Partition Management

Layer

Hardware Partitioning Mechanisms

CPUsPhysical Memory

InterconnectBandwidth

CachePerformance

Counters

Partition Mechanism

Layer(Trusted)

ApplicationOr

OS Service

CustomScheduler

Library OS Functionality

Configure Partition Resources enforced by

HW at runtime

MessagePassing

Page 29: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Partition Mechanism Layer

29

Tessellatio

nK

ernel

Partition Management

Layer

Hardware Partitioning Mechanisms

CPUsPhysical Memory

InterconnectBandwidth

CachePerformance

Counters

Partition Mechanism

Layer(Trusted)

ApplicationOr

OS Service

CustomScheduler

Library OS Functionality

ConfigureHW-supportedCommunication

MessagePassing

Configure Partition Resources enforced by

HW at runtime

Page 30: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Partition Management Layer

30

Tessellatio

nK

ernel

Partition Management

Layer

Hardware Partitioning Mechanisms

CPUsPhysical Memory

InterconnectBandwidth

CachePerformance

Counters

Partition Mechanism

Layer(Trusted)

ApplicationOr

OS Service

CustomScheduler

Library OS Functionality

ConfigureHW-supportedCommunication

MessagePassing

Configure Partition Resources enforced by

HW at runtime

PartitionAllocator

Page 31: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Partition Management Layer

31

Tessellatio

nK

ernel

Partition Management

Layer

Hardware Partitioning Mechanisms

CPUsPhysical Memory

InterconnectBandwidth

CachePerformance

Counters

Partition Mechanism

Layer(Trusted)

ApplicationOr

OS Service

CustomScheduler

Library OS Functionality

ConfigureHW-supportedCommunication

MessagePassing

Configure Partition Resources enforced by

HW at runtime

PartitionAllocator

PartitionResizing

Callback API

Page 32: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Partition Management Layer

32

Tessellatio

nK

ernel

Partition Management

Layer

Hardware Partitioning Mechanisms

CPUsPhysical Memory

InterconnectBandwidth

CachePerformance

Counters

Partition Mechanism

Layer(Trusted)

ApplicationOr

OS Service

CustomScheduler

Library OS Functionality

ConfigureHW-supportedCommunication

MessagePassing

Configure Partition Resources enforced by

HW at runtime

PartitionAllocator

PartitionResizing

Callback API

Res.Reqs.

Page 33: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Partition Management Layer

33

Tessellatio

nK

ernel

Partition Management

Layer

Hardware Partitioning Mechanisms

CPUsPhysical Memory

InterconnectBandwidth

CachePerformance

Counters

Partition Mechanism

Layer(Trusted)

ApplicationOr

OS Service

CustomScheduler

Library OS Functionality

ConfigureHW-supportedCommunication

MessagePassing

Configure Partition Resources enforced by

HW at runtime

PartitionAllocator

PartitionScheduler

CommReqs

PartitionResizing

Callback API

Res.Reqs.

Page 34: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Partition Management Layer

34

Tessellatio

nK

ernel

Partition Management

Layer

Hardware Partitioning Mechanisms

CPUsPhysical Memory

InterconnectBandwidth

CachePerformance

Counters

Partition Mechanism

Layer(Trusted)

ApplicationOr

OS Service

CustomScheduler

Library OS Functionality

ConfigureHW-supportedCommunication

MessagePassing

Configure Partition Resources enforced by

HW at runtime

PartitionAllocator

PartitionScheduler

Comm.Reqs

SchedReqs.

PartitionResizing

Callback API

Res.Reqs.

Page 35: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Outline Why a new OS for Manycore Clients? A Case for Space-time Partitioning

Define space-time partitioning Use cases for space-time partitioning

Implementing Space-Time Partitioning in a Manycore OS

Status

Page 36: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Implementation status Basics of Tessellation kernel and primitive OS

service up and running Provides rudimentary partition interface Boots on standard x86 hardware No I/O yet – statically linked applications and kernel

TOSOS

Services

UserApp 0

UserApp 1

Manycore HW

Tesselation Kernel

Page 37: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Build fast cross-core communication mechanisms for system calls Context-switch free system calls APIC driven message notification with shared memory

Add support for the 19 newLib system calls in TOS OS Service partition

TOSOS

Services

UserApp 0

UserApp 1

Next Steps

Syscall

Syscall

Newlib C Newlib C

Page 38: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Intermediate Infrastructure

ExistingI/O

Drivers

I/O Server Process

TOS OS Service doesn’t have all drivers, so run BSD with existing drivers on one core to service I/O from TOS OS Service

Tessellation runs on rest of the cores

TOSOS

Service

UserApp 0

UserApp 1

Manycore HW

Syscall

Syscall

BSDKernel

Newlib C Newlib C

PinnedSharedMemoryChannel

Page 39: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Acknowledgements We would like to thank the entire ParLab OS group

and several people at LBNL for their invaluable contribution to the ideas presented here.

Research supported by Microsoft Award #024263 and Intel Award #024894 and by matching funding from U.C. Discovery (Award #DIG07-102270).

This work has also been in part supported by an NSF Graduate Research Fellowship.

Page 40: Tessellation: Space-Time Partitioning in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz

Thanks! Questions?

40

Wirelessradio

Memory

Media Player NetworkDriver

Filesystem

Browser

Video decoder GUI

WindowsVM

De-scheduled Partitions