Subsystem Class

This class represents the persistent configuration state of the wRTOS real-time Subsystem. Configuration changes made via this class become persistent immediately, but they do not take effect until the next time the real-time Subsystem is started.

Inheritance Hierarchy

System.Object
  IntervalZero.MaxRT.wRTOS.wRTOSObject
    IntervalZero.MaxRT.wRTOS.Config.Subsystem

Namespace:  IntervalZero.MaxRT.wRTOS.Config
Assembly:  IntervalZero.MaxRT.wRTOS (in IntervalZero.MaxRT.wRTOS.dll) Version: 1.0.0.0 (File version: 1.0.1)

Syntax

Copy
public class Subsystem : wRTOSObject, IConfigSubsystem

 

The Subsystem class exposes the following members.

Constructors

  Name Description

Public method

Subsystem

Default constructor.

Properties

  Name Description

Public property

DefaultIdealProcessor

Gets or sets the default processor where new processes will be executed by default.

Public property

DefaultTimeQuantum

Accesses the configuration parameter that specifies the default Time Quantum (in microseconds) for newly created real-time threads. By default, wRTOS runs the highest-priority thread, either until completion or until it yields. There is no round robin scheduling within a given priority level. To make wRTOS perform time-sliced round robin scheduling within a priority level, set the default Time Quantum to a non-zero value. A value of 0 means the highest-priority thread runs until completion or until it yields (i.e., no round robin scheduling of threads within a given priority level). A non-zero value enables round robin scheduling of threads within a given priority level using the specified value as the Time Quantum. If this property is changed, the real-time Subsystem must be restarted for the change to take effect.

Public property

DisableWindowsIdleDetection

This property specifies whether the Subsystem should disable Windows Idle Detection. If this property is true, the Subsystem disables Windows Idle Detection, otherwise it does not disable it. When this property is set to true, Windows Idle Detection is only disabled when the wRTOS Subsystem is running.

Public property

EnabledProcessors

Returns the total number of processors on the system, which can exceed the sum of properties WindowsProcessors and RtssProcessorsActual in the case where the wRTOS Subsystem is unable to start some of the requested RTSS processors (for instance, if the Runtime license limits the number of RTSS processors). The value of this property is only meaningful after the real-time Subsystem has been started at least once. If the real-time Subsystem has never been started, this property's value is 0.

Public property

ExceptionHandlingMode

Accesses the Subsystem.ExceptionHandling enumeration specifying the available exception handling options used by the Subsystem.

Public property

FreeStackOnTerminateThread

Accesses the configuration parameter that specifies cleanup behavior when function TerminateThread is called. If set to true, wRTOS frees the memory allocated to the terminated thread's stack. If set to false, wRTOS does not free the memory allocated to the terminated thread's stack. If this parameter is changed, the real-time Subsystem must be restarted for the change to take effect.

Public property

HALTimerPeriod

Accesses the configured HAL timer period (in microseconds) for the wRTOS Subsystem. This property must be set to a value between 1 and 1000 (inclusive). If any other value is assigned to this property, an exception of type wRTOSInvalidPropertyValueException is thrown. The default value is 100 microseconds. Use caution when setting the HAL timer period below 100 microseconds: fully test the timer period on all systems on which you will deploy. If the HAL timer period is too small, it can cause Windows to hang. If this property is changed, the real-time Subsystem must be restarted for the change to take effect.

Protected property

IsDisposed

True if the object has been disposed, false otherwise.

(Inherited from wRTOSObject.)

Public property

Minidump

Accesses the configuration parameter that specifies whether wRTOS includes additional RTSS-specific information in a Windows-generated minidump. If set to true, additional information is included in minidumps, otherwise additional information is not included in minidumps. If this property is changed, the real-time Subsystem must be restarted for the change to take effect. This property is deprecated.

Public property

MSpaceInitialSize

Get/set the MSpace initial size (in kilobytes) for the scheduled process.

Public property

MSpaceExpandSize

Get/set the MSpace expansion size (in kilobytes) for the scheduled process.

Public property

PriorityInversionEnabled

Accesses the priority inversion protocol configuration state of the Subsystem. If set to true, a "tiered demotion" priority inversion protocol is used. If set to false, no priority inversion protocol is enabled. If this property is changed, the real-time Subsystem must be restarted for the change to take effect.

Public property

ProcessExtMSpacePoolMinimumSize

Accesses the configuration parameter that specifies the minimum size, in kilobytes, of the local pool within the RTSS process external MSpace.

Public property

ProcessIntMSpacePoolMinimumSize

Accesses the configuration parameter that specifies the minimum size, in kilobytes, of the local pool within the RTSS process internal MSpace.

Public property

ProcessMSpacesPoolExpandable

Accesses the configuration parameter that specifies whether the local pool within the RTSS process MSpace is expandable. If true, the local pool within the RTSS process MSpace is expandable by the amount specified by ProcessMSpacesPoolExpandSize when depleted.

Public property

ProcessMSpacesPoolExpandSize

Accesses the configuration parameter that specifies the size, in kilobytes, by which to expand the local pool within the RTSS process MSpace when ProcessMSpacesPoolExpandable is set to true.

Public property

ProcessMSpacesPoolShrinkable

Accesses the configuration parameter that specifies whether the local pool within the RTSS process MSpace is shrinkable.

Public property

RDTFeatureMode CATMode

Retrieves the current Intel® Cache Allocation Technology (CAT) mode for performance differentiation among RTSS threads.

Public property

RDTFeatureMode MBAMode

Retrieves the current Intel® Memory Bandwidth Technology (MBA) mode for performance differentiation among RTSS threads.

Public property

RDTState RDT

Retrieves the current state of Intel® Resource Director Technology (RDT) performance optimization.

Public property

RestartNeeded

This property's value indicates whether the real-time Subsystem needs to be restarted or the computer needs to be restarted in order for configuration changes made with this class to take effect, even if the changes were made in another process. If the value of this property is RestartKind.NONE, no restart of the real-time Subsystem or computer is needed. If the value of this property is RestartKind.SUBSYSTEM, the real-time Subsystem needs to be restarted. If the value of this property is RestartKind.COMPUTER, the computer needs to be restarted.

Public property

RtssProcessorsActual

Returns the actual number of wRTOS processors being used by the real-time Subsystem. The value of this property can differ from the value of property RtssProcessorsRequested if the real-time Subsystem is unable to start some of the requested RTSS processors. The value of this property is only meaningful after the real-time Subsystem has been started at least once. When the real-time Subsystem is stopped, this property's value is 0. See method SetWindowsAndRtssProcessorsRequested. .

Public property

RtssProcessorsRequested

Read-only. Returns the requested number RTSS processors. If processor configuration has not happened yet, this property will return a wRTOSNotConfiguredException, and the real-time Subsystem cannot be started. See method SetWindowsAndRtssProcessorsRequested().

Public property

SearchPath

This property's value is a list of strings specifying directories to be searched when a real-time process calls LoadLibrary or RtCreateProcess and does not pass an absolute pathname to the RTDLL or RTSS file. Each element of this array must be an absolute path ending with a '\' character.

Public property

StartMode

Accesses the RTSS boot start mode of the real-time Subsystem. The value of this property is one of the SubsystemStartMode enumerators.

Public property

SystemExtMSpacePoolCommit

Accesses the configuration parameter that specifies whether the local pool within the system process external MSpace is committed at startup.

Public property

SystemMSpacesPoolExpandable

Accesses the configuration parameter that specifies whether the local pool within the system process MSpace is expandable by the amount specified by SystemMSpacesPoolExpandSize when depleted.

Public property

SystemMSpacesPoolExpandSize

Accesses the configuration parameter that specifies the size, in kilobytes, by which to expand the local pool within the system process MSpace when SystemMSpacesPoolExpandable is set to true.

Public property

SystemExtMSpacePoolMinimumSize

Accesses the configuration parameter that specifies the minimum size, in kilobytes, of the local pool within the system process internal MSpace.

Public property

SystemIntMSpacePoolMinimumSize

Accesses the configuration parameter that specifies the minimum size, in kilobytes, of the local pool within the system process external MSpace.

Public property

SystemMSpacesPoolShrinkable

Accesses the configuration parameter that specifies whether the local pool within the system process MSpace is shrinkable.

Public property

TCPIPExtMSpacePoolMinimumSize

Accesses the configuration parameter that specifies the minimum size, in kilobytes, of the local pool within the RT-TCP-IP Stack external MSpace.

Public property

TCPIPMSpacesPoolExpandable

Accesses the configuration parameter that specifies whether the local pool within the TCP/IP Stack MSpace is expandable. If true, the local pool within the TCP/IP Stack MSpace is expandable by the amount specified by TCPIPMSpacesPoolExpandSize when depleted.

Public property

TCPIPMSpacesPoolExpandSize

Accesses the configuration parameter that specifies the size, in kilobytes, by which to expand the local pool within the TCP/IP Stack MSpace when TCPIPMSpacesPoolExpandable is set to true.

Public property

WatchdogEnabled

Accesses the configuration parameter that enables or disables runaway real-time thread detection. If this configuration parameter is set to true, runaway thread detection is enabled, otherwise it is disabled. If a real-time thread executes continuously for more than the amount of time specified by property IntervalZero.MaxRT.wRTOS.Config.Subsystem.WatchdogTimeout, all real-time threads are suspended on all processors, and those real-time processes must be terminated with the RTSSkill utility. In a production environments, it is recommended this this configuration parameter be set to false to disable runaway thread detection.

Public property

WatchdogTimeout

Accesses the timeout (in microseconds) for a real-time thread to be considered a runaway thread. If this configuration parameter is set to 0, runaway thread detection is disabled. If a real-time thread executes continuously for more than this amount of time, all real-time threads are suspended on all processors, and those real-time processes must be terminated with the RTSSkill utility. In production environments, it is recommended this this configuration parameter be set to 0 to disable runaway thread detection.

Public property

WindowsEnergyPerformanceBias

Configures the Windows Processor Energy/Performance Bias setting.

Public property

WindowsProcessors

Read-only. Returns the configured number of Windows processors. If processor configuration has not happened yet, this property will return a wRTOSNotConfiguredException, and the real-time Subsystem cannot be started. See method SetWindowsAndRtssProcessorsRequested().

Public property

ZeroMemoryAtAllocation

Accesses the configuration parameter that specifies whether the memory allocated by malloc or similar functions is initialized to zero (according to the C99 specification). This setting is disabled by default, as zeroing memory causes a performance lag. Therefore, memory requests from some C-Runtime functions or RTAPIs will not be initialized to zero at allocation. However, by definition, memory requests from calloc/_recalloc, VirtualAlloc, and HeapAlloc/HeapReAlloc with the HEAP_ZERO_MEMORY flag will be initialized to zero at allocation, regardless of the value of this property.

Methods

  Name Description

Public method

AddScheduledProcess

Adds a ScheduledProcess to be started on start up of the Subsystem.

Public method

Dispose

Dispose method.

(Inherited from wRTOSObject.)

Public method

GetArrayOfScheduledProcesses

Returns a list of ScheduledProcess Objects. This can be used to make changes to scheduledProcesses that have already been added.

Note: The order of the scheduled tasks is the order by which they will be executed. You can remove scheduled tasks by calling .Delete() on one of the objects returned in the list. This object becomes disposed and will throw an exception if any of its properties are referenced again. If another instance of this list exists and contains the object that was deleted from the other list it too will crash if any properties of the deleted are referenced.

Protected method

OnNotifyPropertyChanged

Called when a property is changed

(Inherited from wRTOSObject.)

Public method

RemoveScheduledProcess

Removes a Process from the List of Scheduled Processes

Public method

Reset

Resets all Subsystem configuration parameters to their default values. After this method is called, the machine must be rebooted for the changes to take effect.

Public method

ResetDefaultIdealProcessor

Resets property DefaultIdealProcessor to its default value (0). After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetDefaultTimeQuantum

Resets property DefaultTimeQuantum to its default value (0). After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetDisableWindowsIdleDetection

Resets property DisableWindowsIdleDetection to its default value (true). After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetExceptionBehavior

Reset the Exception behavior property to it's default value of false. false give it the behavior to halt the process.

Public method

ResetFreeStackOnTerminateThread

Resets property FreeStackOnTerminateThread to its default value (false). After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetFreezeFaultingProcessOnException

Resets property FreezeFaultingProcessOnException to its default value (false). After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetHALTimerPeriod

Resets property HALTimerPeriod to its default value (100). After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetMinidump

Resets property Minidump to its default value (true). After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetPriorityInversionEnabled

Resets property PriorityInversionEnabled to its default value (true). After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetProcessExtMSpacePoolMinimumSize

Resets property ProcessExtMSpacePoolMinimumSize to its default value. After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetProcessIntMSpacePoolMinimumSize

Resets property ProcessIntMSpacePoolMinimumSize to its default value. After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetProcessMSpacesPoolExpandable

Resets property ProcessMSpacesPoolExpandable to its default value. After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetProcessMSpacesPoolExpandSize

Resets property ProcessMSpacesPoolExpandSize to its default value. After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetProcessMSpacesPoolShrinkable

Resets property ProcessMSpacesPoolShrinkable to its default value. After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetRDTFeatureMode CATMode Method

Resets property RDTFeatureMode CATMode to its default value. After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetRDTFeatureMode MBAMode Method

Resets property RDTFeatureMode MBAMode to its default value. After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetRDTState RDT Method

Resets property RDTState RDT to its default value. After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetSearchPath

Resets property Path to its default value of an empty array of strings. After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetStartMode

Resets property StartMode to its default value (SubsystemStartMode.DEMAND_START).

Public method

ResetSystemExtMSpacePoolCommit

Resets property SystemExtMSpacePoolCommit to its default value. After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetSystemExtMSpacePoolMinimumSize

Resets property SystemExtMSpacePoolMinimumSize to its default value. After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetSystemIntMSpacePoolMinimumSize

Resets property SystemIntMSpacePoolMinimumSize to its default value. After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetSystemMSpacesPoolExpandable

Resets property SystemMSpacesPoolExpandable to its default value. After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetSystemMSpacesPoolExpandSize

Resets property SystemMSpacesPoolExpandSize to its default value. After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetSystemMSpacesPoolShrinkable

Resets property SystemMSpacesPoolShrinkable to its default value. After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetTCPIPExtMSpacePoolMinimumSize

Resets property TCPIPExtMSpacePoolMinimumSize to its default value. After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetTCPIPMSpacesPoolExpandable

Resets property TCPIPMSpacesPoolExpandable to its default value. After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetTCPIPMSpacesPoolExpandSize

Resets property TCPIPMSpacesPoolExpandSize to its default value. After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetUseStructuredExceptionHandling

Resets property UseStructuredExceptionHandling to its default value.

Public method

ResetWatchdogEnabled

Resets property WatchdogEnabled to its default value (true). After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetWatchdogTimeout

Resets property WatchdogTimeout to its default value (5,000,000 microseconds). After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

ResetZeroMemoryAtAllocation

Resets property WatchdogEnabled to its default value. After this method is called, the real-time Subsystem must be restarted for the change to take effect.

Public method

SetHALTimerPeriod

Sets the HAL timer period (in microseconds) for the wRTOS Subsystem.

Public method

SetNewOrder

Moves the order of execution for this scheduled process object to a new position in the list.

Public method

SetWindowsAndRtssProcessorsRequested

This method atomically sets the requested number of Windows and RTSS processors. If the requested number of RTSS processors is changed, the real-time Subsystem must be restarted for the change to take effect. If the requested number of Windows processors is changed, the machine must be rebooted for the change to take effect.

Events

  Name Description

Public event

PropertyChanged

Event Fired when a property value is changed

(Inherited from wRTOSObject.)

Fields

  Name Description

Public field Static member

HAL_TIMER_PERIOD_1

These constants specify some commonly-used HAL timer period values (in microseconds) that can be assigned to property HALTimerPeriod.

Public field Static member

HAL_TIMER_PERIOD_2

This represents a HAL timer period of 2 microseconds.

Public field Static member

HAL_TIMER_PERIOD_5

This represents a HAL timer period of 5 microseconds.

Public field Static member

HAL_TIMER_PERIOD_10

This represents a HAL timer period of 10 microseconds.

Public field Static member

HAL_TIMER_PERIOD_20

This represents a HAL timer period of 20 microseconds.

Public field Static member

HAL_TIMER_PERIOD_50

This represents a HAL timer period of 50 microseconds.

Public field Static member

HAL_TIMER_PERIOD_100

This represents a HAL timer period of 100 microseconds.

Public field Static member

HAL_TIMER_PERIOD_200

This represents a HAL timer period of 200 microseconds.

Public field Static member

HAL_TIMER_PERIOD_500

This represents a HAL timer period of 500 microseconds.

Public field Static member

HAL_TIMER_PERIOD_1000

This represents a HAL timer period of 1000 microseconds.

See Also: