Cilk-NOW - PowerPoint PPT Presentation

About This Presentation
Title:

Cilk-NOW

Description:

Cilk-NOW Adaptive and Reliable Parallel Computing on Networks of Workstations Robert D. Blumofe (Univ. of Texas) – PowerPoint PPT presentation

Number of Views:20
Avg rating:3.0/5.0
Slides: 41
Provided by: webYlIs
Category:
Tags: now | cilk

less

Transcript and Presenter's Notes

Title: Cilk-NOW


1
Cilk-NOW
  • ?????
  • ????

Adaptive and Reliable Parallel Computing on
Networks of Workstations Robert D. Blumofe
(Univ. of Texas) Philip A. Lisiecki (MIT)
Proceedings of the USENIX Annual Technical
Conference, 1997
2
Cilk??
  • C??????????????????????????
  • DAG??????

3
Cilk-NOW
  • ???PC??Cilk???????????????????
  • ???Cilk
  • PC????????????????
  • ????

4
?????
  • Cilk??
  • ???
  • work stealing??????
  • ??????
  • PC?????????
  • ????
  • ???????????
  • ???

5
thread Fib (cont int k, int n) if (n lt2)
send_argument (k,n) else cont int x, y
spawn_next Sum (k, ?x, ?y) spawn Fib (x,
n-1) spawn Fib (y, n-2) thread Sum (cont
int k, int x, int y) send_argument (k, xy)
6
Cilk??? (1/3)
  • spawn T (args )
  • spawn_next T (args )
  • ??????T??????
  • ?????????????closure???

Sum
0
Fib
Join counter
0
k
??Argument slots
??Argument slots
k
Arguments
Arguments
n9
?Join counter??Argument slots?(0?????)
7
Cilk??? (3/3)
  • cont
  • continuation
  • ??empty argument slot????
  • ?closure???????
  • argument slot???????????

Sum
2
k
continuation
8
Cilk??? (2/3)
  • send_argument(k, value)
  • continuation k??????argument slot?value???

9
???
10
???
11
???
Sum
1
k
21
12
???
Sum
0
k
21
13
13
work stealing?????? (1/3)
  • ?????? ready deque???
  • ?????closure??????
  • join counter?0????closure? deque????????
  • deque????????????

14
work stealing?????? (2/3)
  • ready deque??????work stealing????
  • thief??????victim???
  • steal request?victim???
  • victim?
  • ready deque???????,deque????closure?thief???
  • ready deque????,thief????????

????thief ?????victim
15
work stealing?????? (3/3)
  • ?????closure???????
  • ?????????????
  • ???closure????spawn???????
  • ????closure?????work???
  • ????????????,???work????
  • ??????????
  • ??3???????????

16
work stealing??? (1/3)
  • DAG??????

sequential execution spawn spawn_next continuation
instruction thread procedure
17
work stealing??? (2/3)
  • well structured?????
  • ???procedure?????????
  • ??,?????procedure?????thread??????

18
work stealing??? (3/3)
  • well structured?????????
  • T1/P T8????????
  • ? P ?????
  • T1 DAG??instruction?
  • (1????????????)
  • T8 DAG??????
  • (critical path?)

DAG??critical path???closure?, ready
deque?????????????????
19
??????
  • ???PC??(???)Cilk????????????????
  • PC???,???????????????

????? A
????? C
????? B
20
???????????
  • ????????????,
  • ????????closure???
  • ?????????,
  • ?closure??????????
  • ??????continuation???????

?waiting closure???????????
21
???????????
  • work stealing?????
  • subcomputationresult closure???
  • ??????
  • subcomputation???

22
work stealing????? (1/5)
  • subcomputation
  • ready, waiting, assigned pool???????
  • global?unique?name???
  • PC?local?unique???
  • work steal???????

23
work stealing????? (2/5)
  • thief?,
  • subcomputation???
  • steal??????victim???

victim s
thief r
subcomputation si
assigned
waiting
ready
24
work stealing????? (3/5)
  • victim?,
  • ready pool?????subcomputation?round-robin???
  • ready pool????closure?assigned pool???
  • thief????thief?subcomputation??????

victim s
thief r
subcomputation si
assigned
waiting
ready
25
work stealing????? (3/5)
  • victim?,
  • ready pool?????subcomputation?round-robin???
  • ready pool????closure?assigned pool???
  • thief????thief?subcomputation??????

thief name
victim s
thief r
thief subcomp.
subcomputation si
assigned
waiting
ready
r rj
26
work stealing????? (4/5)
  • victim??thief?closure???
  • thief?victim worker??????
  • thief?result closure???
  • ?????closure??continuation?,
  • result closure????????????

victim s
thief r
subcomputation si
assigned
waiting
ready
r rj
27
work stealing????? (5/5)
  • 3??pool???????????

victim s
thief r
s
subcomputation si
assigned
waiting
ready
r rj
28
work stealing????? (5/5)
  • 3??pool???????????

victim s
thief r
subcomputation si
assigned
waiting
ready
29
??????
  • subcomputation???
  • subcomputation?serialize
  • continuation???
  • ?????????,
  • victim worker?????????
  • victim closure??thief subcomputation???
  • assigned pool?????thief worker?????????
  • victim worker name???

30
??????
worker t
subcomputation tk
assigned
waiting
ready
s si
worker s
worker u
t
subcomputation si
assigned
waiting
ready
r rj
worker r
s
31
??????
worker t
subcomputation tk
assigned
waiting
ready
s si
worker s
worker u
worker u
t
subcomputation si
assigned
waiting
ready
r rj
worker r
s
32
??????
worker t
subcomputation tk
assigned
waiting
ready
s si
worker u
worker s
t
subcomputation si
assigned
waiting
ready
r rj
worker r
s
33
????
  • PC????????????????????????????
  • ?subcomputation????
  • ???????????

34
subcomputation???? (1/2)
  • subcomputation?????????subcomputation???????????
  • subcomputation??????return value?????
  • ?well-structured???????
  • transaction?????
  • return value?????????commit

35
subcomputation???? (2/2)
  • ?????????,
  • ????subcomputation???continuation???subcomputation
    ?abort
  • abort??subcomputation???continuation???subcomputat
    ion?abort
  • ????subcomputation??????continuation???subcomputat
    ion?,????subcomputation????

? PC????????????
36
worker t
???
subcomputation tk
assigned
waiting
ready
s si
worker s
t
subcomputation si
assigned
waiting
ready
r rj
worker r
s
abort
37
???????????
  • ?????????????
  • c.f.)DAG???????subcomputation????
  • subcomputation????????????

38
????
  • ?????Cilk-NOW?????????
  • SilkRoad2000
  • Cilk-NOW SoftwareDSM
  • Satin2001
  • ???????????Scheduling??
  • Concert2002
  • ??????????????????

39
???
  • ???PC??Cilk???????????????????
  • ???Cilk
  • PC????????????????
  • ????

40
?????
  • thiefvictim???????????
  • ???????????????????
  • ????????
  • ??????????????????
  • ????????????????
Write a Comment
User Comments (0)
About PowerShow.com