Thread Settings
[Extended Qos Support]

The properties of a thread of execution. More...

Classes

struct  DDS_ThreadSettings_t
 The properties of a thread of execution. More...

Defines

#define DDS_THREAD_SETTINGS_KIND_MASK_DEFAULT
 The mask of default thread options.

Typedefs

typedef DDS_UnsignedLong DDS_ThreadSettingsKindMask
 A mask of which each bit is taken from DDS_ThreadSettingsKind.

Enumerations

enum  DDS_ThreadSettingsKind {
  DDS_THREAD_SETTINGS_FLOATING_POINT,
  DDS_THREAD_SETTINGS_STDIO,
  DDS_THREAD_SETTINGS_REALTIME_PRIORITY,
  DDS_THREAD_SETTINGS_PRIORITY_ENFORCE
}
 A collection of flags used to configure threads of execution. More...
enum  DDS_ThreadSettingsCpuRotationKind {
  DDS_THREAD_SETTINGS_CPU_NO_ROTATION,
  DDS_THREAD_SETTINGS_CPU_RR_ROTATION
}
 Determines how DDS_ThreadSettings_t::cpu_list affects processor affinity for thread-related QoS policies that apply to multiple threads. More...

Detailed Description

The properties of a thread of execution.


Define Documentation

#define DDS_THREAD_SETTINGS_KIND_MASK_DEFAULT

The mask of default thread options.


Typedef Documentation

A mask of which each bit is taken from DDS_ThreadSettingsKind.

See also:
DDS_ThreadSettings_t


Enumeration Type Documentation

A collection of flags used to configure threads of execution.

Not all of these options may be relevant for all operating systems.

See also:
DDS_ThreadSettingsKindMask
Enumerator:
DDS_THREAD_SETTINGS_FLOATING_POINT  Code executed within the thread may perform floating point operations.
DDS_THREAD_SETTINGS_STDIO  Code executed within the thread may access standard I/O.
DDS_THREAD_SETTINGS_REALTIME_PRIORITY  The thread will be schedule on a real-time basis.
DDS_THREAD_SETTINGS_PRIORITY_ENFORCE  Strictly enforce this thread's priority.

Determines how DDS_ThreadSettings_t::cpu_list affects processor affinity for thread-related QoS policies that apply to multiple threads.

Controlling CPU Core Affinity for RTI Threads

Most thread-related QoS settings apply to a single thread (such as for the DDS_EventQosPolicy, DDS_DatabaseQosPolicy, and DDS_AsynchronousPublisherQosPolicy). However, the thread settings in the DDS_ReceiverPoolQosPolicy control every receive thread created. In this case, there are several schemes to map M threads to N processors; the rotation kind controls which scheme is used.

If DDS_ThreadSettings_t::cpu_list is empty, the rotation is irrelevant since no affinity adjustment will occur. Suppose instead that DDS_ThreadSettings_t::cpu_list = {0, 1} and that the middleware creates three receive threads: {A, B, C}. If DDS_ThreadSettings_t::cpu_rotation is DDS_THREAD_SETTINGS_CPU_NO_ROTATION, threads A, B and C will have the same processor affinities (0-1), and the OS will control thread scheduling within this bound. It is common to denote CPU affinities as a bitmask, where set bits represent allowed processors to run on. This mask is printed in hex, so a CPU core affinity of 0-1 can be represented by the mask 0x3.

If DDS_ThreadSettings_t::cpu_rotation is DDS_THREAD_SETTINGS_CPU_RR_ROTATION, each thread will be assigned in round-robin fashion to one of the processors in DDS_ThreadSettings_t::cpu_list; perhaps thread A to 0, B to 1, and C to 0. Note that the order in which internal middleware threads spawn is unspecified.

Not all of these options may be relevant for all operating systems.

Enumerator:
DDS_THREAD_SETTINGS_CPU_NO_ROTATION  Any thread controlled by this QoS can run on any listed processor, as determined by OS scheduling.
DDS_THREAD_SETTINGS_CPU_RR_ROTATION  Threads controlled by this QoS will be assigned one processor from the list in round-robin order.


RTI Data Distribution Service C++ API Version 4.5e Copyright © 23 Oct 2011 Real-Time Innovations, Inc