Many embedded systems — especially in industrial, automotive, and mission-critical applications — must be highly responsive, meeting strict timing requirements with minimal jitter. Such real-time applications need a different kind of design and underlying architecture. While Linux finds wide use, running real-time applications on it is challenging due to the inherent scheduling overheads of the Linux kernel. On the hardware front, the NVIDIA Jetson Tegra TX1 (along with TX2, Nano, and AGX) is a powerful single-board computer specifically designed for embedded systems and edge computing applications. The NVIDIA Jetson Tegra TX1 runs a customized Linux called L4T (Linux for Tegra), offering advanced features like CUDA and Deepstream libraries for GPU acceleration. This article demonstrates Jailhouse hypervisor real-time isolation on Jetson TX1 as an approach to achieving deterministic real-time performance alongside the full Linux stack.
Real-Time Applications on Linux
While the NVIDIA Jetson Tegra TX1 platform is quite powerful, running real-time applications directly on Linux is difficult. For such applications, specialized real-time operating systems (RTOS) or bare-metal solutions may be more appropriate — but the powerful Linux-based GPU libraries are not available on these. As a middle way, it is possible to use a Hypervisor model where Linux, RTOS, or both can run simultaneously. While the Jetson ecosystem does not have built-in virtualization support, third-party hypervisors such as Xen, KVM, and Jailhouse can be adapted to work with it. Jetson Development Services teams increasingly use Jailhouse hypervisor real-time isolation on Jetson TX1 to enable deterministic compute alongside Linux-based GPU workloads.
This article shows how, by combining the NVIDIA Jetson Tegra TX1 platform and Jailhouse, we can enable real-time applications with a high level of isolation and determinism.
Jetson Development Services: Setting up Jailhouse on NVIDIA Jetson Tegra TX1
The Jailhouse hypervisor is an open-source, partitioning, Linux-based hypervisor designed for safety-critical real-time applications. It is designed specifically for x86 and ARM processors and offers strong isolation between different domains or cells. Jetson Development Services projects use Jailhouse hypervisor real-time isolation on Jetson TX1 to provide an effective platform for executing numerous real-time applications on a single hardware platform.
The below diagram explains how the internal architecture changes from before enabling Jailhouse to after:
Initially, Linux used all the cores. After enabling the hypervisor, it moves Linux to the root-cell and still uses all CPU cores. When a new cell (inmate) is created, the hypervisor calls cpu_down() for some of the CPU cores to offline them. The new cell is assigned these CPU cores and hardware resources dedicated in the cell configuration file. Setting up Jailhouse hypervisor real-time isolation on Jetson TX1 involves the following steps:
- Obtain the Jailhouse hypervisor source code from the official repository or a compatible version.
- Cross-compile the Linux kernel with the necessary Jailhouse configurations for the NVIDIA Jetson Tegra TX1 platform. Jailhouse configuration files define the partitions, memory regions, devices, and CPUs in the form of plain C files (found under configs/ in the sources) compiled into raw binaries.
- The hypervisor requires a contiguous piece of RAM for itself and each additional cell. This must be pre-allocated during boot-up.
$ mem=3968M vmalloc=512M
- Via bootarg, remove console access on serial port from Linux.
$ console=ttyS0,115200n8 earlyprintk=uart8250-32bit,0x70006000 console=tty0
- Cross-compile the Linux kernel with Jailhouse support for the NVIDIA Jetson Tegra TX1 platform and generate the kernel image.
$sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- KDIR=$KERNEL_PATH DESTDIR=$BUILD_DIR_PATH install
Jailhouse.ko kernel module is generated and is ready to enable the hypervisor layer and create cells with demo applications.
Running Jailhouse Hypervisor Real-Time Isolation on Jetson TX1
The below section explains how to run the compiled Jailhouse on the NVIDIA Jetson Tegra TX1 platform.
Enabling Jailhouse
Once Jailhouse is compiled, load the Jailhouse hypervisor module into the Linux kernel:
- $ sudo insmod jailhouse.ko
- $ sudo jailhouse enable configs/arm64/jetson-tx1.cell
This module allows the kernel to work as a Jailhouse hypervisor. A device file /dev/jailhouse is created, Jailhouse is enabled, and the loader linearly maps this memory into the virtual address space of the kernel. Jailhouse hypervisor real-time isolation on Jetson TX1 is now active at the hypervisor level.
Creating the Cell
Create the Jailhouse cell with the following command:
- sudo jailhouse cell create configs/arm64/jetson-tx1-demo.cell
Jailhouse needs to 'shrink' the Linux cell by shifting hardware resources to the new cell. Linux becomes the root cell. Each Jailhouse cell has its own configuration file defining the cell's hardware resources.
Starting the Application
Jailhouse provides various demo applications — one of which is a UART demo application that accesses the primary UART console and prints hello from the inmate. Load it and then start to begin executing the configured cells:
- $sudo jailhouse cell load jetson-tx1-demo uart-demo.bin
- $sudo jailhouse cell start jetson-tx1-demo
Fig. UART-demo Application print on console.
Shutting Down the Cell
Cell destruction is performed by specifying the configuration file of the desired cell:
- $sudo jailhouse cell shutdown jetson-tx1-demo
- $sudo jailhouse cell destroy jetson-tx1-demo
This command removes the cell's configuration from the hypervisor and unmaps all memory regions from the inmate. New cells can be created and executed any number of times.
Real-Time Application Profiling on NVIDIA Jetson Tegra TX1
Real-Time Embedded ML and Jailhouse Isolation
With a fair idea of running Jailhouse cells on the NVIDIA Jetson Tegra TX1, we can profile the performance of Jailhouse inmate applications using GPIO benchmarks. We created an inmate demo application that toggles GPIO pin gpio36 (pin 12 on Jetson TX1) every 400us. Jailhouse hypervisor real-time isolation on Jetson TX1 enables real-time embedded ML workloads to coexist with deterministic RTOS cells, each operating within its isolated cell without interference. Enable access to the GPIO with the ROOTSHARED flag in the configuration file.
We compiled and loaded the gpio-demo application to the inmate and started it. Simultaneously, we ran a script to toggle another GPIO pin on the root cell. These two GPIOs are used for benchmarking the performance of Jailhouse hypervisor real-time isolation on Jetson TX1.
Real-Time Edge Computing Results
The below waveform captures show the performance differences between the Linux application code and Jailhouse-powered RTOS code. This demonstrates the real-time edge computing advantage of Jailhouse hypervisor real-time isolation on Jetson TX1.
The inmate application provides uniform response without much deviation, while in the Linux root cell, the period is inconsistent. Some impact from cache flushes on the Jetson can be observed, but this can be mitigated with proper design.
Conclusion
Jailhouse hypervisor real-time isolation on Jetson TX1 demonstrates that real-time behaviors — latency, determinism, and predictability — are achievable with a hypervisor-based approach on the NVIDIA Jetson Tegra TX1 platform. Jailhouse excels at providing minimal isolation, resource management, and multi-tenancy, making it ideal for scenarios requiring both real-time applications and powerful GPU acceleration in a single system. Embien's Jetson Development Services team has rich experience in tuning Linux for real-time applications and has worked with multiple hypervisors including Jailhouse, KVM, and QEMU across platforms like NVIDIA Jetson TX2, Jetson Nano, NXP iMX8, and Renesas R-Car. Our Jetson Development Services expertise extends to digital transformation services for industrial and edge computing applications, and our containerization for embedded systems solutions complement Jailhouse hypervisor real-time isolation on Jetson TX1 with application-level isolation and deployment flexibility.
