# Modeling and Evaluation of Power-Aware Software Rejuvenation in Cloud Systems
## 5 The Proposed Model
The rate of activity \(TA_{Ini}\) is demonstrated in Table 1. The predicates and functions corresponding to the input gates of the insertion sub-model are presented in rows 1 and 2 of Table 2,  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Gate** & **Predicate** & **Function** \\ \hline \multirow{2}{*}{\(IG_{Art}\)} & _systemLoad =_ \(\sum\limits_{i=1}^{N}P_{CurrentVMs}\to Mark()+P_{Init}\to Mark()+P_{Mig}\to Mark()\)_;_ & _;_ \\  & _(Q_\({}_{Int}>\)_systemLoad)_ & _return 1: 0_;_ \\ \hline \multirow{4}{*}{\(IG_{Init}\)} & _availCapacity =_ \(\sum\limits_{i=1}^{N}(P_{total_{i}}\to Mark()==T_{2})\) & _;_ \\  & _&& \(\&\) _(P_\({}_{Failed_{i}}\to Mark()==1\))?_ & _;_ \\  & _&& \(M:(M-P_{currentVMs}\to Mark();\) & _;_ \\  & _availCapacity =_ \(P_{Mig}\)_ & _Mark (_);_ \\  & _(P_\({}_{Mig}\) _and Mark (_) \(>\)_0_)_ & _return 1: 0_;_ \\ \hline \multirow{4}{*}{\(IG_{Mig}\)} & _availCapacity =_ \(\sum\limits_{i=1}^{N}(P_{Total_{i}}\to [PERSON]()==T_{2})\) & _&& _;_ \\  & _M:_ \((M-P_{currentVMs}\to [PERSON]();\) & _;_ \\  & _(P_\({}_{Mig}\) _and [PERSON] (_) \(>\)_0_)_ & _return 1: 0_;_ \\ \hline \multirow{4}{*}{\(IG_{Mig}\)} & _availCapacity =_ \((N-\sum\limits_{i=1}^{N}P_{Final_{i}}\to [PERSON]())*M\)_;_ & _;_ \\  & _systemLoad =_ \(\sum\limits_{i=1}^{N}P_{currentVMs}\to [PERSON]()\)_;_ & _;_ \\  & _(availCapacity =_ \(\sum\limits_{i=1}^{N}P_{Final_{i}}\to [PERSON]()+P_{Mig}\to [PERSON]())\) & _;_ \\  & _(P_\({}_{Mig}\) _and [PERSON] (_) \(>\)_0_)_ & _;_ \\ \hline \multirow{4}{*}{\(IG_{Mig}\)} & _availCapacity =_ \(\sum\limits_{j=1}^{N}\frac{(P_{Total_{i}})}{(P_{Total_{i}})}\to [PERSON]()==T_{2})\) & _;_ \\  & _&& \(\&\) _(P_\({}_{Mig}\) _and [PERSON]() \(=\)_1_)_ \\  & _&& \(\&\) _(P_\({}_{Mig}\) _and Mark() \(=\)_1_)_ \\  & _availCapacity =_ \(\sum\limits_{i=1}^{N}P_{Final_{i}}\to [PERSON]()\)_;_ & _;_ \\  & _systemLoad =_ \(\sum\limits_{i=1}^{N}P_{CurrentVMs}\to Mark()\)_;_ & _;_ \\  & _availCapacity =_ \(P_{currentVMs}\to Mark()+P_{Mig}\to [PERSON]()\)_;_ & _;_ \\  & return 1: 0;_ \\ \hline \multirow{4}{*}{\(IG_{TnmOf}\)} & _availCapacity =_ \(\sum\limits_{j=1}^{N}\frac{(P_{Total_{i}})}{(P_{Total_{i}})}\to [PERSON]()==T_{2})\) & _;_ \\  & _&& \(\&\) _(P_\({}_{Mig}\) _and [PERSON]() \(=\)_1_)_ \\  & _&& \(\&\) _(P_\({}_{CurrentVMs}\to [PERSON]()\)_;_ \\  & _(P_\({}_{Final_{i}}\) _and [PERSON] (_) \(<\)_1_)_ & _;_ \\  & _availCapacity =_ \(\sum\limits_{j=1}^{N}\frac{(P_{Total_{i}})}{(P_{Total_{i}})}\to [PERSON]()==T_{2})\) & _;_ \\  & _availCapacity =_ \(\sum\limits_{j=1}^{N}\frac{(P_{Total_{i}})}{(P_{Total_{i}})}\to [PERSON]()==T_{2})\) & _;_ \\  & _availCapacity =_ \(\sum\limits_{j=1}^{N}\frac{(P_{Total_{i}})}{(P_{Total_{i}})}\to [PERSON]()==T_{2})\) & _;_ \\ \hline \multirow{4}{*}{\(IG_{PPRRRj}\)} & _availCapacity =_ \(\sum\limits_{j=1}^{N}\frac{(P_{Total_{i}})}{(P_{Total_{i}})}\to [PERSON]()==T_{2})\) & _;_ \\  & _& \(\&\) _(P_\({}_{Total_{i}}\) _and Mark() \(=\)_1_)_ \\  & _&& \(\&\) _(P_\({}_{Total_{i}}\) _and Mark() \(=\)_1_)_ \\  & _(availCapacity =_ \(P_{currentVMs}\to Mark()\)_;_ & _;_ \\  & _(availCapacity =_ \(P_{currentVMs}\to Mark()\)_;_ & _;_ \\  & _(P_\({}_{Final_{i}}\) _and Mark (_) \(<\)_1_)_ & _;_ \\ \hline \multirow{4}{*}{\(IG_{PPRRj}\)} & _availCapacity =_ \(\sum\limits_{j=1}^{N}\frac{(P_{Total_{i}})}{(P_{Total_{i}})}\to Mark()==T_{2})\) & _;_ \\  & _availCapacity =_ \(\sum\limits_{j=1}^{N}\frac{(P_{Total_{i}})}{(P_{Total_{i}})}\to Mark()==T_{2})\) & _;_ \\  
In Figure 2b, the migration of VMs between VMMs is modeled. When the rejuvenation mechanism or the power saving scheme requires a VM to migrate, a token is put into place \(P_{Mig}\), representing the migration queue. Then, timed activity \(TA_{Mig}\) randomly selects one of the active VMMs that have enough capacity to accept the migrating VM. When there is no VMM with free capacity to serve a migrating VM, input gate \(IG_{Mig}\) prevents timed activity \(TA_{Mig}\) from completion.