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:

Click to expandAccessing System Behavior Settings

To open the System Behavior page in wRTOS Settings:

  1. Open wRTOS Settings.
  2. Do one of the following:
  • From the Home page, click Subsystem. On the Subsystem page, click System Behavior.

  • From any other wRTOS Settings page, click Contents / Subsystem / System Behavior in the sidebar menu.

 


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:

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:

  1. Open the Windows Control Panel.
  2. Click Power Options.
  3. Select Choose what the power buttons do.
  4. In the System Settings page, select Change settings that are currently unavailable.
  5. Under Shutdown, clear selection of Turn on fast startup.
  6. 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:

  1. 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.

  1. 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:

  1. 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.

  1. 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:

  1. Do one of the following:
  1. 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. For more information on priority inversion protocols, see Thread Scheduling.

To change this setting:

  1. Do one of the following:
  1. 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):

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:

  1. Do one of the following:
  1. 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.

  1. Choose a Cache Allocation Technology (CAT) mode:
  1. Choose a Memory Bandwidth Allocation (MBA) mode:

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.

  1. 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. See Runaway Thread Management for more information on how the Watchdog Timer works and when it should be used.

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:

  1. Do one of the following:
  1. 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:

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:

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: