Research Article

Scheduling Algorithm: Tasks Scheduling Algorithm for Multiple Processors with Dynamic Reassignment

Algorithm 1

To assign a distributed program consisting of a set T={t1,t2,t3,,tM} of M tasks which is divided into K phases to a set of n processors P={p1,p2,p3,,pN} in order to minimize the total cost.
Step-1: Input:K, M, N, ECM(,   ,), RCM( , , ), RECM( , ), ITCCM( , , )
Step-2: Start with phase k=1.
Step-3: Calculate NECM(,  ,) by adding the ECM(,  ,) with RCM(,  ,) for kth phase.
Step-4: Assign the executing task ts to processor pr for which cost is minimum say TECk
Step-5: Add the effect of communication cost of executing tasks ts with other residing
     tasks by adding kth column of ITCCM(,   ,) to all the column of NECM(,   ,)
     except the rth column at which this task is assigned.
Step-6: Assign the residing tasks tg(g=1,2,,M,gs) to processors ph at which time is
     minimum say TRC(g)k
    Calculate:
              TRCk=i=1isMTRC(i)k
Step-7: Store executing and residing tasks and their position on processors in a linear
     array POSS(,)k.
    Calculate:
              (TCOST)k=TECk+TRCk
Step-8:k=k+1.
Step-9: Repeat step-3.
Step-10: Modify the cost of NECM(,  ,) by adding the relocation cost relsk1 to all eksj,
      j=1,2,,N,jr.
Step-11: Modify the cost of NECM(,   ,) by adding the relocation cost relgk1 to ekgj,
      j=1,2,,N,jh.
Step-12: Repeat step-4 to step-6.
Step-13: Store executing and residing tasks and their position on processors in linear array
      POSS(,)k+1.
      Calculate:
              (TCOST)k+1=TECk+1+TRCk+1
Step-14: If kK
then
         repeat step-8 to step-14.
     else
Step-15: Calculate:
          TCOST=k=1K(TCOST)k
Step-16: End.