RTI Connext Modern C++ API  Version 5.3.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
rti::core::ThreadSettingsCpuRotationKind_def Struct Reference

Determines how rti::core::ThreadSettings::cpu_list affects processor affinity for thread-related QoS policies that apply to multiple threads. More...

#include <ThreadSettings.hpp>

Public Types

enum  type {
  NO_ROTATION,
  ROUND_ROBIN
}
 The underlying enum type. More...
 

Detailed Description

Determines how rti::core::ThreadSettings::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 rti::core::policy::Event, rti::core::policy::Database, and rti::core::policy::AsynchronousPublisher). However, the thread settings in the rti::core::policy::ReceiverPool 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.

Controlling CPU Core Affinity is only relevant to the rti::core::policy::ReceiverPool. It is ignored within other QoS policies that include rti::core::ThreadSettings.

If rti::core::ThreadSettings::cpu_list is empty, the rotation is irrelevant since no affinity adjustment will occur. Suppose instead that rti::core::ThreadSettings::cpu_list = {0, 1} and that the middleware creates three receive threads: {A, B, C}. If rti::core::ThreadSettings::cpu_rotation is rti::core::ThreadSettingsCpuRotationKind_def::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 rti::core::ThreadSettings::cpu_rotation is rti::core::ThreadSettingsCpuRotationKind_def::ROUND_ROBIN, each thread will be assigned in round-robin fashion to one of the processors in rti::core::ThreadSettings::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. Refer to the Platform Notes for further information.

Member Enumeration Documentation

The underlying enum type.

Enumerator:
NO_ROTATION 

Any thread controlled by this QoS can run on any listed processor, as determined by OS scheduling.

ROUND_ROBIN 

Threads controlled by this QoS will be assigned one processor from the list in round-robin order.


RTI Connext Modern C++ API Version 5.3.1 Copyright © Mon Feb 19 2018 Real-Time Innovations, Inc