+ All Categories
Home > Documents > Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter...

Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter...

Date post: 20-Aug-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
29
Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19
Transcript
Page 1: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

Data-centric OSesNVM and the Death of the Process

Daniel Bittman Peter Alvaro Ethan Miller

UC Santa Cruz

1

HPTS ‘19

Page 2: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

Data-centric OSesNVM and the Death of the Process

Daniel Bittman Peter Alvaro Ethan Miller

UC Santa Cruz

2

HPTS ‘19

Page 3: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

3

Pers

iste

nt M

emor

y

Applications

CPUs

Operating Systems

Page 4: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

Hardware Trends

4

~1-10 ms

sys_read

~300 ns ~1 us

Growing, becoming persistent Outdated interface Cannot compute on directly

Persistent data should be operated on directly and like memory

(artistic rendering;actual implementation may vary)

Page 5: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

Hardware Trends

Multiplicity of Computing Devices and Heterogeneous Memory

ARM

5

Page 6: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

Hardware’s Needs vs. Software’s Needs

Consideration Hardware Software

Latency ✓ ✓In-memory Data Structures X ✓

Data Lifetime and Persistent Data References X ✓

Memory Heterogeneity and Data Movement ✓ X

6

Page 7: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

Heterogeneity and Autonomy

NIC FPGA

Access data A

Access data A

DRAM BNVM

7

Page 8: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

Data Movement

NIC FPGA

Access data A

Move data A

DRAM BNVM

8

Page 9: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

In short...

Software cares about long-lived data relationships,

even across program runs.

Hardware must provide consistent data access, even

if it moves in memory.

9

Virtual memory is the wrong abstraction. Virtual memory is fine.

Software is easier to change than hardware

Page 10: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

Twizzler: A new OS

Operating systems

Operating systems

The kernel is “out of the way”

Presents a unified interface for data sharing, security, and persistent pointers

10

Page 11: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

11

OS Community DB Community

Page 12: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

The Death of the Process

12

Virtual address space

Threads

Kernel stateSecurity role

Page 13: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

A global object space

13

A B

An object is a unit of semantically similar information

E.g. a b-tree, or part of one.

Persistent data should be operated on directly and like memory

Page 14: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

A global object space

14

A B

An object is a unit of semantically similar information

E.g. a b-tree, or part of one.

Pointers may be cross-object: referring to data within a different object

Persistent data should be operated on directly and like memory

Page 15: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

Persistent pointers in Twizzler

A B

C AB

Process 1

Process 2 A B

object-id offset

15

Virtual addresses are the wrong abstraction

Page 16: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

Twizzler’s pointers

FOT entry offset

64-bits

FOT Data

Object Layout

object ID or Name Name Resolver flags

Foreign Object Table

object ID or Name Name Resolver flags

1

2...

16

Page 17: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

Example pointer resolution

1 <offset>

1 A rw-

2 B r--

O

FOT

A

FOT entry of >0 means “cross-object”—points to a different object.

17

Page 18: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

Pointer implementation

O A

O’s FOT1 → A

int *tmp0 = lea(O, ptr0);

int *tmp1 = lea(O, ptr1);

x = *tmp1; y = *tmp0;

0 <off>ptr0

1 <off>ptr1

T *lea(object, T *)Convert a persistent pointer into a virtual address

18

Page 19: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

Two-level Mapping

19

Object Ar-x

Object Brw-

Object Arwx

Object Br--

Object Cr--

X

Virtual Space

ObjectSpace

PhysicalMemory

DRAM NVRAM

Security Contexts!

n+m page tables!(instead of n*m)

Page 20: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

Hey look it’s a Venn Diagram

20

PersistentPointers

PMDK

Twizzler

Data sharing

Security model

Page 21: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

Benchmark: SQLite, throughput

21

TWZ

Page 22: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

Benchmark: SQLite, latency

22

TWZ

Page 23: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

Takeaways - 1

23

We need to consider persistent memory

programming in the context of sharing and security

PersistentPointers

PMDK

Twizzler

Data sharing

Security model

Page 24: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

Takeaways - 2

24

A flexible persistent pointer design enables sharing,

upgrades, and late-binding

FOT entry offset

64-bits

FOT Data

Object Layout

object ID or Name Name Resolver flags

Foreign Object Table

object ID or Name Name Resolver flags

1

2...

Page 25: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

Takeaways - 3

25

We are building Twizzler to explore new programming models for NVM

We must evolve our storage models for new technology

Page 26: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

Thank You!questions / discussion

Daniel [email protected]

@danielbittman

Peter [email protected]

Ethan L. [email protected]

26

Page 27: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

Case Study: KVS

27

Index Data

Lookup returns direct pointers

250 lines of simple C code is all you need

lookup(key)bucket = get_bucket(key)item.ptr = lea(Index, bucket.ptr)item.len = bucket.len

insert(key, value)bucket = get_bucket(key)bucket.ptr = store(Index, value.ptr)bucket.len = value.len

(store is the reverse of lea: convert a virtual address into a persistent pointer)

Page 28: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

Cast Study: KVS

28

Data2

Index

Data1

bucket = get_bucket(key)item.ptr = lea(Index, bucket.ptr)item.len = bucket.len

Add access control to the existing design

r--

---

Index points to different data objects with different access control.

Can hand out pointers to these objects, which can only be dereferenced with proper permissions.

Page 29: Data-centric OSes - HPTS · Data-centric OSes NVM and the Death of the Process Daniel Bittman Peter Alvaro Ethan Miller UC Santa Cruz 1 HPTS ‘19. Data ... even across program runs.

Late-binding of access control

29

User Database

rw-

User manager

User Database

r--

User manager

Super user Normal user


Recommended