Research Article

An Efficient Evolutionary Task Scheduling/Binding Framework for Reconfigurable Systems

Algorithm 2

Pseudo-code for RCOnline/RCOnline-Enh. (with reuse and task migration).
()    // The PRRS should be stored from the smallest to largest such that
()    // those with smaller reconfiguration time have smaller IDs
()    Sort PRRs in ascending order based on size.
()    Read the node with the highest task priority
()    if (All dependencies are met)
()    add task to ready queue
()    // SELECTION BY RCOnline versus RCOnline-Enh
()    Fetch the first task from the ReadyQueue // -- used by RCOnline
()    Fetch a task that matches an existing reconfigured task // -- used by RCOnline-Enh
() switch (task->mode)
() case Hybrid_HW  :
() if (TaskTypePriority==0 and GPP is free)
() // TaskTypePriority ==0 indicates that task is preferred to run on SW
() Migrate task from HybridHW to HybridSW
() Add to the beginning of the ReadyQueue
() else
() if (there is a free PRR(s) that fits the current task)
()   Search Free PRRs for a match
() against the ready task
() if (task found)
() run ready task on the free PRR
() else
() currentPRR= smallest free PRR;
()   if (TaskTypePriority< currentPRR and GPP is free)
()         // check if it's faster to reconfigure or run on SW
() Migrate task from HybridHW to HybridSW
()     Add to the beginning of the ReadyQueue  
() else
()   Reconfigure currentPRR with the ready task bit-stream
() else   // all PRRs are busy
() if ( GPP is free)
() Migrate task from HybridHW to HybridSW
() Add to the beginning of the ReadyQueue  
() else
() // return to main program and
() // wait for free resources
() Increase the Busy Counter
() return Busy
()   break ;
() case HybridSW  :
() if (GPP is free)
()  load task into GPP
() else if (there is a free PRR)
() Migrate task from HybridSW to HybridHW
()    Add to the beginning of the ReadyQueue
() else
() // return to main program and
() //wait for free resources
() Increase the Busy Counter
() return Busy
() break ; End