Let STT be Start Time of Task
  SIT be Idle Start Time
  EIT be Idle End Time
() denotes task j
For P=1 to the number of processors
 For i=1 to the number of slots on processor P
  For each slot i
    Create ready task list; for doing this task, select the tasks that for those
    STT >= EIT, i.e., select the tasks that is scheduled after a slot.
    Sort tasks acceding based on w()
     If ((( - ) >= w()) && DAT(, ) <= )
     Allocate task j to slot i
     Update slot start and end time
     Update the ready task list
     After rescheduling, newly created slot is added to the slot ready list.
Algorithm 4: Reuse idle time.