System Behavior Settings
You can configure various Subsystem behaviors on the System Behavior page in wRTOS Settings.
Note: Some changes to wRTOS Settings require a restart of the Subsystem. When the Subsystem needs to be restarted, a prompt will appear in the wRTOS Settings footer.
In this section:
Accessing System Behavior Settings
General Behavior
Startup type
Note: This setting requires Windows Administrator privileges.
The startup type determines when the Subsystem starts. You can choose from two possible startup types:
- Manual (default) – The Subsystem does not start until you start it manually or until a dependent process runs. This could be either an RTSS application or a Windows application linked to wRTOS.
- Automatic – The wRTOS Subsystem always starts at system boot time during Windows system Services startup (SERVICE_SYSTEM_START).
Note: The Windows Fast startup option must be disabled when wRTOS is set to Automatic startup. Fast startup is automatically disabled during installation of wRTOS Runtime, so it’s likely that no further action is needed. However, if Fast startup was manually enabled following the installation of wRTOS Runtime, you will need to manually disable it. To do this, follow the steps below:
- Open the Windows Control Panel.
- Click Power Options.
- Select Choose what the power buttons do.
- In the System Settings page, select Change settings that are currently unavailable.
- Under Shutdown, clear selection of Turn on fast startup.
- Click Save changes.
HAL Timer Period
The wRTOS HAL Timer is the primary timer that the wRTOS Subsystem uses for all internal synchronization, timers, and wait functionality. The wRTOS HAL Timer depends on the system hardware and processor. wRTOS performance is deterministic when access to the processor is unimpeded. For example SMI/SMM activity will prevent access to a processor.
The default value for the subsystem HAL Timer Period is 100 microseconds. This value can be as low as 1 microseconds or as large as 1,000 microseconds.
Note: Use caution when setting the HAL timer period below 20 microseconds. If the HAL Timer Period is set too low, it can inversely impact performance or cause your system to hang. Fully test the timer period you set with your real-time application on all systems on which you will deploy to verify that the hardware can accomplish the compilations required in the period set.
This value can have an impact on the responsiveness of the Subsystem and applications. Application timers can only have periods as small as the Subsystem's HAL timer period or a multiple of it. For example, if the HAL timer period is 50, you can create a timer with a period of 50, 100, 200, but not 130. A value of 130 would be rounded up to 150. For more information, see Application Timer Expiration Behavior.
Note: The Time Quantum and Watchdog Timer settings are dependent on the HAL Timer Period. When the HAL Timer Period is changed to a value that invalidates one or more dependent values, the Update Timers dialog appears, where you can change the dependent values to be multiples of the new HAL Timer Period.
To change this setting:
- Select a period from the HAL Timer Period combo box. The available values are:
- 1000, 500, 200, 100 (default), 50, 20, 10, 5, 2, 1
To select a custom HAL Timer Period not listed in the drop-down, enter it in the combo box.
If the Update Timers dialog appears, change the dependent values to be multiples of the new HAL Timer Period, and then click OK.
- Restart the wRTOS Subsystem for your changes to take effect. If you plan to make additional changes that require a restart of the Subsystem, make all the changes first and then restart wRTOS when you are finished.
Default time quantum for all RTSS threads
wRTOS is configured to run the highest-priority thread, until it either completes or yields. There is no round robin within a given priority level. To change this behavior and have wRTOS provide time slices within a priority level, set the default time quantum for all RTSS threads.
Note: If the thread time quantum value is less than the HAL timer period, wRTOS will set the interval to the same value as the HAL timer period. If the thread time quantum interval is greater than the HAL timer period, wRTOS will modulo up the HAL timer period. The thread time quantum interval must be a multiple of the HAL timer period.
To change this setting:
- Enter a positive integer value in the Default time quantum for all RTSS threads text box. When this value is 0 (default), threads run to completion.
Note: An RTSS application can set its own time quantum using RTAPI functions.
- Restart the wRTOS Subsystem for your changes to take effect. If you plan to make additional changes that require a restart of the Subsystem, make all the changes first and then restart wRTOS when you are finished.
Free the stack on a TerminateThread call
The TerminateThread function causes an RTSS thread to exit. You can
configure wRTOS to not free the memory used for an RTSS thread's stack when
the thread is terminated. This is a useful setting when developing and debugging your applications.
To change this setting:
- Do one of the following:
- Set the toggle switch to OFF (default) to free memory when the Subsystem stops.
- Set the toggle switch to ON to free the memory used for an RTSS thread's stack when that thread is terminated.
- Restart the wRTOS Subsystem for your changes to take effect. If you plan to make additional changes that require a restart of the Subsystem, make all the changes first and then restart wRTOS when you are finished.
Prevent priority inversion
You can utilize a tiered-demotion priority inversion protocol in order to prevent priority inversion in the Subsystem (default) or allow priority inversion in the Subsystem.
To change this setting:
- Do one of the following:
- Set the toggle switch to ON (default) to utilize a tiered-demotion priority inversion protocol in order to prevent priority inversion in the Subsystem.
- Set the toggle switch to OFF to allow priority inversion in the Subsystem.
- Restart the wRTOS Subsystem for your changes to take effect. If you plan to make additional changes that require a restart of the Subsystem, make all the changes first and then restart wRTOS when you are finished.
Enable performance optimization with Resource Director Technology (RDT)
When enabled (default), Intel® Resource Director Technology (RDT) performance optimization allows you to configure the available RDT modes for Cache Allocation Technology (CAT) and Memory Bandwidth Allocation (MBA):
- Cache Allocation Technology (CAT) allows wRTOS to allocate L3 cache or L2 cache for each logical processor.
- Memory Bandwidth Allocation (MBA) allows wRTOS to control the memory bandwidth that is available for each core.
RDT uses Class of Service (CLOS) to configure the L3/L2 cache size and memory throttle (delay). As a matter of wRTOS policy for extensibility, CLOS 0 is considered and configured as the highest priority CLOS, followed by CLOS 1, and so on.
For more information, see Optimizing Performance with Intel Resource Director Technology (RDT).
Note: These options will be unavailable if the system hardware does not support Intel® RDT performance optimization.
To change this setting:
- Do one of the following:
- Set the toggle switch to ON (default) to use Resource Director Technology (RDT).
- Set the toggle switch to OFF to disable Resource Director Technology (RDT).
- Restart the wRTOS Subsystem for your changes to take effect. If you plan to make additional changes that require a restart of the Subsystem, make all the changes first and then restart wRTOS when you are finished.
To change the CAT/MBA modes:
Note: RDT performance optimization must be enabled to change CAT/MBA modes.
- Choose a Cache Allocation Technology (CAT) mode:
- Flat performance (default) – All RTSS logical processors are equally configured with all RTSS L3/L2 caches.
- Priority-based CLOS performance – The L3/L2 caches of each RTSS logical processor are based on the Class of Service (CLOS) of the running thread, thus optimizing the performance of the thread with higher priority CLOS by reducing the L3/L2 cache contention from the thread with the lower priority CLOS.
- Choose a Memory Bandwidth Allocation (MBA) mode:
- Flat performance (default) – All RTSS cores are configured with minimum memory delay.
- Priority-based CLOS performance – The memory delay of each RTSS logical processor is based on the Class of Service (CLOS) of the running thread; thus, avoiding the performance degradation of the bandwidth-intense thread with higher priority CLOS by throttling the thread that may be over-utilizing memory bandwidth relative to its priority.
Note: Because the MBA controller is provided per core (the maximum of the delay values of the per-thread CLOS applies to the core), we recommend that you disable Hyper-Threading in the system BIOS when MBA is set to Priority-based.
- Restart the wRTOS Subsystem for your changes to take effect. If you plan to make additional changes that require a restart of the Subsystem, make all the changes first and then restart wRTOS when you are finished.
Exception Handling
The ability to freeze a faulting process is useful during application development and debugging. When a process is frozen, the user is responsible for terminating the process.
Select an option for how the Subsystem should behave when a faulting process occurs:
|
Option |
Behavior |
|---|---|
|
Use Structured Exception Handling; freeze process on unhandled exception |
When an unhandled exception occurs, Structured Exception Handling is used, and the faulting processes are frozen. This can be useful during application development and debugging. When a process is frozen, the user is responsible for terminating the process. |
|
Use Structured Exception Handling; terminate process on unhandled exception (default) |
When an unhandled exception occurs, Structured Exception Handling is used, and the faulting processes are terminated. |
|
Immediately freeze process on exception |
When an exception occurs, faulting processes are immediately frozen. |
|
Immediately terminate process on exception |
When an exception occurs, faulting processes are immediately terminated. |
|
Immediately halt process on exception |
When an exception occurs, faulting processes are immediately halted. wRTOS returns the exception context to Windows, and a memory dump starts. Note: This option is not compatible with debugging. |
Watchdog Timer
This setting allows you to optionally monitor runaway threads. If an RTSS thread is CPU bound, it may not be able to be terminated unless you reboot your system. CPU bound threads may also slow down the Windows Operating system, or block communication between Windows and the wRTOS subsystem.
Note: Enabling the Watchdog Timer is recommended for development but not for production systems since, when triggered, it will freeze all running RTSS threads on the system. You must then restart the Subsystem or reboot the system.
When you monitor runaway threads, you can set a timeout parameter to limit runaway threads. If a RTSS thread runs continuously for more than this amount of time, all RTSS processes and threads are frozen, and a system tray pop-up appears notifying of the Starvation. The user is responsible for terminating all frozen threads. The Subsystem must then be restarted.
Note: This feature is normally used during development and should only be used in a deployed system if your system can handle the scenario where all real-time applications are frozen when the Watchdog Timer starts.
Note: If Monitor for runaway threads is enabled and the Subsystem has frozen all processes, including all wRTOS Network components, you must terminate the frozen processes using the RtssKill utility. For more information, see RtssKill Usage.
To change this setting:
- Do one of the following:
- Set the toggle switch to OFF (default) to disable runaway thread monitoring.
- Set the toggle switch to ON to monitor runaway threads.
- When Monitor for runaway threads is enabled, you can enter a Timeout period, in microseconds. The minimum value is 1000 microseconds. The maximum value is Uint32Max (4,294,967,295). The default is 5 seconds.
Note: The Timeout value must be a multiple of the HAL Timer Period. It must also be less than or equal to the value set for the Stack Timer Interval.
Power Management
wRTOS Settings allows you to change the power management features listed below.
Note: You must have Windows Administrator privileges to change these settings.
Enable Windows idle detection
Use this option to control whether SpeedStep is enabled. SpeedStep allows processors to dynamically switch between different power states to conserve power.
To change this setting:
Do one of the following:
- Set the toggle switch to ON (default) to enable SpeedStep.
- Set the toggle switch to OFF to disable SpeedStep.
Note: Disabling SpeedStep increases power consumption but eliminates increases in real-time latencies caused by power state switching.
Note: The CPU usage displayed in the Task Manager includes the duration when Windows idle detection is disabled. To eliminate jitter with RTSS timer response latency, we recommend that you disable Windows idle detection. As a result, you may see 100% CPU usage in the Windows Task Manager when the Subsystem is running. There is no side effect on Windows load balancing for this type of 100% CPU usage.
Override Windows Processor Energy/Performance Bias
You can optionally override the current Windows Energy/Performance Bias setting.
Note: This setting is not supported on all machines. When not supported, this setting is grayed-out.
To change this setting:
Do one of the following:
- Set the toggle switch to ON (default) and choose a value on the range between increased performance (High performance/low energy efficiency) or increased energy savings (Low performance/high energy efficiency).
- Set the toggle switch to OFF to keep the default Windows Energy/Performance Bias setting.
Note: Reducing energy consumption from Windows cores will promote RTSS thread performance, since RTSS cores and Windows cores reside on the same socket on multi-core systems.
Windows Power Management
Power plans can help you maximize your computer's performance or conserve energy. Click the Windows Power Management link to edit your system's power plan.
RELATED Topics: