Research Article

Estimated Interval-Based Checkpointing (EIC) on Spot Instances in Cloud Computing

Algorithm 1

Checkpointing and recovery algorithm.
(1)   // Input: user’s requested task and bid
(2)   // Output: total task execution time and total cost
(3)  Boolean   _flag = false // a flag representing occurrence of a task failure
(4)   Boolean EI_flag = true // a EI_flag representing a task start
(5)   while (! Task execution finishes) do
(6)    if (EI_flag) then
(7)     Estimation( );
(8)     EI_flag = false;
(9)    end if
(10)  if (spot prices < User bid) then
(11)   if ( _flag) then
(12)    Recovery( );
(13)     _flag = false;
(14)   end if
(15)   if (rising edge && Price threshold < spot prices) then
(16)   Checkpoint( );
(17)   end if
(18)   if (Time threshold < execution time in current price) then
(19)   Checkpoint( );
(20)   end if
(21)  end if
(22)  if (failure is occurred) then
(23)    _flag = true;
(24)  end if
(25) end while
(26) Function Estimation( )
(27)  calculate the points of checkpoint to base a price history;
(28)  set the price and time thresholds;
(29) end Function
(30) Function Checkpoint( )
(31)  task a checkpoint on the spot instance;
(32)  Send the checkpoint to the storage;
(33) end Function
(34) Function Recovery( )
(35)  retrieve the checkpoint information form the storage;
(36)  restart the job execution;
(37) end Function