Research Article

Scheduling Parallel Jobs Using Migration and Consolidation in the Cloud

Algorithm 2

Deploy( , BackfillType)—job deploy function.
   input :  :the job to be deployed;
     BackfillType: the algorithm who calls this function.
   output:     : indicate whether be deployed successfully or not;
(1)  begin
(2)  ;
(3)  if     is from the background tier then
(4)  if     can still run in its original processors then
(5)   swap the CPU priorities of its bg VMs and fg VMs;
(6)    ;
(7)   else
(8)    /* Job kill is not allowed in REASY but allowed by KEASY */
(9)    ;
(10)   if    'K' then
(11)    kill   and Dispatch(FG, ).
(12)     ;
(13)  else
(14)   Dispatch(FG, ).
(15)    ;
(16)  return IsSucc;
(17) function Dispatch
(18) sort processes of in descending order of their processor utilization;
(19) if     then
(20)   sorted idle processors in ascending order of their utilization;
(21)  for each process     in the sorted list do
(22)   place to and run in the foreground VM;
(23) else
(24)   sorted idle processors in ascending order of their utilization;
(25)   for each process   do
(26)   place to and run in the background VM;