⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 reconfig_sched_utils.h

📁 这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用于网络游戏医学图像网关的高qos要求.更详细的内容可阅读相应的材料
💻 H
📖 第 1 页 / 共 2 页
字号:
  // dependencies in the entry's dependency call chain.

  int has_unresolved_local_dependencies_;
  // Flag indicating whether or not there are unresolved local
  // dependencies in the entry's dependency call chain.

  RtecScheduler::Time aggregate_exec_time_;
  // Effective execution time for corresponding RT_Info and its
  // disjunctively executed dependants.

  RtecScheduler::Period_t orig_tuple_period_sum_;
  // Sum of periods for tuples directly associated with the entry.  It
  // can be used to compute the mean rate for the entry.

  RtecScheduler::Period_t prop_tuple_period_sum_;
  // The sum of periods for tuples propagated via dependencies on
  // other entries.  It can be used to compute the mean rate for the
  // entry.

  u_int orig_tuple_count_;
  // The number of tuples directly associated with the entry.

  u_int prop_tuple_count_;
  // The number of tuples propagated via dependencies on other
  // entries.

  TUPLE_SET orig_tuple_subset_;
  // The set of tuples directly associated with the entry.

  TUPLE_SET prop_tuple_subset_;
  // The set of tuples propagated via dependencies on other entries.

  TAO_RT_Info_Tuple * current_admitted_tuple_;
  // A pointer to the entry's most recently admitted tuple.

  RtecScheduler::RT_Info_Enabled_Type_t enabled_;
  // Flag indicating whether or not node is enabled.

  /* - WSOA merge - commented out
  CORBA::Long effective_exec_multiplier_;
  // Effective execution time multiplier for corresponding RT_Info.

  RtecScheduler::Period_t effective_period_;
  // Effective period of corresponding RT_Info.
  */
};


class TAO_RTSched_Export TAO_Reconfig_Sched_Entry_Visitor
  // = TITLE
  //   An abstract base class for scheduler entry visitors.
  //
  // = DESCRIPTION
  //   This class simplifies the reconfig scheduler implementation
  //   by giving a common interface for distinct visitors over the
  //   scheduling entries.
{
public:

  virtual int visit (TAO_Reconfig_Scheduler_Entry &) = 0;
  // Visit a Reconfig Scheduler Entry.

};


class TAO_RTSched_Export TAO_RSE_Reset_Visitor :
  public TAO_Reconfig_Sched_Entry_Visitor
  // = TITLE
  //   A scheduler entry visitor that resets nodes.
  //
  // = DESCRIPTION
  //   This class resets each node it visits to an initial state
  //   prior to the first DFS traversal for topological sorting.
{
public:

  TAO_RSE_Reset_Visitor ();
  // Constructor.

  virtual ~TAO_RSE_Reset_Visitor () {}
  // Destructor.

  virtual int visit (TAO_Reconfig_Scheduler_Entry &rse);
  // Resets the fields in the entry to pre-DFS traversal states.
  // Returns 0 on success and -1 on error.
};

class TAO_RTSched_Export TAO_RT_Info_Tuple_Visitor
  // = TITLE
  //   An abstract base class for RT_Info tuple visitors.
  //
  // = DESCRIPTION
  //   This class simplifies the reconfig scheduler implementation
  //   by giving a common interface for distinct visitors over the
  //   RT_Info tuples.
{
public:

  virtual int visit (TAO_RT_Info_Tuple &) = 0;
  // Visit a RT_Info tuple.

};


class TAO_RTSched_Export TAO_Reconfig_Sched_Strategy_Base
  // = TITLE 
  //   A base class for scheduling strategies
  //
  // = DESCRIPTION This class provides a DFS finish time comparison
  // function, a static subpriority comparison function, and a
  // criticality evaluation function for all scheduling strategies.
{
public:

  static int comp_entry_finish_times (const void *first, const void *second);
  // Ordering function to compare the DFS finish times of
  // two task entries, so qsort orders these in topological
  // order, with the higher times *first*.

  static int is_critical (TAO_Reconfig_Scheduler_Entry &rse);
  // Determines whether or not an entry is critical, based on
  // operation characteristics.  returns 1 if critical, 0 if not

  static int is_critical (TAO_RT_Info_Tuple &t);
  // Determines whether or not a tuple is critical, based on operation
  // characteristics.  returns 1 if critical, 0 if not

  static int compare_subpriority (TAO_Reconfig_Scheduler_Entry &,
                                  TAO_Reconfig_Scheduler_Entry &);
  // Compares two entries by subpriority alone.  Returns -1 if the
  // first one is higher, 0 if they're the same, and 1 if the second one is higher.
};

class TAO_RTSched_Export TAO_MUF_FAIR_Reconfig_Sched_Strategy
  : public TAO_Reconfig_Sched_Strategy_Base
  // = TITLE 
  //   A scheduling strategy that implements the Maximum Urgency First
  //   scheduling algorithm with Fair Admission of Indexed Rates
  //   (FAIR).
  //
  // = DESCRIPTION
  //   The strategy assigns static thread and global priority according
  //   to operation criticality, assigns static subpriority according to
  //   importance and then topological order, and assigns a dispatching
  //   configuration with a minimum laxity dispatching queue for each
  //   distinct criticality level.  It admits operation tuples in order
  //   of ascending rate index, where the lowest rate for an operation
  //   has index 0, the next higher rate has index 1, etc.
{
public:

  static int total_priority_comp (const void *, const void *);
  // Ordering function used to qsort an array of RT_Info_Tuple
  // pointers into a total <priority, subpriority> ordering.  Returns
  // -1 if the first one is higher, 0 if they're the same, and 1 if
  // the second one is higher.

  static int total_admission_comp (const void *, const void *);
  // Ordering function used to qsort an array of RT_Info_Tuple
  // pointers into a total ordering for admission control.  Returns
  // -1 if the first one is higher, 0 if they're the same, and 1 if
  // the second one is higher.

  static int compare_priority (TAO_Reconfig_Scheduler_Entry &,
                               TAO_Reconfig_Scheduler_Entry &);
  // Compares two entries by priority alone.  Returns -1 if the
  // first one is higher, 0 if they're the same, and 1 if the second one is higher.

  static int compare_priority (TAO_RT_Info_Tuple &,
                               TAO_RT_Info_Tuple &);
  // Compares two tuples by priority alone.  Returns -1 if the
  // first one is higher, 0 if they're the same, and 1 if the second one is higher.

  static int compare_admission_order (TAO_RT_Info_Tuple &,
                                      TAO_RT_Info_Tuple &);
  // Compares two tuples by the given admission ordering.  Returns -1 if the
  // first one is earlier, 0 if they're the same, and 1 if the second one is earlier.

  static int assign_config (RtecScheduler::Config_Info &,
                            TAO_Reconfig_Scheduler_Entry &);
  // Fills in a static dispatch configuration for a priority level, based
  // on the operation characteristics of a representative scheduling entry.
};

class TAO_RTSched_Export TAO_RMS_FAIR_Reconfig_Sched_Strategy
  : public TAO_Reconfig_Sched_Strategy_Base
  // = TITLE
  //   A scheduling strategy that implements the Boeing RMS-Dynamic
  //   scheduling algorithm, and the Honeywell MNO admission control
  //   algorithm.
  //
  // = DESCRIPTION
  //   The strategy assigns static thread and global priority
  //   according to criticality and rate, assigns static subpriority
  //   according to importance and then topological order, and assigns
  //   a dispatching configuration with a static dispatching queue for
  //   each high criticality rate, and a single minimum laxity
  //   dispatching queue for all low criticality operations.  It
  //   admits the lowest rate-index tuple for each operation, then
  //   admits operations at their highest admissible rates in priority
  //   order.
{
public:

  static int total_priority_comp (const void *, const void *);
  // Ordering function used to qsort an array of RT_Info_Tuple
  // pointers into a total <priority, subpriority> ordering.  Returns
  // -1 if the first one is higher, 0 if they're the same, and 1 if
  // the second one is higher.

  static int total_admission_comp (const void *, const void *);
  // Ordering function used to qsort an array of RT_Info_Tuple
  // pointers into a total ordering for admission control.  Returns
  // -1 if the first one is higher, 0 if they're the same, and 1 if
  // the second one is higher.

  static int compare_criticality(TAO_Reconfig_Scheduler_Entry &lhs,
                                 TAO_Reconfig_Scheduler_Entry &rhs);
  // Compares two entries by criticality alone.  Returns -1 if the
  // first one is higher, 0 if they're the same, and 1 if the second one is higher.

  static int compare_criticality(TAO_RT_Info_Tuple &lhs,
                                 TAO_RT_Info_Tuple &rhs);
  // Compares two entries by criticality alone.  Returns -1 if the
  // first one is higher, 0 if they're the same, and 1 if the second one is higher.

  static int compare_priority (TAO_Reconfig_Scheduler_Entry &,
                               TAO_Reconfig_Scheduler_Entry &);
  // Compares two entries by priority alone.  Returns -1 if the
  // first one is higher, 0 if they're the same, and 1 if the second one is higher.

  static int compare_priority (TAO_RT_Info_Tuple &,
                               TAO_RT_Info_Tuple &);
  // Compares two tuples by priority alone.  Returns -1 if the
  // first one is higher, 0 if they're the same, and 1 if the second one is higher.

  static int compare_admission_order (TAO_RT_Info_Tuple &,
                                      TAO_RT_Info_Tuple &);
  // Compares two entries by admission ordering policy.  Returns -1 if the
  // first one is earlier, 0 if they're the same, and 1 if the second one is earlier.

  static int compare_subpriority (TAO_Reconfig_Scheduler_Entry &,
                                  TAO_Reconfig_Scheduler_Entry &);
  // Compares two entries by subpriority alone.  Returns -1 if the
  // first one is higher, 0 if they're the same, and 1 if the second one is higher.

  static int assign_config (RtecScheduler::Config_Info &,
                            TAO_Reconfig_Scheduler_Entry &);
  // Fills in a static dispatch configuration for a priority level, based
  // on the operation characteristics of a representative scheduling entry.
};

class TAO_RTSched_Export TAO_RMS_MLF_Reconfig_Sched_Strategy
  : public TAO_Reconfig_Sched_Strategy_Base
  // = TITLE
  //   A scheduling strategy that implements the Boeing RMS-Dynamic
  //   scheduling algorithm, and the Honeywell MNO admission control
  //   algorithm.
  //
  // = DESCRIPTION
  //   The strategy assigns static thread and global priority
  //   according to criticality and rate, assigns static subpriority
  //   according to importance and then topological order, and assigns
  //   a dispatching configuration with a static dispatching queue for
  //   each high criticality rate, and a single minimum laxity
  //   dispatching queue for all low criticality operations.  It
  //   admits the lowest rate-index tuple for each operation, then
  //   admits operations at their highest admissible rates in priority
  //   order.
{
public:

  static int total_priority_comp (const void *, const void *);
  // Ordering function used to qsort an array of RT_Info_Tuple
  // pointers into a total <priority, subpriority> ordering.  Returns
  // -1 if the first one is higher, 0 if they're the same, and 1 if
  // the second one is higher.

  static int total_admission_comp (const void *, const void *);
  // Ordering function used to qsort an array of RT_Info_Tuple
  // pointers into a total ordering for admission control.  Returns
  // -1 if the first one is higher, 0 if they're the same, and 1 if
  // the second one is higher.

  static int compare_criticality(TAO_Reconfig_Scheduler_Entry &lhs,
                                 TAO_Reconfig_Scheduler_Entry &rhs);
  // Compares two entries by criticality alone.  Returns -1 if the
  // first one is higher, 0 if they're the same, and 1 if the second one is higher.

  static int compare_criticality(TAO_RT_Info_Tuple &lhs,
                                 TAO_RT_Info_Tuple &rhs);
  // Compares two entries by criticality alone.  Returns -1 if the
  // first one is higher, 0 if they're the same, and 1 if the second one is higher.

  static int compare_priority (TAO_Reconfig_Scheduler_Entry &,
                               TAO_Reconfig_Scheduler_Entry &);
  // Compares two entries by priority alone.  Returns -1 if the
  // first one is higher, 0 if they're the same, and 1 if the second one is higher.

  static int compare_priority (TAO_RT_Info_Tuple &,
                               TAO_RT_Info_Tuple &);
  // Compares two tuples by priority alone.  Returns -1 if the
  // first one is higher, 0 if they're the same, and 1 if the second one is higher.

  static int compare_admission_order (TAO_RT_Info_Tuple &,
                                      TAO_RT_Info_Tuple &);
  // Compares two entries by admission ordering policy.  Returns -1 if the
  // first one is earlier, 0 if they're the same, and 1 if the second one is earlier.

  static int compare_subpriority (TAO_Reconfig_Scheduler_Entry &,
                                  TAO_Reconfig_Scheduler_Entry &);
  // Compares two entries by subpriority alone.  Returns -1 if the
  // first one is higher, 0 if they're the same, and 1 if the second one is higher.

  static int assign_config (RtecScheduler::Config_Info &,
                            TAO_Reconfig_Scheduler_Entry &);
  // Fills in a static dispatch configuration for a priority level, based
  // on the operation characteristics of a representative scheduling entry.
};

#if defined (__ACE_INLINE__)
#include "Reconfig_Sched_Utils.i"
#endif /* __ACE_INLINE__ */

// Include the templates here.
#include "Reconfig_Sched_Utils_T.h"

#include /**/ "ace/post.h"
#endif /* TAO_RECONFIG_SCHED_UTILS_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -