1: begin |
2: Input: mcsched_dom snext that calls the reset_credit() function |
3: Output: execution time of the snext->vcpu and snext |
4: // timed wait and enter BOOST state. |
5: if tick > n then |
6: // previous BOOST state: mcsched_dom prev_boost_sdom. |
7: // initialize a weight value |
8: forall vcpus ∈ prev_boost_sdom do |
9: vcpus→weight ← vcpus→weight/rate; |
10: end |
11: prev_boost_sdom→weight ← |
prev_boost_sdom→weight/rate; |
12: // future BOOST state: mcsched_dom boost_sdom. |
13: // Increment of the magnification of the weight value. |
14: if prev_boost_sdom = boost_sdom then |
15: rate ← rate2; |
16: // Initialization of the magnification of the weight value |
17: else |
18: prev_boost_sdom ← boost_sdom; |
19: rate ← 2; |
20: end |
21: // Initialization of the reset_count variables for all domains |
22: forall vcpus ∈ rqd do |
23: svc→sdom→reset_count ← 0; |
24: end |
25: // Increase the weight value for the BOOST state domain. |
26: forall vcpus ∈ boost_sdom do |
27: vcpus→weight ← vcpus→weightrate; |
28: end |
29: boost_sdom→weight ← boost_sdom→weight/rate; |
30: else |
31: // mcsched_vcpu snext that calls the reset_credit() function. |
32: // Increase the reset_count variable of mcsched_dom using snext |
33: snext→sdom→reset_count ← |
snext→sdom→reset_count+1; |
34: // update a mcsched_dom having the highest reset_count value |
35: if snext→sdom→reset_count > max_reset_count then |
36: max_reset_count ← snext_sdom→reset_count; |
37: boost_sdom ← snext→sdom; |
38: end |
39: end |
40: end |