| OCR Text |
Show 12 An applicative program is computed by recursively generating and evaluating apply tasks. The evaluation process gradually establishes a cal I tree. The root of the tree is the main task and each node represents an apply task. A call tree dynamically grows and shrinks as child tasks are being spawned or terminated, respectively. After a node completes its corresponding apply task, it reports the result to its parent and terminates. 1.4.3 Linkage mechanism Apply tasks may be evaluated locally or migrated to other idle processors. Task assignment can be static or dynamic. In applicative systems, a static task allocation method may be viewed as a special case of dynamic load balancing strategy. 1.4.3.1 Fetch and forward A parental apply task may spawn an arbitrary number of child tasks. As stated earlier, each child task is represented by an apply packet which contains the arguments. A processor starts processing a child task and sends out a FETCH packet whenever an argument is needed. Definition 1-4: A FETCH packet is a request for value. It contains the address of the location being fetched and the address of the location where the value is to be stored. Definition 1-5: A FORWARD packet is used to deliver the value of an earlier fetch. It contains the value and the address of the location where the value will be stored. If the fetched argument has not been evaluated, the fetch packet triggers a demand which forms an apply task. The fetch packet waits at the target location until answer of the apply task returns. If the fetched argument is an evaluated result or a predefined constant, the value is forwarded to the fetching task immediately. A task resumes processing when· it receives all required ar-guments. 1.4.3.2 Forward chaining Another scenario for fetching an argument exists when the fetched argument is being evaluated when the new fetch arrives. This evaluation must have been initiated by earlier demand from another task |