]> rtime.felk.cvut.cz Git - frescor/frsh-include.git/blobdiff - frsh_spare_capacity.h
const
[frescor/frsh-include.git] / frsh_spare_capacity.h
index 700797ce426bb72bdff1090ad6ad88cb143b8288..bed3edec7123bcbe2245d6e6ba8f3c9391685bc7 100644 (file)
@@ -190,13 +190,15 @@ FRSH_CPP_BEGIN_DECLS
  *                   awakening and replenishment periods.
  * @param granularity FRSH_CONTINUOUS:  Use  min-max values,
  *                    FRSH_DISCRETE: Use utilization_set.
- * @param utilization_set A structure of discrete pairs (budget,period)
+ * @param utilization_set A structure of discrete triples (budget,
+ *                          period, deadline)
  * @param importance non-cooperative urgency indicator.  Vres with
  *                   higher importance will get all spare capacity des
  * @param weight    cooperative urgency indicator.  At equal
  *                   importance, spare capacity will be distributed
  *                   proportionally to weight levels.
  *
+ *
  * @return 0 if successful \n
  *   FRSH_ERR_BAD_ARGUMENT :  if contract is NULL  \b or \n
  *     (budget_max value is grater than period_max or smaller than budget_min) \b or \n
@@ -219,9 +221,9 @@ FRSH_CPP_BEGIN_DECLS
  * 
  **/
 int frsh_contract_set_reclamation_params(frsh_contract_t   *contract,
-                                         const struct timespec       *stability_time,
-                                         const struct timespec       *budget_max,
-                                         const struct timespec       *period_min,
+                                         const frsh_rel_time_t       *stability_time,
+                                         const frsh_rel_time_t       *budget_max,
+                                         const frsh_rel_time_t       *period_min,
                                          frsh_granularity_t            granularity,
                                          const frsh_utilization_set_t *utilization_set,
                                          int                          importance,
@@ -246,9 +248,9 @@ int frsh_contract_set_reclamation_params(frsh_contract_t   *contract,
  **/
 int frsh_contract_get_reclamation_params
   (const frsh_contract_t *contract,
-   struct timespec                 *stability_time,
-   struct timespec                 *budget_max,
-   struct timespec                 *period_min,
+   frsh_rel_time_t                 *stability_time,
+   frsh_rel_time_t                 *budget_max,
+   frsh_rel_time_t                 *period_min,
    frsh_granularity_t               *granularity,
    frsh_utilization_set_t           *utilization_set,
    int                             *importance,
@@ -272,7 +274,30 @@ int frsh_contract_get_reclamation_params
  * 
  **/
 int frsh_vres_get_remaining_stability_time(frsh_vres_id_t vres, 
-                                      struct timespec *stability_time);
+                                      frsh_rel_time_t *stability_time);
+
+
+/**
+ * frsh_vres_set_stability_time: 
+ * 
+ * Dynamically set the stability time for a given virtual resource to
+ * the specified interval. This operation sets a new value for the
+ * stability time associated with the virtual resource. As a result of
+ * this call the system may change the allocation of resources to the
+ * current virtual resource. Regardless of whether the resources are
+ * reallocated or not, the call resets the stability period so that
+ * the level of resources allocated to the virtual resource is kept
+ * stable for at least the duration of the requested interval.  The
+ * possibly new values of budget and period are returned in the
+ * corresponding parameters
+ */
+
+int frsh_vres_set_stability_time 
+      (frsh_vres_id_t vres,
+       const frsh_rel_time_t *stability_time,
+       frsh_rel_time_t *budget,
+       frsh_rel_time_t *period);
+
 
 /**
  * frsh_resource_get_capacity()
@@ -335,8 +360,8 @@ int frsh_resource_get_total_weight
  *
  **/
 int frsh_vres_decrease_capacity(frsh_vres_id_t vres,
-                           struct timespec new_budget,
-                           struct timespec new_period);
+                           frsh_rel_time_t new_budget,
+                           frsh_rel_time_t new_period);
 
 
 /*@}*/