annotate Design_Notes.txt @ 0:7a85919442f2

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