7. Hardware Partitioning

Each RTOS guest runs on a specific part of the hardware. In case one RTOS guest is running, the PC hardware is split into two partitions, one partition for all non Real-time guests and one partition for the RTOS guest. If addtional RTOS guests shall be used, each of them needs to get its own partition. A RTOS partition consists of

  • one of multiple dedicated CPU Cores where the RTOS is executed, no other guest is running on this CPU core.

  • dedicated memory for the RTOS, see also here.

  • dedicated devices to be exclusively used by the RTOS.

_images/SysMgrPartitioning.jpg

7.1. RTOS CPU Partitioning

By default, the first RTOS which is added will use the last CPU core of the system, for example the fourth CPU Core (CPU3) in a quad-core CPU. The second RTOS then will use the next CPU, in a quad-core system it would be CPU2.

_images/SysMgrDefaultCpuPartitioning.jpg

7.1.1. Dynamic RTOS CPU Partitioning

In some cases, you may need to run a RTOS guest on a different CPU Core than automatically set. For example, if the CPU provides E-Core and P-Core CPUs, you may want to run the RTOS on an E-Core CPU. You need to change the settings and set the parameter EnableDynamicCpuConfig to True to enable dynamic CPU partitioning. How to change settings, see here.

To dynamically adjust the CPU, you need to select the CPU tab in the Hypervisor configuration. The following screenshot shows the default configuration for a RT-Linux guest on the last CPU core of a 16 core CPU (CPU15).

_images/SysMgrRtlinuxCore15.jpg

If you want to change the CPU core from CPU15 to CPU11 (a hyper threaded P-Core CPU), then select CPU11 in the CPU list and press the Edit button. Then unselect the HOST checkbox and select the rtlinux checkbox.

_images/SysMgrCPU11linux.jpg

On CPU15 you also need to unselect the rtlinux checkbox and select the HOST checkbox.

_images/SysMgrCPU15host.jpg

The result then should look as follows:

_images/SysMgrRtlinuxCore11.jpg

Caution

If additional RTOS guests are added, the System Manager may not automatically assign CPU cores to this RTOS guest, you need to manually assign CPU cores then.

7.2. KVM Guest CPU Usage

The number of CPUs that shall be used by a KVM guest, is determined in the Overview page for the guest.

_images/SysMgrKvmGuestOverview.jpg

The maximum number of CPUs that can be configured for a KVM guest is limited by the number of total CPU cores available and the number of CPU cores configured for RTOS guests. For example, if the PC in total has 16 CPU cores and 2 RTOS guests with in total 2 CPU cores are configured, only 14 CPU cores can be used by the KVM guest.

If more CPU Cores are configured, then the System Manager will show an error message.

_images/SysMgrTooManyKvmCPUs.jpg

You may then use the CPU tab in the Hypervisor configuration and manually assign additional CPU cores to the KVM guest by virtually utilizing the RTOS guest CPUs for KVM guests as well.

In a first step, select the CPU on which the KVM guest currently is not configured to run:

_images/SysMgrSelectCPU.jpg

Then assign the desired guest(s) to the selected CPU:

_images/SysMgrAssignGuestToCPU.jpg
_images/SysMgrAssignGuestToCPUresult.jpg

In the below example, 2 additional virtual CPU cores are added for a Windows 10 guest and one additional CPU core is added to a Ubuntu guest.

_images/SysMgrEnhanceKvmCpuNum.jpg

Caution

You may configure multiple KVM guests, each such guest may use CPU cores up to the total number of CPU cores available. The maximum number of CPU cores utilized by running KVM guests is limited to the total number of CPU cores as well. For example, you may configure 2 KVM guests with each 16 CPU cores on a 16 CPU core system but you only can run one of these guests.

7.3. Assign a Device to a RTOS guest

Select the RTOS where a specific device should be assigned and switch to the Devices tab.

_images/SysMgrSelectRTOS.jpg

Select Add and the device type you want to assign.

_images/SysMgrAddDevType.jpg

Then select the appropriate device, for example an Ethernet adapter.

_images/AddNewEthernetDevice.jpg

Caution

If you assign an Ethernet adapter to a RTOS guest, you need to assure not to accidentally assign the adapter you are remotely connected with the Browser!

In case your hardware has multiple Ethernet adapters, you may wonder how to find the appropriate one you want to use for the RTOS guest. You can find a detailed description of how to assign one of multiple Ethernet adapter here.

Hint

For each device which is assigned to a RTOS guest, two files for example /hv/config/sysmgr_rtos_dev1.sh (for assignment) and /hv/config/sysmgr_rtos_dev1.config (for configuration) are created. The assignment script file (sysmgr_rtos_dev1.sh) is executed within /hv/bin/hvpart.sh and /hv/bin/sysmgr_hvpart.sh when the system boots, it will assign the device to the guest. The configuration file sysmgr_rtos_dev1.config will be included in the respective guest configuration (e.g. in /hv/guest/guest0001/guest.config) which is part of the overall system configuration.

7.4. Remove a Device from a RTOS guest

To remove the device, you may simply delete it in the guest Devices tab.

_images/SysMgrDeleteDevice.jpg

If a guest is removed from the configuration, its devices are automatically removed from this guest as well.