| rev |
line source |
|
seanhalle@4
|
1 0x7ffff644ab60
|
|
seanhalle@4
|
2 0x7ffff64487f0
|
|
seanhalle@4
|
3 0x7ffff644b0a0
|
|
seanhalle@0
|
4
|
|
seanhalle@0
|
5 This test app has to exercise all the aspects of the request handling
|
|
seanhalle@0
|
6 and the assigner code.
|
|
seanhalle@0
|
7
|
|
seanhalle@0
|
8 The assigner has two different Qs, plus a set of currentTaskSlvs check for tasks and also check for explicit VPs.
|
|
seanhalle@0
|
9
|
|
seanhalle@0
|
10 So, in the app, make tasks, and also explicit VPs.. create such that they
|
|
seanhalle@0
|
11 interleave, cause assigner to switch between.
|
|
seanhalle@0
|
12
|
|
seanhalle@0
|
13 So, when start, make some tasks, then make some explicit VPs, then some
|
|
seanhalle@0
|
14 tasks, back and forth.. second batch of tasks have inter-dependencies, so
|
|
seanhalle@0
|
15 some of the VPs should jump into the middle of them..
|
|
seanhalle@0
|
16
|
|
seanhalle@0
|
17 Then, make it so that the last two tasks talk to each other, suspending
|
|
seanhalle@0
|
18 each other in turn, (which should cause the extra VPs to dissipate) and
|
|
seanhalle@0
|
19 after that they create a bunch more tasks.
|
|
seanhalle@0
|
20
|
|
seanhalle@0
|
21 Okay.. what needs to be exercised?
|
|
seanhalle@0
|
22 -] create new slave when task suspends
|
|
seanhalle@0
|
23 -] dissipate extra slave when have a task one, and no free tasks
|
|
seanhalle@0
|
24 -] suspend a task -> no tasks in taskQ -> empty task slave in slaveQ ->
|
|
seanhalle@0
|
25 dissipate that task slave -> explicit slave next in slaveQ, animate that.
|
|
seanhalle@0
|
26 Means: To get an empty task slave in slaveQ -> create a task that will
|
|
seanhalle@0
|
27 suspend, then create a normal task, which will cause an extra task
|
|
seanhalle@0
|
28 slave to be created
|
|
seanhalle@0
|
29
|
|
seanhalle@0
|
30 ===================
|
|
seanhalle@0
|
31 To have explicit VPs as well tasks.. add a field to semantic data holds type
|
|
seanhalle@0
|
32 of VP: whether it's for running tasks, vs an explicit VP. when an
|
|
seanhalle@0
|
33 explicit dissipates, then switch it to a task VP that has no suspended
|
|
seanhalle@0
|
34 tasks..
|
|
seanhalle@0
|
35
|
|
seanhalle@0
|
36 So, in the semantic data, have:
|
|
seanhalle@0
|
37 -> taskVP vs explicitVP
|
|
seanhalle@0
|
38 -> has suspended task vs idle
|
|
seanhalle@0
|
39
|
|
seanhalle@0
|
40 Then fix the assigner logic:
|
|
seanhalle@0
|
41 When task suspends, get next readyVP,
|
|
seanhalle@0
|
42 check if it's an explicit
|
|
seanhalle@0
|
43 and if yes, resume it,
|
|
seanhalle@0
|
44 if no, then it's a taskVP, so get next task from taskQ and do it.
|
|
seanhalle@0
|
45 Check whether taskQ empty
|
|
seanhalle@0
|
46 if yes, then in the state: suspended taskVP, have empty taskVP, no tasks
|
|
seanhalle@0
|
47 so,
|
|
seanhalle@0
|
48
|
|
seanhalle@0
|
49 If taskQ empty, and VP Q empty, return NULL, which will trigger the
|
|
seanhalle@0
|
50 back-to-back Master backoff.
|
|
seanhalle@0
|
51
|
|
seanhalle@0
|
52 If assigner called and no suspended slaves and taskQ empty.. does it have
|
|
seanhalle@0
|
53 a "current task slave"? If not, create one in the semantic Env.
|
|
seanhalle@0
|
54 ==================================
|