Changes

Jump to: navigation, search

Containers/Guarantees for resources

272 bytes removed, 12:43, 23 May 2011
m
Protected "Containers/Guarantees for resources" ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite))
[[Category:UBC]]
[[Category:Containers]]
This page describes how guarantees for resources can be implemented.
{
int sum;
int i;
 
if (N == 1) {
l[0] = R;
return;
}
sum = 0;
for (i = 0; i < N; i++)
sum += R - g[i];
for (i = 0; i < N; i++)
l[i] = (sum - (R - g[i]) - (N - 2) * (R - g[i]))/(N - 1);
}
</pre>
== Disadvantages of this approach = This approach has the following disadvantages # Lets consider initialization - When we create <math>n</math> groups initially, we need to spend <math>O(n^2)</math> time to assign guarantees.# Everytime a limit or a guarantee changes, we need to recalculate guarantees to ensure that the change will not break any guarantees# The same thing as stated above, when a resource group is created or deleted=
This can lead approach has only one disadvantage: O(n) time needed to some instability, start a change in one group propagates to all other groupsnew container.

Navigation menu