Fiji Priority Rollback Protocol Lukasz Ziarek Fiji Systems Inc. - - PowerPoint PPT Presentation

fiji priority rollback protocol
SMART_READER_LITE
LIVE PREVIEW

Fiji Priority Rollback Protocol Lukasz Ziarek Fiji Systems Inc. - - PowerPoint PPT Presentation

Fiji Priority Rollback Protocol Lukasz Ziarek Fiji Systems Inc. Filip Pizlo, Ethan Blanton, and Jan Vitek Fiji Systems LLC Wednesday, August 18, 2010 Communication between mixed-criticality partitions Situational Awareness Flight System


slide-1
SLIDE 1

Fiji

Systems LLC

Fiji Priority Rollback Protocol

Lukasz Ziarek Fiji Systems Inc. Filip Pizlo, Ethan Blanton, and Jan Vitek

Wednesday, August 18, 2010

slide-2
SLIDE 2

Fiji

Systems LLC

Communication between mixed-criticality partitions

Flight System Situational Awareness

Wednesday, August 18, 2010

slide-3
SLIDE 3

Fiji

Systems LLC

Communication between mixed-criticality partitions

Flight System Situational Awareness M i d d l e w a r e

Wednesday, August 18, 2010

slide-4
SLIDE 4

Fiji

Systems LLC

Communication between mixed-criticality partitions

Flight System Situational Awareness M i d d l e w a r e package data

Wednesday, August 18, 2010

slide-5
SLIDE 5

Fiji

Systems LLC

Communication between mixed-criticality partitions

Flight System Situational Awareness M i d d l e w a r e send data

Wednesday, August 18, 2010

slide-6
SLIDE 6

Fiji

Systems LLC

Communication between mixed-criticality partitions

Flight System Situational Awareness M i d d l e w a r e unpack data

Wednesday, August 18, 2010

slide-7
SLIDE 7

Fiji

Systems LLC

Communication between mixed-criticality partitions

Flight System Situational Awareness M i d d l e w a r e

airspace data structure

update shared state

Wednesday, August 18, 2010

slide-8
SLIDE 8

Fiji

Systems LLC

Communication between mixed-criticality partitions

Flight System Situational Awareness M i d d l e w a r e

airspace data structure

typically a communication protocol

Wednesday, August 18, 2010

slide-9
SLIDE 9

Fiji

Systems LLC

Communication between mixed-criticality partitions

Flight System Situational Awareness

airspace data structure

Wednesday, August 18, 2010

slide-10
SLIDE 10

Fiji

Systems LLC

Communication between mixed-criticality partitions

Flight System Situational Awareness

airspace data structure

can we allow direct access?

Wednesday, August 18, 2010

slide-11
SLIDE 11

Fiji

Systems LLC

Communication between mixed-criticality partitions

Flight System Situational Awareness

airspace data structure

mediate access via a lock

Wednesday, August 18, 2010

slide-12
SLIDE 12

Fiji

Systems LLC

Communication between mixed-criticality partitions

Flight System Situational Awareness

airspace data structure

how do we guarantee responsiveness of higher criticality partitions?

Wednesday, August 18, 2010

slide-13
SLIDE 13

Fiji

Systems LLC

Communication between mixed-criticality partitions

Flight System Situational Awareness

airspace data structure

Wednesday, August 18, 2010

slide-14
SLIDE 14

Fiji

Systems LLC

Communication between mixed-criticality partitions

Flight System Situational Awareness

airspace data structure

gate call PRP lock

Wednesday, August 18, 2010

slide-15
SLIDE 15

Fiji

Systems LLC

Communication between mixed-criticality partitions

Flight System Situational Awareness

airspace data structure

gate call PRP lock PRP allows for priority aware, criticality aware, safe, reliable, shared memory between partitions

Wednesday, August 18, 2010

slide-16
SLIDE 16

Fiji

Systems LLC

PRP Locks

Flight System’s partition is guaranteed fast Bound on preemption based on data structure size Situational awareness' partition access is slightly slower but is still bounded in time

Wednesday, August 18, 2010

slide-17
SLIDE 17

Fiji

Systems LLC

Inspiration from Transactions

Atomic replacement for locks Automatic serializability detection Runtime monitoring Aborts - ability to rollback

Wednesday, August 18, 2010

slide-18
SLIDE 18

Fiji

Systems LLC

Inspiration from Transactions

Atomic replacement for locks Automatic serializability detection Runtime monitoring Aborts - ability to rollback

New programming model

Wednesday, August 18, 2010

slide-19
SLIDE 19

Fiji

Systems LLC

Inspiration from Transactions

Atomic replacement for locks Automatic serializability detection Runtime monitoring Aborts - ability to rollback

New programming model Unpredictable

Wednesday, August 18, 2010

slide-20
SLIDE 20

Fiji

Systems LLC

Inspiration from Transactions

Atomic replacement for locks Automatic serializability detection Runtime monitoring Aborts - ability to rollback

New programming model Unpredictable

Wednesday, August 18, 2010

slide-21
SLIDE 21

Fiji

Systems LLC

Inspiration from Transactions

Atomic replacement for locks Automatic serializability detection Runtime monitoring Aborts - ability to rollback

New programming model Unpredictable

Wednesday, August 18, 2010

slide-22
SLIDE 22

Fiji

Systems LLC

PRP: Two Options

Write Buffering All updates buffered : memory is always consistent Write Logging Updates to shared memory : undo log allows reversion to consistent state of memory

Wednesday, August 18, 2010

slide-23
SLIDE 23

Fiji

Systems LLC

Write Buffering

synchronized(lock){ foo.a = x; foo.b = y; foo.c = z; foo.a = w; if(foo.b+4 > foo.a) ... }

Wednesday, August 18, 2010

slide-24
SLIDE 24

Fiji

Systems LLC

Write Buffering

synchronized(lock){ foo.a = x; foo.b = y; foo.c = z; foo.a = w; if(foo.b+4 > foo.a) ... }

lock set to acquired

in WB mode Buffer

Wednesday, August 18, 2010

slide-25
SLIDE 25

Fiji

Systems LLC

Write Buffering

synchronized(lock){ foo.a = x; foo.b = y; foo.c = z; foo.a = w; if(foo.b+4 > foo.a) ... }

lock set to acquired

in WB mode Buffer

foo.a , x

Wednesday, August 18, 2010

slide-26
SLIDE 26

Fiji

Systems LLC

Write Buffering

synchronized(lock){ foo.a = x; foo.b = y; foo.c = z; foo.a = w; if(foo.b+4 > foo.a) ... }

lock set to acquired

in WB mode Buffer

foo.a , x foo.b , y

Wednesday, August 18, 2010

slide-27
SLIDE 27

Fiji

Systems LLC

Write Buffering

synchronized(lock){ foo.a = x; foo.b = y; foo.c = z; foo.a = w; if(foo.b+4 > foo.a) ... }

lock set to acquired

in WB mode Buffer

foo.a , x foo.b , y foo.c , z

Wednesday, August 18, 2010

slide-28
SLIDE 28

Fiji

Systems LLC

Write Buffering

synchronized(lock){ foo.a = x; foo.b = y; foo.c = z; foo.a = w; if(foo.b+4 > foo.a) ... }

lock set to acquired

in WB mode Buffer

foo.a , x foo.b , y foo.c , z foo.a , w

Wednesday, August 18, 2010

slide-29
SLIDE 29

Fiji

Systems LLC

Write Buffering

synchronized(lock){ foo.a = x; foo.b = y; foo.c = z; foo.a = w; if(foo.b+4 > foo.a) ... }

lock set to acquired

in WB mode Buffer

foo.a , x foo.b , y foo.c , z foo.a , w

Wednesday, August 18, 2010

slide-30
SLIDE 30

Fiji

Systems LLC

Write Buffering

synchronized(lock){ foo.a = x; foo.b = y; foo.c = z; foo.a = w; if(foo.b+4 > foo.a) ... }

lock set to acquired

in WB mode Buffer

foo.a , x foo.b , y foo.c , z foo.a , w

Wednesday, August 18, 2010

slide-31
SLIDE 31

Fiji

Systems LLC

Write Buffering

synchronized(lock){ foo.a = x; foo.b = y; foo.c = z; foo.a = w; if(foo.b+4 > foo.a) ... }

lock set to acquired

in WB mode Buffer

foo.a , x foo.b , y foo.c , z foo.a , w

Wednesday, August 18, 2010

slide-32
SLIDE 32

Fiji

Systems LLC

Write Buffering

synchronized(lock){ foo.a = x; foo.b = y; foo.c = z; foo.a = w; if(foo.b+4 > foo.a) ... }

lock set to acquired

in WB mode Buffer

foo.a , x foo.b , y foo.c , z foo.a , w

Wednesday, August 18, 2010

slide-33
SLIDE 33

Fiji

Systems LLC

Write Buffering

synchronized(lock){ foo.a = x; foo.b = y; foo.c = z; foo.a = w; if(foo.b+4 > foo.a) ... }

lock set to acquired

in WB mode Buffer

foo.a , x foo.b , y foo.c , z foo.a , w

Wednesday, August 18, 2010

slide-34
SLIDE 34

Fiji

Systems LLC

Write Buffering

synchronized(lock){ foo.a = x; foo.b = y; foo.c = z; foo.a = w; if(foo.b+4 > foo.a) ... }

lock set to acquired

in WB mode Buffer

foo.a , x foo.b , y foo.c , z foo.a , w

Wednesday, August 18, 2010

slide-35
SLIDE 35

Fiji

Systems LLC

Write Buffering

synchronized(lock){ foo.a = x; foo.b = y; foo.c = z; foo.a = w; if(foo.b+4 > foo.a) ... }

lock set to acquired

in WB mode Buffer

foo.a , x foo.b , y foo.c , z foo.a , w

Wednesday, August 18, 2010

slide-36
SLIDE 36

Fiji

Systems LLC

Write Buffering

synchronized(lock){ foo.a = x; foo.b = y; foo.c = z; foo.a = w; if(foo.b+4 > foo.a) ... }

lock set to acquired

in WB mode Buffer

foo.a , x foo.b , y foo.c , z foo.a , w

Commit

Wednesday, August 18, 2010

slide-37
SLIDE 37

Fiji

Systems LLC

Write Buffering

synchronized(lock){ foo.a = x; foo.b = y; foo.c = z; foo.a = w; if(foo.b+4 > foo.a) ... }

lock set to acquired

in WB mode Buffer

foo.a , x foo.b , y foo.c , z foo.a , w

Commit Set lock mode to commit

Wednesday, August 18, 2010

slide-38
SLIDE 38

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , x foo.b , y foo.c , z foo.a , w lock

High Priority Thread WB

Wednesday, August 18, 2010

slide-39
SLIDE 39

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , x foo.b , y foo.c , z foo.a , w lock

High Priority Thread WB

Wednesday, August 18, 2010

slide-40
SLIDE 40

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , x foo.b , y foo.c , z foo.a , w lock

High Priority Thread WB

Wednesday, August 18, 2010

slide-41
SLIDE 41

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , x foo.b , y foo.c , z foo.a , w lock

High Priority Thread WB

Wednesday, August 18, 2010

slide-42
SLIDE 42

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , x foo.b , y foo.c , z foo.a , w lock

High Priority Thread WB

Wednesday, August 18, 2010

slide-43
SLIDE 43

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , x foo.b , y foo.c , z foo.a , w lock

High Priority Thread WB High Priority Thread Acquires Lock No priority boosting!

Wednesday, August 18, 2010

slide-44
SLIDE 44

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , x foo.b , y foo.c , z foo.a , w lock

High Priority Thread Commit Main Memory

Wednesday, August 18, 2010

slide-45
SLIDE 45

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , x foo.b , y foo.c , z foo.a , w lock

High Priority Thread Commit Main Memory

Wednesday, August 18, 2010

slide-46
SLIDE 46

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , x foo.b , y foo.c , z foo.a , w lock

High Priority Thread Commit Main Memory

Wednesday, August 18, 2010

slide-47
SLIDE 47

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , x foo.b , y foo.c , z foo.a , w lock

High Priority Thread Commit Main Memory Boost low priority thread

Wednesday, August 18, 2010

slide-48
SLIDE 48

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , x foo.b , y foo.c , z foo.a , w lock

High Priority Thread Commit Main Memory Boost low priority thread

Wednesday, August 18, 2010

slide-49
SLIDE 49

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , x foo.b , y foo.c , z foo.a , w lock

High Priority Thread Commit Main Memory Boost low priority thread

Wednesday, August 18, 2010

slide-50
SLIDE 50

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , x foo.b , y foo.c , z foo.a , w lock

High Priority Thread Commit Main Memory Boost low priority thread

Wednesday, August 18, 2010

slide-51
SLIDE 51

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , x foo.b , y foo.c , z foo.a , w lock

High Priority Thread Commit Main Memory Boost low priority thread

Wednesday, August 18, 2010

slide-52
SLIDE 52

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , x foo.b , y foo.c , z foo.a , w lock

High Priority Thread Commit Main Memory Boost low priority thread

Wednesday, August 18, 2010

slide-53
SLIDE 53

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , x foo.b , y foo.c , z foo.a , w lock

High Priority Thread Commit Main Memory Boost low priority thread

Wednesday, August 18, 2010

slide-54
SLIDE 54

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , x foo.b , y foo.c , z foo.a , w lock

High Priority Thread Commit Main Memory Boost low priority thread

Wednesday, August 18, 2010

slide-55
SLIDE 55

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , x foo.b , y foo.c , z foo.a , w lock

High Priority Thread Commit Main Memory High Priority Thread Acquires Lock Boost low priority thread

Wednesday, August 18, 2010

slide-56
SLIDE 56

Fiji

Systems LLC

Complexity Costs - Write Buffering Low Priority Thread

Reads: log(size of buffer) --- use RB tree Writes: log(size of buffer) Commit: size of buffer -- nested commit: n log(n) Acquisition: constant if thread not flushing buffer, size of buffer + context switches otherwise Memory: size of buffer

Wednesday, August 18, 2010

slide-57
SLIDE 57

Fiji

Systems LLC

Write Logging

synchronized(lock){ foo.a = x; foo.b = y; foo.c = z; foo.a = w; if(foo.b+4 > foo.a) ... } Main Memory

foo.a foo.b foo.c

Wednesday, August 18, 2010

slide-58
SLIDE 58

Fiji

Systems LLC

Write Logging

synchronized(lock){ foo.a = x; foo.b = y; foo.c = z; foo.a = w; if(foo.b+4 > foo.a) ... }

lock set to acquired

in WL mode Log Main Memory

foo.a foo.b foo.c

Wednesday, August 18, 2010

slide-59
SLIDE 59

Fiji

Systems LLC

Write Logging

synchronized(lock){ foo.a = x; foo.b = y; foo.c = z; foo.a = w; if(foo.b+4 > foo.a) ... }

lock set to acquired

in WL mode Log

foo.a , 1

Main Memory

foo.a foo.b foo.c

Wednesday, August 18, 2010

slide-60
SLIDE 60

Fiji

Systems LLC

Write Logging

synchronized(lock){ foo.a = x; foo.b = y; foo.c = z; foo.a = w; if(foo.b+4 > foo.a) ... }

lock set to acquired

in WL mode Log

foo.a , 1 foo.b , 2

Main Memory

foo.a foo.b foo.c

Wednesday, August 18, 2010

slide-61
SLIDE 61

Fiji

Systems LLC

Write Logging

synchronized(lock){ foo.a = x; foo.b = y; foo.c = z; foo.a = w; if(foo.b+4 > foo.a) ... }

lock set to acquired

in WL mode Log

foo.a , 1 foo.b , 2 foo.c , 3

Main Memory

foo.a foo.b foo.c

Wednesday, August 18, 2010

slide-62
SLIDE 62

Fiji

Systems LLC

Write Logging

synchronized(lock){ foo.a = x; foo.b = y; foo.c = z; foo.a = w; if(foo.b+4 > foo.a) ... }

lock set to acquired

in WL mode Log

foo.a , 1 foo.b , 2 foo.c , 3 foo.a , x

Main Memory

foo.a foo.b foo.c

Wednesday, August 18, 2010

slide-63
SLIDE 63

Fiji

Systems LLC

Write Logging

synchronized(lock){ foo.a = x; foo.b = y; foo.c = z; foo.a = w; if(foo.b+4 > foo.a) ... }

lock set to acquired

in WL mode Log

foo.a , 1 foo.b , 2 foo.c , 3 foo.a , x

Main Memory

foo.a foo.b foo.c

Wednesday, August 18, 2010

slide-64
SLIDE 64

Fiji

Systems LLC

Write Logging

synchronized(lock){ foo.a = x; foo.b = y; foo.c = z; foo.a = w; if(foo.b+4 > foo.a) ... }

lock set to acquired

in WL mode Log

foo.a , 1 foo.b , 2 foo.c , 3 foo.a , x

Main Memory

foo.a foo.b foo.c

Wednesday, August 18, 2010

slide-65
SLIDE 65

Fiji

Systems LLC

Write Logging

synchronized(lock){ foo.a = x; foo.b = y; foo.c = z; foo.a = w; if(foo.b+4 > foo.a) ... }

lock set to acquired

in WL mode Log

foo.a , 1 foo.b , 2 foo.c , 3 foo.a , x

Main Memory

foo.a foo.b foo.c

Commit

Wednesday, August 18, 2010

slide-66
SLIDE 66

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , 1 foo.b , 2 foo.c , 3 foo.a , x lock

High Priority Thread WL Main Memory

Wednesday, August 18, 2010

slide-67
SLIDE 67

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , 1 foo.b , 2 foo.c , 3 foo.a , x lock

High Priority Thread WL Main Memory

Wednesday, August 18, 2010

slide-68
SLIDE 68

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , 1 foo.b , 2 foo.c , 3 foo.a , x lock

High Priority Thread WL Main Memory

Wednesday, August 18, 2010

slide-69
SLIDE 69

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , 1 foo.b , 2 foo.c , 3 foo.a , x lock

High Priority Thread WL Main Memory Boost low priority thread

Wednesday, August 18, 2010

slide-70
SLIDE 70

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , 1 foo.b , 2 foo.c , 3 foo.a , x lock

High Priority Thread WL Main Memory Boost low priority thread

Wednesday, August 18, 2010

slide-71
SLIDE 71

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , 1 foo.b , 2 foo.c , 3 foo.a , x lock

High Priority Thread WL Main Memory Boost low priority thread

Wednesday, August 18, 2010

slide-72
SLIDE 72

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , 1 foo.b , 2 foo.c , 3 foo.a , x lock

High Priority Thread WL Main Memory Boost low priority thread

Wednesday, August 18, 2010

slide-73
SLIDE 73

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , 1 foo.b , 2 foo.c , 3 foo.a , x lock

High Priority Thread WL Main Memory Boost low priority thread

Wednesday, August 18, 2010

slide-74
SLIDE 74

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , 1 foo.b , 2 foo.c , 3 foo.a , x lock

High Priority Thread WL Main Memory Boost low priority thread

Wednesday, August 18, 2010

slide-75
SLIDE 75

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , 1 foo.b , 2 foo.c , 3 foo.a , x lock

High Priority Thread WL Main Memory Boost low priority thread

Wednesday, August 18, 2010

slide-76
SLIDE 76

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , 1 foo.b , 2 foo.c , 3 foo.a , x lock

High Priority Thread WL Main Memory Boost low priority thread

Wednesday, August 18, 2010

slide-77
SLIDE 77

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , 1 foo.b , 2 foo.c , 3 foo.a , x lock

High Priority Thread WL Main Memory Boost low priority thread

Wednesday, August 18, 2010

slide-78
SLIDE 78

Fiji

Systems LLC

Acquisition by higher priority thread

foo.a , 1 foo.b , 2 foo.c , 3 foo.a , x lock

High Priority Thread WL Main Memory High Priority Thread Acquires Lock Boost low priority thread

Wednesday, August 18, 2010

slide-79
SLIDE 79

Fiji

Systems LLC

Complexity Costs - Write Logging Low Priority Thread

Reads: constant Writes: read + log(size of write log) Commit: constant Acquisition: size of write log + context switches Memory: size of write log

Wednesday, August 18, 2010

slide-80
SLIDE 80

Fiji

Systems LLC

Questions?

Wednesday, August 18, 2010