Using Lo Using Lock Ser k Server ers t s to Sc Scale ale Re - - PowerPoint PPT Presentation

using lo using lock ser k server ers t s to sc scale ale
SMART_READER_LITE
LIVE PREVIEW

Using Lo Using Lock Ser k Server ers t s to Sc Scale ale Re - - PowerPoint PPT Presentation

Using Lo Using Lock Ser k Server ers t s to Sc Scale ale Re Real- -Time Locking Pro rotocols: Chasing Ever-Increasing Core Counts C ATHERINE E. N EMITZ , T ANYA A MERT ,


slide-1
SLIDE 1

Using ¡Lo Using ¡Lock ¡Ser k ¡Server ers ¡t s ¡to ¡Sc ¡Scale ¡ ale ¡ Re Real-­‑

  • ­‑Time ¡

¡Locking ¡ ¡Pro rotocols: ¡

¡

Chasing ¡Ever-­‑Increasing ¡Core ¡Counts

CATHERINE ¡E. ¡NEMITZ, ¡TANYA ¡AMERT, ¡JAMES ¡H. ¡ANDERSON

slide-2
SLIDE 2

ContenIon-­‑SensiIve ¡Access

2 ¡

1 ¡

A ¡ B ¡ &me ¡

7 ¡ 2 ¡ 8 ¡ 3 ¡ 6 ¡ 5 ¡ 4 ¡ 7 ¡

A ¡ B ¡

1 ¡ 8 ¡ 6 ¡ 3 ¡ 5 ¡ 4 ¡ 2 ¡ 8 ¡

blocking ¡ ? ¡ ? ¡

  • verhead ¡

C6 ¡= ¡5 ¡ C8 ¡= ¡1 ¡ C8 ¡= ¡2 ¡

8 ¡

slide-3
SLIDE 3

Using ¡Lo Using ¡Lock ¡Ser k ¡Server ers ¡t s ¡to ¡Sc ¡Scale ¡ ale ¡ Re Real-­‑

  • ­‑Time ¡

¡Locking ¡ ¡Pro rotocols: ¡

¡

Chasing ¡Ever-­‑Increasing ¡Core ¡Counts

3 ¡

slide-4
SLIDE 4

Challenge: ¡Blocking ¡Chains

4 ¡

A ¡ B ¡ C ¡ D ¡

# ¡of ¡processors: ¡

m=4 ¡

Processing ¡capacity ¡lost: ¡ ¡

75% ¡ E ¡

slide-5
SLIDE 5

Challenge: ¡Blocking ¡Chains

4 ¡

A ¡ B ¡ C ¡ D ¡

# ¡of ¡processors: ¡

m=4 ¡

Processing ¡capacity ¡lost: ¡ ¡

75% ¡ E ¡

slide-6
SLIDE 6

Challenge: ¡Blocking ¡Chains

5 ¡

A ¡ B ¡ C ¡ D ¡ . ¡. ¡. ¡

# ¡of ¡processors: ¡

m=32 ¡

Processing ¡capacity ¡lost: ¡ ¡

97% ¡

slide-7
SLIDE 7

Challenge: ¡Blocking ¡Chains

5 ¡

A ¡ B ¡ C ¡ D ¡ . ¡. ¡. ¡

# ¡of ¡processors: ¡

m=32 ¡

Processing ¡capacity ¡lost: ¡ ¡

97% ¡

. ¡. ¡. ¡

slide-8
SLIDE 8

Cost ¡of ¡low ¡blocking: ¡high ¡overhead

6 ¡

MCS: ¡ C-­‑RNLP: ¡ C. ¡JarreS, ¡B. ¡Ward, ¡and ¡J. ¡Anderson. ¡A ¡conten&on-­‑sensi&ve ¡fine-­‑grained ¡locking ¡protocol ¡for ¡

mul&processor ¡real-­‑&me ¡systems. ¡RTNS ¡2015. ¡

  • J. ¡Mellor-­‑Crummey ¡and ¡M. ¡ScoS. ¡Algorithms ¡for ¡scalable ¡synchroniza&on ¡of ¡shared-­‑memory ¡

mul&processors. ¡Transac/ons ¡on ¡Computer ¡Systems, ¡9(1), ¡1991. ¡ ¡

slide-9
SLIDE 9

Pr Propo posed ¡So sed ¡SoluIo luIon: ¡Lo n: ¡Lock ¡Ser k ¡Server ers s

7 ¡

slide-10
SLIDE 10

Con Contri ribuIon

  • ns

s

Four ¡lock ¡server ¡paradigms

  • ImplementaIon
  • EvaluaIon

Lock ¡server ¡coordinaIon ¡protocol

8 ¡

slide-11
SLIDE 11

PlaQorm ¡DescripIon

9 ¡

Socket ¡2 ¡ Socket ¡1 ¡ L1 ¡Data ¡ L1 ¡Instr. ¡ L2 ¡(shared ¡between ¡two ¡cores) ¡ ¡ L3 ¡(shared ¡on ¡socket) ¡ L1 ¡Data ¡ L1 ¡Instr. ¡ L2 ¡(shared ¡between ¡two ¡cores) ¡ ¡ L3 ¡(shared ¡on ¡socket) ¡

Cores ¡0-­‑17 ¡ Cores ¡18-­‑36 ¡

dual-­‑socket, ¡ ¡ 18-­‑cores-­‑per-­‑socket ¡ ¡ Intel ¡Xeon ¡E5-­‑2699 ¡

slide-12
SLIDE 12

L2 ¡(shared ¡between ¡two ¡cores) ¡ ¡

PlaQorm ¡DescripIon

9 ¡

Socket ¡2 ¡ Socket ¡1 ¡ L1 ¡Data ¡ L1 ¡Instr. ¡ L3 ¡(shared ¡on ¡socket) ¡ Core ¡18 ¡ L1 ¡Data ¡ L1 ¡Instr. ¡ L2 ¡(shared ¡between ¡two ¡cores) ¡ ¡ L3 ¡(shared ¡on ¡socket) ¡

Cores ¡0-­‑17 ¡ Cores ¡18-­‑36 ¡

slide-13
SLIDE 13

Standard ¡C-­‑RNLP

10 ¡

Core ¡8 ¡ Core ¡35 ¡ enqueue ¡ dequeue ¡ cri&cal ¡sec&on ¡ request ¡ enqueue ¡ dequeue ¡ cri&cal ¡sec&on ¡ request ¡ Socket ¡1 ¡ Socket ¡2 ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ lock ¡state ¡

slide-14
SLIDE 14

Standard ¡C-­‑RNLP

10 ¡

Core ¡8 ¡ Core ¡35 ¡ enqueue ¡ dequeue ¡ cri&cal ¡sec&on ¡ request ¡ enqueue ¡ dequeue ¡ cri&cal ¡sec&on ¡ request ¡ Socket ¡2 ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ Socket ¡1 ¡

slide-15
SLIDE 15

The ¡Idea

¡ Remote ¡Core ¡Locking ¡

  • used ¡to ¡reduce ¡cri&cal-­‑sec&on ¡lengths ¡[1] ¡

¡ We ¡developed: ¡lock ¡servers ¡

  • used ¡to ¡reduce ¡overhead ¡

11 ¡

Lock ¡server: ¡a ¡process ¡dedicated ¡to ¡ performing ¡lock ¡and ¡unlock ¡func&ons ¡

[1] ¡J. ¡Lozi, ¡F. ¡David, ¡G. ¡Thomas, ¡J. ¡Lawall, ¡and ¡G. ¡Muller. ¡Remote ¡core ¡locking: ¡migra&ng ¡cri&cal-­‑ sec&on ¡execu&on ¡to ¡improve ¡the ¡performance ¡of ¡mul&threaded ¡applica&ons. ¡USENIX ¡ATC ¡2012. ¡

slide-16
SLIDE 16

Lock ¡Server ¡Paradigms

12 ¡

locality ¡ mobility ¡

Global ¡ Local ¡ Sta2c ¡

#1 ¡

Floa2ng ¡

slide-17
SLIDE 17

Paradigm ¡#1: ¡StaIc ¡Global

13 ¡

Core ¡8 ¡ Core ¡35 ¡ enqueue ¡ dequeue ¡ cri&cal ¡sec&on ¡ request ¡ enqueue ¡ dequeue ¡ cri&cal ¡sec&on ¡ request ¡ Core ¡0 ¡ Lock ¡Server ¡ enqueue ¡ dequeue ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡

slide-18
SLIDE 18

Paradigm ¡#1: ¡StaIc ¡Global

Core ¡8 ¡ Core ¡35 ¡ enqueue ¡ dequeue ¡ cri&cal ¡sec&on ¡ request ¡ enqueue ¡ dequeue ¡ cri&cal ¡sec&on ¡ request ¡ Core ¡0 ¡ Lock ¡Server ¡ enqueue ¡ dequeue ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡

13 ¡

slide-19
SLIDE 19

Paradigm ¡#1: ¡StaIc ¡Global

Core ¡8 ¡ Core ¡35 ¡ submit ¡ dequeue ¡ cri&cal ¡sec&on ¡ request ¡ enqueue ¡ dequeue ¡ cri&cal ¡sec&on ¡ request ¡ Core ¡0 ¡ Lock ¡Server ¡ enqueue ¡ dequeue ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡

13 ¡

slide-20
SLIDE 20

Paradigm ¡#1: ¡StaIc ¡Global

Core ¡8 ¡ Core ¡35 ¡ submit ¡ cri&cal ¡sec&on ¡ dequeue ¡ request ¡ enqueue ¡ dequeue ¡ cri&cal ¡sec&on ¡ request ¡ Core ¡0 ¡ Lock ¡Server ¡ enqueue ¡ dequeue ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡

13 ¡

slide-21
SLIDE 21

Paradigm ¡#1: ¡StaIc ¡Global

Core ¡8 ¡ Core ¡35 ¡ submit ¡ dequeue ¡ cri&cal ¡sec&on ¡ request ¡ enqueue ¡ dequeue ¡ cri&cal ¡sec&on ¡ request ¡ Core ¡0 ¡ Lock ¡Server ¡ enqueue ¡ dequeue ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡

13 ¡

slide-22
SLIDE 22

Paradigm ¡#1: ¡StaIc ¡Global

Core ¡8 ¡ Core ¡35 ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ enqueue ¡ dequeue ¡ cri&cal ¡sec&on ¡ request ¡ Core ¡0 ¡ Lock ¡Server ¡ enqueue ¡ dequeue ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡

13 ¡

slide-23
SLIDE 23

Paradigm ¡#1: ¡StaIc ¡Global

Core ¡8 ¡ Core ¡35 ¡ enqueue ¡ dequeue ¡ cri&cal ¡sec&on ¡ request ¡ Core ¡0 ¡ Lock ¡Server ¡ enqueue ¡ dequeue ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡

13 ¡

slide-24
SLIDE 24

Paradigm ¡#1: ¡StaIc ¡Global

Core ¡8 ¡ Core ¡35 ¡ submit ¡ dequeue ¡ cri&cal ¡sec&on ¡ request ¡ Core ¡0 ¡ Lock ¡Server ¡ enqueue ¡ dequeue ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡

13 ¡

slide-25
SLIDE 25

Paradigm ¡#1: ¡StaIc ¡Global

Core ¡8 ¡ Core ¡35 ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ Core ¡0 ¡ Lock ¡Server ¡ enqueue ¡ dequeue ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡

Disadvantage: ¡lose ¡a ¡core ¡

13 ¡

slide-26
SLIDE 26

Lock ¡Server ¡Paradigms

locality ¡ mobility ¡

Global ¡ Local ¡ Sta2c ¡

#1 ¡

Floa2ng ¡

#2 ¡

14 ¡

slide-27
SLIDE 27

Lock ¡Server ¡Paradigms

14 ¡

locality ¡ mobility ¡

Global ¡ Local ¡ Sta2c ¡

  • ­‑ ¡Lose ¡1 ¡core ¡

+ ¡L1 ¡cache ¡affinity ¡

Floa2ng ¡

#2 ¡

slide-28
SLIDE 28

Lock ¡Server ¡Paradigms

14 ¡

locality ¡ mobility ¡

Global ¡ Local ¡ Sta2c ¡

  • ­‑ ¡Lose ¡1 ¡core ¡

+ ¡L1 ¡cache ¡affinity ¡

Floa2ng ¡

#2 ¡

Key ¡insight: ¡blocked ¡requests ¡are ¡busy-­‑wai&ng, ¡using ¡CPU ¡

slide-29
SLIDE 29

Paradigm ¡#2: ¡FloaIng ¡Global

15 ¡

Core ¡8 ¡ Core ¡35 ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ Core ¡0 ¡ Lock ¡Server ¡ enqueue ¡ dequeue ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡

slide-30
SLIDE 30

Paradigm ¡#2: ¡FloaIng ¡Global

Core ¡8 ¡ Core ¡35 ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ Core ¡0 ¡ Core ¡18 ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡

15 ¡

slide-31
SLIDE 31

Paradigm ¡#2: ¡FloaIng ¡Global

Core ¡8 ¡ Core ¡35 ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ Core ¡0 ¡ Core ¡18 ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡

15 ¡

slide-32
SLIDE 32

Paradigm ¡#2: ¡FloaIng ¡Global

Core ¡8 ¡ Core ¡35 ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ Core ¡0 ¡ Core ¡18 ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡

15 ¡

slide-33
SLIDE 33

Paradigm ¡#2: ¡FloaIng ¡Global

Core ¡8 ¡ Core ¡35 ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ Core ¡0 ¡ Core ¡18 ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡

15 ¡

slide-34
SLIDE 34

Paradigm ¡#2: ¡FloaIng ¡Global

Core ¡8 ¡ Core ¡35 ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ Core ¡0 ¡ Core ¡18 ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡

15 ¡

slide-35
SLIDE 35

Lock ¡Server ¡Paradigms

16 ¡

locality ¡ mobility ¡

Global ¡ Local ¡ Sta2c ¡

  • ­‑ ¡Lose ¡1 ¡core ¡

+ ¡L1 ¡cache ¡affinity ¡

Floa2ng ¡

#2 ¡

slide-36
SLIDE 36

Lock ¡Server ¡Paradigms

16 ¡

locality ¡ mobility ¡

Global ¡ Local ¡ Sta2c ¡

  • ­‑ ¡Lose ¡1 ¡core ¡

+ ¡L1 ¡cache ¡affinity ¡

Floa2ng ¡ -­‑ ¡No ¡guaranteed ¡

cache ¡affinity ¡

#3 ¡

slide-37
SLIDE 37

Lock ¡Server ¡Paradigms

16 ¡

locality ¡ mobility ¡

Global ¡ Local ¡ Sta2c ¡

  • ­‑ ¡Lose ¡1 ¡core ¡

+ ¡L1 ¡cache ¡affinity ¡

Floa2ng ¡ -­‑ ¡No ¡guaranteed ¡

cache ¡affinity ¡

#3 ¡

Key ¡insight: ¡use ¡mul&ple ¡lock ¡servers ¡

slide-38
SLIDE 38

Paradigm ¡#3: ¡FloaIng ¡Local

17 ¡

Core ¡8 ¡ Core ¡35 ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ Core ¡0 ¡ Core ¡18 ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡

slide-39
SLIDE 39

Paradigm ¡#3: ¡FloaIng ¡Local

17 ¡

Core ¡8 ¡ Core ¡35 ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ Core ¡0 ¡ Core ¡18 ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡

slide-40
SLIDE 40

Paradigm ¡#3: ¡FloaIng ¡Local

17 ¡

Core ¡8 ¡ Core ¡35 ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ Core ¡0 ¡ Core ¡18 ¡ submit ¡ submit ¡ cri&cal ¡sec&on ¡ request ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L3 ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡ L1 ¡ L1 ¡ . ¡. ¡. ¡

New ¡challenge: ¡coordina&on ¡ between ¡lock ¡servers ¡

slide-41
SLIDE 41

Lock ¡Server ¡CoordinaIon

18 ¡

Server ¡1 ¡ Server ¡2 ¡ Global ¡Execu&on ¡ PaSern ¡

1 ¡ 5 ¡ 6 ¡ 7 ¡ 2 ¡ 3 ¡

Reader/reader ¡locking ¡ protocol ¡(R2LP) ¡

A ¡ B ¡ A ¡

4 ¡

A ¡ B ¡ B ¡

slide-42
SLIDE 42

Lock ¡Server ¡CoordinaIon

18 ¡

Server ¡1 ¡ Server ¡2 ¡ Global ¡Execu&on ¡ PaSern ¡

1 ¡ 5 ¡ 6 ¡ 7 ¡ 2 ¡ 3 ¡

Reader/reader ¡locking ¡ protocol ¡(R2LP) ¡

A ¡ B ¡ A ¡

4 ¡

A ¡ B ¡ B ¡

6 ¡ 5 ¡ 1 ¡ 4 ¡

slide-43
SLIDE 43

Lock ¡Server ¡CoordinaIon

18 ¡

Server ¡1 ¡ Server ¡2 ¡ Global ¡Execu&on ¡ PaSern ¡

1 ¡ 5 ¡ 6 ¡ 7 ¡ 2 ¡ 3 ¡

Reader/reader ¡locking ¡ protocol ¡(R2LP) ¡

A ¡ B ¡ A ¡

4 ¡

A ¡ B ¡ B ¡

6 ¡ 2 ¡ 7 ¡ 3 ¡ 5 ¡ 1 ¡ 4 ¡

slide-44
SLIDE 44

Lock ¡Server ¡CoordinaIon

18 ¡

Global ¡Execu&on ¡ PaSern ¡

6 ¡ 2 ¡ 7 ¡ 3 ¡ 5 ¡ 1 ¡

Reader/reader ¡locking ¡ protocol ¡(R2LP) ¡

A ¡ B ¡

4 ¡

Original ¡C-­‑RNLP ¡bound: ¡ (ci ¡+ ¡1)LMAX ¡

slide-45
SLIDE 45

Lock ¡Server ¡CoordinaIon

18 ¡

Global ¡Execu&on ¡ PaSern ¡

6 ¡ 2 ¡ 7 ¡ 3 ¡ 5 ¡ 1 ¡

Reader/reader ¡locking ¡ protocol ¡(R2LP) ¡

A ¡ B ¡

4 ¡

Original ¡C-­‑RNLP ¡bound: ¡ Two-­‑server ¡C-­‑RNLP ¡bound ¡with ¡R2LP: ¡ (ci ¡+ ¡1)LMAX ¡ (ci,s ¡+ ¡1)(LMAX,1 ¡+ ¡LMAX,2) ¡ LMAX,1 ¡ LMAX,1 ¡ LMAX,2 ¡ LMAX,2 ¡ LMAX,2 ¡ LMAX,1 ¡

slide-46
SLIDE 46

Lock ¡Server ¡Paradigms

19 ¡

locality ¡ mobility ¡

Global ¡ Local ¡ Sta2c ¡

  • ­‑ ¡Lose ¡1 ¡core ¡

+ ¡L1 ¡cache ¡affinity ¡

Floa2ng ¡ -­‑ ¡No ¡guaranteed ¡

cache ¡affinity ¡ + ¡L3 ¡cache ¡affinity ¡

slide-47
SLIDE 47

Lock ¡Server ¡Paradigms

19 ¡

locality ¡ mobility ¡

Global ¡ Local ¡ Sta2c ¡

  • ­‑ ¡Lose ¡1 ¡core ¡

+ ¡L1 ¡cache ¡affinity ¡

  • ­‑ ¡Lose ¡mul&ple ¡cores ¡

+ ¡L1 ¡cache ¡affinity ¡

Floa2ng ¡ -­‑ ¡No ¡guaranteed ¡

cache ¡affinity ¡ + ¡L3 ¡cache ¡affinity ¡ coordina&on ¡with ¡R2LP, ¡ addi&onal ¡blocking ¡ considera&ons ¡

slide-48
SLIDE 48

Experimental ¡EvaluaIon

¡ Measured ¡overhead ¡and ¡blocking ¡ ¡ One ¡task ¡per ¡core ¡issuing ¡10,000 ¡random ¡requests ¡ ¡ 64 ¡resources, ¡each ¡task ¡requests ¡4 ¡of ¡these, ¡cri&cal-­‑ sec&on ¡lengths ¡= ¡40µs ¡ ¡

20 ¡

slide-49
SLIDE 49

Experimental ¡EvaluaIon

¡ By ¡how ¡much ¡can ¡a ¡lock ¡server ¡paradigm ¡ reduce ¡worst-­‑case ¡overhead? ¡

21 ¡

Global ¡ Local ¡ Sta2c ¡

  • ­‑ ¡Lose ¡1 ¡core ¡

+ ¡L1 ¡cache ¡affinity ¡

  • ­‑ ¡Lose ¡mul&ple ¡cores ¡

+ ¡L1 ¡cache ¡affinity ¡

Floa2ng ¡ -­‑ ¡No ¡guaranteed ¡

cache ¡affinity ¡ + ¡L3 ¡cache ¡affinity ¡

How ¡do ¡overhead ¡and ¡blocking ¡differ ¡ between ¡sta&c ¡and ¡floa&ng ¡lock ¡servers? ¡

slide-50
SLIDE 50

Experimental ¡Results

22 ¡

Overhead ¡(microseconds) ¡ Number ¡of ¡tasks ¡

slide-51
SLIDE 51

Experimental ¡Results

Overhead ¡(microseconds) ¡ Number ¡of ¡tasks ¡

No ¡lock ¡server ¡

22 ¡

slide-52
SLIDE 52

Experimental ¡Results

Overhead ¡(microseconds) ¡ Number ¡of ¡tasks ¡

Sta&c ¡Global ¡

22 ¡

slide-53
SLIDE 53

Experimental ¡Results

Overhead ¡(microseconds) ¡ Number ¡of ¡tasks ¡

Floa&ng ¡Global ¡

22 ¡

slide-54
SLIDE 54

Experimental ¡Results

Overhead ¡(microseconds) ¡ Number ¡of ¡tasks ¡

Sta&c ¡lock ¡servers ¡tend ¡to ¡reduce ¡overhead ¡more ¡than ¡ floa&ng ¡lock ¡servers. ¡

22 ¡

slide-55
SLIDE 55

Experimental ¡Results

Overhead ¡(microseconds) ¡ Number ¡of ¡tasks ¡

22 ¡

slide-56
SLIDE 56

Experimental ¡Results

Overhead ¡(microseconds) ¡ Number ¡of ¡tasks ¡

22 ¡

slide-57
SLIDE 57

Experimental ¡Results

Overhead ¡(microseconds) ¡ Number ¡of ¡tasks ¡

Blocking ¡(microseconds) ¡ Number ¡of ¡tasks ¡

22 ¡

slide-58
SLIDE 58

Experimental ¡Results

Overhead ¡(microseconds) ¡ Number ¡of ¡tasks ¡

Blocking ¡(microseconds) ¡ Number ¡of ¡tasks ¡

With ¡the ¡use ¡of ¡a ¡global ¡lock ¡server, ¡blocking ¡is ¡nearly ¡ iden&cal ¡to ¡that ¡without ¡using ¡a ¡lock ¡server. ¡

22 ¡

slide-59
SLIDE 59

Global ¡ Local ¡ Sta2c ¡

  • ­‑ ¡Lose ¡1 ¡core ¡

+ ¡L1 ¡cache ¡affinity ¡

  • ­‑ ¡Lose ¡mul&ple ¡cores ¡

+ ¡L1 ¡cache ¡affinity ¡

Floa2ng ¡ -­‑ ¡No ¡guaranteed ¡

cache ¡affinity ¡ + ¡L3 ¡cache ¡affinity ¡

Experimental ¡EvaluaIon

23 ¡

How ¡do ¡overhead ¡and ¡blocking ¡differ ¡ between ¡global ¡and ¡local ¡lock ¡servers? ¡

slide-60
SLIDE 60

Experimental ¡Results

24 ¡

Overhead ¡(microseconds) ¡ Number ¡of ¡tasks ¡

slide-61
SLIDE 61

Experimental ¡Results

Overhead ¡(microseconds) ¡ Number ¡of ¡tasks ¡

No ¡lock ¡server ¡

24 ¡

slide-62
SLIDE 62

Experimental ¡Results

Overhead ¡(microseconds) ¡ Number ¡of ¡tasks ¡

Floa&ng ¡Global ¡

24 ¡

slide-63
SLIDE 63

Experimental ¡Results

Overhead ¡(microseconds) ¡ Number ¡of ¡tasks ¡

Floa&ng ¡Local ¡

24 ¡

slide-64
SLIDE 64

Experimental ¡Results

Overhead ¡(microseconds) ¡ Number ¡of ¡tasks ¡

Local ¡lock ¡servers ¡reduce ¡overhead ¡more ¡than ¡global ¡lock ¡

  • servers. ¡

24 ¡

slide-65
SLIDE 65

Experimental ¡Results

Overhead ¡(microseconds) ¡ Number ¡of ¡tasks ¡

Blocking ¡(microseconds) ¡ Number ¡of ¡tasks ¡

Local ¡lock ¡servers ¡result ¡in ¡increased ¡blocking ¡ compared ¡to ¡global ¡lock ¡servers. ¡

24 ¡

slide-66
SLIDE 66

Experimental ¡EvaluaIon

¡ Measured ¡overhead ¡and ¡blocking ¡ ¡ One ¡task ¡per ¡core ¡issuing ¡10,000 ¡random ¡requests ¡ ¡ Parameter ¡sweep: ¡

  • Number ¡of ¡tasks: ¡{2,4,…,36} ¡
  • Total ¡# ¡of ¡resources: ¡{16, ¡32, ¡64} ¡
  • # ¡resources ¡per ¡request: ¡{1,2,4,6,8,10} ¡
  • Cri&cal-­‑sec&on ¡lengths: ¡{1, ¡20, ¡40, ¡…, ¡100} ¡μs ¡

25 ¡

slide-67
SLIDE 67

Con Contri ribuIon

  • ns

s

Four ¡lock ¡server ¡paradigms

  • ImplementaIon
  • EvaluaIon

Lock ¡server ¡coordinaIon ¡protocol

26 ¡

slide-68
SLIDE 68

Lock ¡Server ¡CoordinaIon

27 ¡

Original ¡C-­‑RNLP ¡bound: ¡ Two-­‑server ¡C-­‑RNLP ¡bound ¡with ¡R2LP: ¡ (ci ¡+ ¡1)LMAX ¡ (ci,s ¡+ ¡1)(LMAX,1 ¡+ ¡LMAX,2) ¡

slide-69
SLIDE 69

C-­‑RNLP ¡bound

28 ¡

1 ¡ 2 ¡ 5 ¡ 3 ¡ 6 ¡ 4 ¡ 7 ¡ 8 ¡ 5 ¡ 3 ¡ 1 ¡ (ci ¡+ ¡1)LMAX ¡= ¡(7 ¡+1)(5) ¡= ¡40 ¡&me ¡units ¡ 40 ¡&me ¡units ¡

slide-70
SLIDE 70

40 ¡&me ¡units ¡ 40 ¡&me ¡units ¡

Arbitrary ¡Split

29 ¡

1 ¡ 2 ¡ 5 ¡ 3 ¡ 6 ¡ 4 ¡ 7 ¡ 8 ¡

Server ¡1 ¡ Server ¡2 ¡ Blocking ¡

Server ¡1: ¡(3 ¡+ ¡1)(5 ¡+ ¡5) ¡= ¡40 ¡ Server ¡2: ¡(3 ¡+ ¡1)(5 ¡+ ¡5) ¡= ¡40 ¡

(ci,s ¡+ ¡1)(LMAX,1 ¡+ ¡LMAX,2) ¡

slide-71
SLIDE 71

Even ¡Split ¡by ¡CriIcal-­‑SecIon ¡Length

30 ¡

1 ¡ 2 ¡ 5 ¡ 3 ¡ 6 ¡ 4 ¡ 7 ¡ 8 ¡

Server ¡1 ¡ Server ¡2 ¡

32 ¡&me ¡units ¡ 32 ¡&me ¡units ¡

Blocking ¡

Server ¡1: ¡(3 ¡+ ¡1)(3 ¡+ ¡5) ¡= ¡32 ¡ Server ¡2: ¡(3 ¡+ ¡1)(3 ¡+ ¡5) ¡= ¡32 ¡

(ci,s ¡+ ¡1)(LMAX,1 ¡+ ¡LMAX,2) ¡

slide-72
SLIDE 72

36 ¡&me ¡units ¡

Uneven ¡Split ¡by ¡CriIcal-­‑SecIon ¡Length

31 ¡

1 ¡ 2 ¡ 5 ¡ 3 ¡ 6 ¡ 4 ¡ 7 ¡ 8 ¡

Server ¡1 ¡ Server ¡2 ¡ Blocking ¡

Server ¡1: ¡(1 ¡+ ¡1)(1 ¡+ ¡5) ¡= ¡12 ¡ Server ¡2: ¡(5 ¡+ ¡1)(1 ¡+ ¡5) ¡= ¡36 ¡

(ci,s ¡+ ¡1)(LMAX,1 ¡+ ¡LMAX,2) ¡

12 ¡&me ¡units ¡

slide-73
SLIDE 73

Blocking ¡Bounds

32 ¡

36 ¡&me ¡units ¡

Uneven ¡split ¡by ¡cri&cal-­‑sec&on ¡length ¡

12 ¡&me ¡units ¡ 40 ¡&me ¡units ¡

Baseline ¡– ¡no ¡lock ¡server ¡

40 ¡&me ¡units ¡ 40 ¡&me ¡units ¡

Arbitrary ¡split ¡

32 ¡&me ¡units ¡ 32 ¡&me ¡units ¡

Even ¡split ¡by ¡cri&cal-­‑sec&on ¡length ¡

Server ¡1: ¡ Server ¡2: ¡ Server ¡1: ¡ Server ¡2: ¡ Server ¡1: ¡ Server ¡2: ¡

slide-74
SLIDE 74

Future ¡Work

33 ¡

  • Choose ¡how ¡to ¡split ¡tasks ¡(based ¡on ¡requests) ¡

when ¡using ¡lock ¡servers ¡

  • Explore ¡accoun&ng ¡for ¡sta&c ¡servers ¡
  • Set ¡server ¡at ¡highest ¡priority, ¡ensure ¡lock ¡state ¡in ¡

cache ¡

  • Use ¡a ¡dedicated ¡IRQ-­‑handling ¡core ¡
  • Treat ¡as ¡a ¡special ¡kind ¡of ¡interrupt ¡
  • Conduct ¡a ¡large-­‑scale ¡overhead-­‑aware ¡

schedulability ¡study ¡

slide-75
SLIDE 75

Global ¡ Local ¡ Sta2c ¡

  • ­‑ ¡Lose ¡1 ¡core ¡

+ ¡L1 ¡cache ¡affinity ¡

  • ­‑ ¡Lose ¡mul&ple ¡cores ¡

+ ¡L1 ¡cache ¡affinity ¡

Floa2ng ¡ -­‑ ¡No ¡guaranteed ¡

cache ¡affinity ¡ + ¡L3 ¡cache ¡affinity ¡

1 ¡ 2 ¡ 5 ¡ 3 ¡ 6 ¡ 4 ¡ 7 ¡ 8 ¡

36 ¡&me ¡units ¡ 12 ¡&me ¡units ¡

Server ¡Coordina&on: ¡R2LP ¡

QuesIons?

dx.doi.org/10.4230/DARTS.4.2.2 ¡

34 ¡

slide-76
SLIDE 76

Case ¡Study: ¡Four ¡Sockets

35 ¡

four-­‑socket, ¡6-­‑cores-­‑per-­‑socket ¡ Intel ¡Xeon ¡L7455 ¡ L1 ¡data: ¡32KB ¡ L1 ¡instruc&on: ¡32KB ¡ L2: ¡3MB ¡ L3: ¡12MB ¡

slide-77
SLIDE 77

Case ¡Study: ¡Profile ¡of ¡Requests

36 ¡

  • S. ¡Kramer, ¡D. ¡Ziegenbein, ¡and ¡A. ¡Hamann. ¡Real ¡world ¡

automo&ve ¡benchmarks ¡for ¡free. ¡WATERS ¡2015. ¡

slide-78
SLIDE 78

Case ¡Study: ¡Nested ¡Requests

37 ¡

  • B. ¡Brandenburg ¡and ¡J. ¡Anderson. ¡Feather-­‑trace: ¡A ¡

lightweight ¡event ¡tracing ¡toolkit. ¡OSPERT ¡2007. ¡

nes&ng ¡depth ¡ percent ¡of ¡lock ¡requests ¡

89.054 ¡ 8.643 ¡ 2.288 ¡0.015 ¡

slide-79
SLIDE 79

Handling ¡Nested ¡Requests

¡ Non-­‑nested ¡lock ¡request ¡

¡ With ¡Dynamic ¡Group ¡Locks ¡(DGLs) ¡

38 ¡

lock(A) lock(B) //critical section unlock(B) unlock(A) lock(A) //critical section unlock(A) lock(A) //critical section unlock(A) lock(A,B) //critical section unlock(A,B)

¡ Nested ¡lock ¡request ¡

slide-80
SLIDE 80

AddiIonal ¡Experimental ¡Results

39 ¡

slide-81
SLIDE 81

Challenge: ¡Blocking ¡Chains

40 ¡

  • B. ¡Ward ¡and ¡J. ¡Anderson. ¡Suppor&ng ¡nested ¡locking ¡in ¡

mul&processor ¡real-­‑&me ¡systems. ¡ ¡ECRTS ¡2012. ¡

Sequen&al ¡resource ¡acquisi&on: ¡cri&cal-­‑sec&on ¡length ¡O(mD) ¡ Dynamic ¡group ¡locks: ¡no ¡worst-­‑case ¡cri&cal-­‑sec&on ¡infla&on, ¡ ¡ same ¡asympto&c ¡bounds ¡

  • H. ¡Takada ¡and ¡K. ¡Sakamura. ¡Real-­‑&me ¡scalability ¡of ¡

nested ¡spin ¡locks. ¡RTCSA ¡1995. ¡