From: <jsa...@us...> - 2008-11-17 17:05:52
|
Revision: 107 http://flexotask.svn.sourceforge.net/flexotask/?rev=107&view=rev Author: jsauerbach Date: 2008-11-17 17:05:46 +0000 (Mon, 17 Nov 2008) Log Message: ----------- Fill in some sections that are just fast-edits of stuff in the old Exotask document Modified Paths: -------------- trunk/flexotask/doc/flexotaskProgramming.html Modified: trunk/flexotask/doc/flexotaskProgramming.html =================================================================== --- trunk/flexotask/doc/flexotaskProgramming.html 2008-11-17 17:05:08 UTC (rev 106) +++ trunk/flexotask/doc/flexotaskProgramming.html 2008-11-17 17:05:46 UTC (rev 107) @@ -1343,19 +1343,110 @@ <br><hr><h3><a name="tasks"></a>Writing Flexotasks</h3> -<p>Under construction. +<p>This section is still being written. For the moment you are +referred to the <a href="#samples">sample programs</a> for ideas about what +the actual code of Flexotasks should look like. <br><hr><h3><a name="validation"/>Validating and Instantiating Flexible Task Graphs</h3> -<p>Under construction. +The <a +href="com/ibm/realtime/flexotask/template/FlexotaskTemplate.html">FlexotaskTemplate</a> +class provides five different validate methods providing convenient +combinations of four arguments, of which only one argument (the +<b>schedulerKind</b>) is always required. Here is a description of +what the arguments do. +<ul> +<li><b>schedulerKind--</b> String name of the kind of scheduler to use +in running the graph. The <b>TTScheduler</b> (time triggered +scheduler) is always available. Other schedulers are provided by +plugins (which then also contribute to the generated runtime). This +is the only "required" argument and is present in all five +<b>validate</b> methods. + +<li><b>schedulingData--</b> conveys platform-specific worst case +execution time (WCET) and worst case allocation (WCA) information for +use by the scheduler, as discussed in the next section. If this +argument is omitted, the scheduler assumes default heap sizes for +Flexotask private heaps and assumes that the worst case execution +times of tasks are short enough to make the schedule feasible without +further checking. This argument is optional. The <b>TTScheduler</b> +only looks at WCA information and ignores WCET information. The WCA +information is used to estimate heap sizes and garbage collection +strategies for the private memory areas. + +<li><b>initializationMap--</b> provides values to be passed as the +parameter arguments to one or more Flexotasks' <b>initialize</b> +methods. If those Flexotasks already have default parameter values +specified as part of the template, the defaults are overridden by the +contents of <b>initializationMap</b>. Weakly isolated Flexotasks +typically use dynamically specified parameters to communicate with the +rest of the Java application, as in the <b>communicating</b> sample +program. Strongly isolated Flexotasks receive deep copies of their +parameters. If this argument is missing it is assumed to be the empty +map. + +<li><b>distributionContext--</b> is present only in the most general +of the five <b>validate</b> methods. It provides information that can +be used to distribute the graph across multiple machines. If missing, +the graph is assumed not to be distributed. Distributed graphs +require the presence of a system extension called a +<em>distributer</em>. The present system does not contain any +distributers. +</ul> + <br><hr><h3><a name="wcet"/>Specifying WCET and WCA information</h3> -<p>Under construction. +<p>The <a +href="com/ibm/realtime/flexotask/scheduling/FlexotaskSchedulingData.html">FlexotaskSchedulingData</a> +data structure is used to pass platform-specific WCET and WCA +information to the scheduler. It provides a scheduler-independent +framework for specifying this information, but individual schedulers +may extend the class to provide scheduler-specific addenda or a more +convenient interface given the properties of the scheduler. The +scheduling data is expressed as a map from FlexotaskTemplate elements +(task or connection) to <a +href="com/ibm/realtime/flexotask/scheduling/FlexotaskTaskSchedulingElement.html">FlexotaskTaskSchedulingElement</a> +and <a +href="com/ibm/realtime/flexotask/scheduling/FlexotaskConnectionSchedulingElement.html">FlexotaskConnectionSchedulingElement</a> +structures, with the addition of an <a +href="com/ibm/realtime/flexotask/scheduling/FlexotaskGlobalSchedulingElement.html">FlexotaskGlobalSchedulingElement</a> +structure. Tasks have WCETs both for execution and for garbage +collection, and have WCAs, while connections have only WCETs for their +deep cloning operations. The global scheduling element provides an +initial and maximum total aggregate size for Flexotask private heaps +and also specifies the number of cores available on the target +platform. +<p>The TTScheduler only considers WCA and heap size information. It +makes no use of WCETs or information about the number of cores. Other +schedulers are being developed that will use some more of this +information. + <br><hr><h3><a name="cloning"/>Deep cloning at test time</h3> -<p>Under construction. +<p>When testing a Flexotask graph (not running on a real-time VM), the +Flexotask runtime must simulate the deep cloning operation that is +done specially in the real-time VM at the system level. It uses Java +level (including reflective) operations to do this, which is not +ideal, since Java reflection does not provide a consistent +side-effect-free way of constructing objects. The solution is to use +the various implementations of the <a +href="com/ibm/realtime/flexotask/cloning/DeepCloner.html">DeepCloner</a> +interface provided in the <a +href="com/ibm/realtime/flexotask/cloning/package-summary.html">com.ibm.realtime.flexotasks.cloning</a> +package, or create one of your own. By default, the system uses +either the <b>SerializableCloner</b> (for objects that implement +Serializable) or the <b>DefaultCloner</b> (otherwise). The latter +assumes that the object implements a <b>deepClone()</b> method, which +is fine when you are creating the data types anew for the application, +but not so good when you are using existing types. To create an +association between a <b>Class</b> and its <b>DeepCloner</b> use the +<a +href="com/ibm/realtime/flexotask/cloning/CloningSupport.html#setCloner(java.lang.Class,%20com.ibm.realtime.flexotask.cloning.DeepCloner)">CloningSupport.setCloner()</a> +method. Note that reflective cloning is not used when executing in +real-time mode, so the performance of your cloning solution is not an +issue in determining WCETs for connections. <br><hr><h3><a name="tracing">Using the Tracing Support</h3> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |