Model free scheduling of invocation, extract and other primitives in CHAIMS

Dorothea Beringer, Laurence Melloul, Neal Sample, Gio Wiederhold
Draft, Jan 7, 1998, by db

Abstract
1.  Introduction
 

2.  Optimization objectives

The purpose of the scheduling of primitives in CHAIMS is: In cases where these two things are contradictory, a cost function is necessary to determine the end-user specific optimum.
 

Techniques for reducing overall execution time:

Techniques for reducing overall fees:

3. Preprocessing

A scheduling preprocessor reads a megaprogram and writes a new, hopefully optimized, megaprogram. In the new megaprogram statements may have been moved around as well as new statements introduced.

Simple optimizations:

Implemented in the existing preprocessor, see also readmes to that preprocessor.
Experiences: not yet integrated, so no experimental results exist.

Optimization with cost function:

Preprocessor with access to megamodules

Much more optimization possibilities arise when the preprocessor can execute ESTIMATE calls to the megamodules.

Other possibilities

yet to be investigated...

Limits of a pure preprocessing approach to scheduling

yet to be listed....
 

4.  Runtime with graph

Runtime scheduling in an execution machine based on a graph of the megamodule is totally different from the idea of optimizing a sequential program by rearranging and maybe adding statements. The megaprogram is a mere collection of statements, some of these statements are related to each other by preconditions on their possible order. These preconditions are given mainly by the dataflow (only by the dataflow?). The runtime system takes a megaprogram as input, converts it into a dependancy graph of statements, and then executes that graph.

The setup of runtime scheduling

Figure: program - parser - interpreter and scheduler
...

The megaprogram graph

The megaprogram is represented as an (acylic?) directed graph.
Nodes: represent either a statement or a sub graph
Edges: represent  dependencies, edges can have additional conditions.

Conditions on edges:

....

How to represent IF and WHILE blocks? How to handle the cases where a statement could be executed already earlier on, but it is not yet clear, if its results are needed?

Should we rather take a variant of a Petri Net?
 
Complexity of this approach?
 

Execution of the graph

The runtime system typcically has several ongoing invocations, and waits for one of them to fulfill the conditions of one or several edges so the next node (most often an INVOKE statement) can be executed. As CPAM does not know any callbacks from a megamodule to a client, these testing the readiness of invocations is up to the runtime system. Easiest way is probably polling.
Whenever the graph contains a serie of statements executed locally (e.g. assignments), these are executed without further optimization considerations, as we assume that their time consumption is neglectable.
 
 

5. Scheduling in other systems

Compilers

who is adding something here?

Workflow Management Systems

who is adding something here?
 

Disclaimer

This is a paper in progress, many more cases have to be considered!
Add ons and input is welcome!