From e25a0d7b5a5342df84ca4b006fe471506e38aeef Mon Sep 17 00:00:00 2001 From: bdemsky Date: Fri, 13 Apr 2007 13:20:57 +0000 Subject: [PATCH] move docs to one location --- Robust/src/docs/schedulerdesign | 32 +++++++++++++++++++++++++++++++ Robust/src/docs/tagimplementation | 14 ++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 Robust/src/docs/schedulerdesign create mode 100644 Robust/src/docs/tagimplementation diff --git a/Robust/src/docs/schedulerdesign b/Robust/src/docs/schedulerdesign new file mode 100644 index 00000000..deed8f48 --- /dev/null +++ b/Robust/src/docs/schedulerdesign @@ -0,0 +1,32 @@ +Basic design of scheduler: + +activetask: Queue of active tasks +failedtasks: Hashtable of failed task/parameter combinations +objectqueues: For each class we have a list of parameterwrapper objects + +1. ObjectQueues + +Each parameterwrapper object is a set of objects that can serve as a +specific parameter for a specific task. This set is stored in the +hashtable referenced by the objectset field. A reference to the +relevant taskdescriptor is stored in the task field. + +Each parameterwrapper object has an array of ints: intarray This array +contains numberofterms pairs of integere: i*2 and i*2+1. The first +integer in a pair contains an "and" mask of the flags that the task +cares about. The second integer in the pair contains the flag +settings. If the flag of an object matches any of these masks, then +the object should be placed in the object set. + +1.1 Objectsets + +Each objectset is implemented using a hashtable. If an object is in +the objectset, the objectset hashtable maps that object to either NULL +or the next objectset the object is a member of. + +1.2 + +Each object with a flag contains a flagptr field ((struct RuntimeHash +*) ptr)[2]. This field points to the first objectset hashtable that +the object is a member of. + diff --git a/Robust/src/docs/tagimplementation b/Robust/src/docs/tagimplementation new file mode 100644 index 00000000..56342063 --- /dev/null +++ b/Robust/src/docs/tagimplementation @@ -0,0 +1,14 @@ +Baz a {}{Tag Foo x}, Bar b {}{Tag Foo x, Tag Far y} + + +Idea: Each parameter has its own queue and a hashtable that is indexed by +the tag + +When adding the object to the queue, the system: +cycles through each tag of the appropriate type in that object and indexes +into the other queues for that tag...if multiple objects have that tag, +have to search each possible one...if the parameter is specified to have a +second tag, search through each possible second tag + +Each flag object has tag pointer - it can either point to a tag object or +a list of tags... -- 2.34.1