Tuning a real-time kernel | Ubuntu (2023)

This blog expands our technical deep-dive into a real-time kernel. You will need to be familiar with a real-time kernel to understand the tuning concepts in this blog. If you are starting from scratch and need to revisit the basics of preemption and a real-time system, watch this introductory webinar. If you are interested in the primary test suites for real-time Ubuntu, an explanation of the components and processes involved, head over to the first part of this mini-series. Alternatively, keep reading to learn the three primary metrics to monitor when tuning a real-time kernel, some key configs set at compile time, and a tuning example.

Before tuning, let’s launch the real-time Ubuntu kernel.

Launching the real-time kernel

Canonical’s real-time kernel can be accessed through Ubuntu Pro, an extensive enterprise security and compliance subscription (free for personal and small-scale commercial use on up to 5 machines). With an Ubuntu Pro subscription, launching the kernel becomes a simple process:

pro attach <token>
pro enable realtime-kernel

Moreover, Canonical offers specialised versions of the real-time kernel. Optimised real-time Ubuntu on 12th Gen Intel® Core™ processors, currently in beta, delivers low latency for time-sensitive workloads in industrial settings.

To access real-time Ubuntu on Intel SoCs, Ubuntu Pro is also the way to go:

pro attach <token>
pro enable realtime-kernel --access-only
apt install ubuntu-intel-iot-realtime

Considerations before tuning

Once you launch a real-time kernel, you can start tuning. Tuning a real-time kernel is a complex endeavour, as each layer of a real-time stack must support deterministic processing. From the hardware to the kernel, and finally through to the application, every level can be a source of latency. A real-time kernel on its own will not necessarily make a system real-time, as even the most efficient Real Time Operating System (RTOS) can be useless in the presence of other latency sinks. Specific tuning for each use case is required, and an optimal combination of tuning configs for one particular hardware platform may still lead to poor results in a different environment. Real-time Ubuntu does not guarantee a maximum latency as performance strictly depends on the system at hand. From networking to cache partitioning, every shared resource can affect cycle times and be a source of jitter. Setting up a real-time configuration to meet stringent low-latency requirements takes careful understanding and tuning.

What follows are considerations that may prove helpful in some real-time environments. Rather than recommended configurations leading to optimal performance, they are intended as starting points for a subsequent, iterative tuning process. Only the engineering team developing a real-time stack controls the deployment environment and can decide on the best tuning configuration options. The real-time developers architecting the overall hardware and software system are responsible for end-application tuning and optimisation of individual drivers for specific workloads.

Metrics and tools for tuning

The three primary metrics to monitor when tuning a real-time kernel are jitter, average latency and max latency.

The maximum latency is the key metric, and it is fundamental to know its value before running in production. A preemptive kernel aims to provide a deterministic response time to service events, with system failure in case of missed deadlines regardless of the system load. For instance, if the maximum latency for an airbag is 10 μs, any reaction time higher than the specified upper boundary results in system failure. When tuning, one must ensure the real-time system can process threads and processes within the maximum latency measured during each task period or the real-time application lifetime. Jitter is the difference between average and max latency over time.

Typical tools to capture system resource statistics which are useful for tuning are ps, perf, irqtop, stress-ng, Cyclictest, irqstat, dstat, and watch_interupts. One can monitor by, for instance, watching the interrupts at /proc/interrupts via the watch command as per:

watch -n1 -d "cat /proc/interrupts"

Similarly, the ps command can help determine information like the processors on which a task is running on and its priority level via:

ps -eo psr,tid,pid,comm,%cpu,priority,nice -T | sort -g | grep irq

TuneD, RTLA and ftrace are alternative tools that may assist when tuning. TuneD is a userspace tool to set parameters and tuning profiles without manually modifying the grub configuration file. It helps isolate CPUs and set iirqs. The real-time Linux Analysis (RTLA) tool, merged into upstream 5.17, can trace kernel latencies. It is not available in Ubuntu 22.04 but can be backported; it requires libtracefs v1.3.0.Finally, ftrace to profile applications is also worthy of mention, and it helps assess latencies and performance issues occurring outside of user-space.

BIOS options

Whereas the previous paragraphs mentioned jitter, average latency and max latency as the primary metrics to monitor, this section lists some BIOS options to look for when tuning a real-time kernel.

In a real-time system, the kernel is not the only possible source of latency. The applications, the hardware, firmware and BIOS for the hardware can also influence this. In addition to tuning parameters and applications, a real-time developer needs to review and consider these BIOS options when setting up a low-latency environment:

  • SMIs
  • C state
  • Intel speed step
  • Turbo mode
  • VTx
  • VTd
  • Hyperthreading

Identifying and tweaking kernel config options are arguably the most time-consuming, iterative activities to reduce latency when tuning. The following paragraphs will highlight and explain key tuning parameters and boot options. Starting with CONFIG_NO_HZ_FULL to omit scheduling-clock ticks and CONFIG_RCU_NOCB_CPU to enable callback offloading. We will cover relevant boot parameters, followed by an overview of kthread_cpus, to specify which CPU to use for kernel threads. Finally, we will provide reference code snippets for assigning real-time threads and processes to specific cores at runtime, as well as an example of adding config options /etc/default/grub.

Config options

This section highlights some tuning configs set at compile time when using a real-time kernel.

Scheduling-clock ticks

As nohz=on for tickless CPUs disables the timer tick on the specified CPUs, the CONFIG_NO_HZ_FULL config option indicates how the system will generate clock checks and will cause the kernel to avoid sending scheduling-clock interrupts to CPUs with a single runnable task or are idle.

nohz_full=<list of isolated cpus> reduces the number of scheduling-clock interrupts, improving energy efficiency and reducing OS jitter.

When tuning a real-time system, it is customary to assign one task per CPU. By setting CONFIG_NO_HZ_FULL= y it will omit scheduling-clock ticks on CPUs that are either idle or that have only one runnable task.
Please note the boot CPU cannot run in nohz_full mode, as at least one CPU needs to continue to receive interrupts and do the necessary housekeeping. Further information can be found in the kernel.org documentation.

RCU callbacks

Another config option is Read-copy-update (RCU) with no callbacks: CONFIG_RCU_NOCB_CPU = y. RCU carries out significant processing in Softirqs contexts, during which preemption is disabled, causing unbounded latencies. These callbacks often free memory with memory allocators imposing large latencies when taking slow paths. For example, rcu_nocbs=1,3-4 would enable callback offloading on CPUs 1, 3, and 4.

The real-time Ubuntu kernel sets it to all, as per CONFIG_RCU_NOCB_CPU_ALL = y

rcu_nocb_poll makes kthreads poll for callbacks instead of explicitly awakening the corresponding kthreads. The RCU offload threads will be periodically raised by a timer to check if there are callbacks to run. In this way, rcu_nocb_poll helps improve the real-time response for the offloaded CPUs by relieving them of the need to wake up the corresponding kthread.

The above tuning configs are done at compile time. Once set, they can’t be changed unless the kernel is recompiled. Preemptiveness can, on the other hand, be dynamically changed at run time.
The discussion so far exposed parameters for scheduling clock ticks and RCU config options. The remainder of this section will introduce further boot parameters, like timer_migration and sched_rt_runtime, as well as common approaches to handle IRQ interrupts.

Boot parameters

This section lists a few additional parameters worth monitoring when tuning a real-time Linux system with PREEMPT_RT, like kthread_cpus, domain, isolcpus, timer_migration and sched_rt_runtime. For a more thorough discussion, please refer to the kernel’s documentation.

Kernel threads like ksoftirqd, kworker and migration need to run on every CPU regardless of isolation, and kthread_cpus to define CPUs for kernel threads, can be particularly handy.

domain removes the CPUs from the scheduling algorithm. isolcpus is used specifically for userspace or real-time processing. It isolates CPUs so they only run specific tasks, and will have a limited number of kernel threads to run. This way, housekeeping threads won’t run on these CPUs and prevents them from being targeted by managed interrupts.

In a real-time system with multiple sockets, it helps to turn the timer_migration parameter off so as to prevent the timer from migrating between them. By setting timer_migration = 0 in a multi socket machine, the time will stay assigned to a core.

The echo 0 > /proc/sys/kernel/timer_migration command will set the relevant information.

sched_rt_runtime is an important kernel parameter to specify the number of μs during which a real-time process can dominate a CPU. When running tasks on isolcpus, setting kernel.sched_rt_runtime_us = -1 turns off throttling, allowing a process or real-time task to dominate the CPU indefinitely. Setting it to -1 via:

echo -1 > /proc/sys/kernel/sched_rt_runtime_us 

is often desired when tuning a system as all real-time processes or threads will be on cores 1-95 (and can thus be allowed to dominate the CPU). Please note limiting the execution time of real-time tasks per period can be dangerous on a generic system without isolated CPUs and is only advised on a real-time kernel.

IRQ Affinity

IRQ interrupts, often originating from device drivers, can cause issues with the tuning of real-time processes. For instance, pushing a button on a keyboard or moving the mouse can cause interrupts which have to be processed by the CPU.

Common parameters to handle IRQ interrupts are kthread_cpus, to specify which CPU to use for all kernel threads, irqaffinity and isolcpus.

Every IRQ can be seen in /proc/interrupts and irqaffinity=<list of non-isolated cpus> assigns all IRQs to the specified core.

/etc/systemd/system.conf defines the IRQ affinity, which can be set as CPUAffinity=0. Checking the current IRQ affinity per interrupt is easy via a for loop through the IRQs listed in /proc/irq, followed by the $i IRQ number:

for i in {1..54} ; do cat /proc/irq/$i/smp_affinity; done 

The file smp_affinity will then clarify on which core or CPU the IRQs are assigned to (0 in this case).

Assigning threads to cores

This section provides examples of assigning real-time threads and processes to specific cores at runtime.

The taskset and cset commands, the POSIX function calls, or other software using the CPU affinity syscalls specify which CPUs to run drivers and real-time applications. Otherwise tasks will be assigned to any of the CPUs defined by isolcpus.

At runtime you can use the taskset command to pin a process to a specific CPU by specifying the CPU_NUM (cpu number) and PID as:

taskset -pc CPU_NUM[s] PID

The below example code snippet exemplifies how to assign CPU 0 to 7 to a specific cpuset:

/* Set affinity mask to include CPUs 0 to 7. */
for (int j = 0; j < 8; j++)
CPU_SET(j, &cpuset);

Communicating existing threads to only run on CPUs 0 to 7 can be done by setting the affinity as per:

s = pthread_setaffinity_np(thread, sizeof(cpuset), &cpuset);
/* Sets the CPU affinity mask for the given thread to the given set of CPUs*/

Adding params to grub

As an example to shed some further light, the tuning parameters discussed so far can be set by adding the following line to /etc/default/grub:

GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200 skew_tick=1 rcu_nocb_poll rcu_nocbs=1-95 nohz=on nohz_full=1-95 kthread_cpus=0 irqaffinity=0 isolcpus=managed_irq,domain,1-95 intel_pstate=disable nosoftlockup tsc=nowatchdog"

The above refers to a 96-cores machine, where CPU core 0 is for housekeeping and kernel work, and will handle all IRQs. 1-95 is the list of CPUs where the isolation options are applied for real-time userspace applications. Furthermore, nohz disables the timer tick on the specified CPUs and domain removes the CPUs from the scheduling algorithms.

Tuning example

A generic Linux kernel will often lead to spikes in latency. Similarly, while the average latency will decrease, an out-of-the-box real-time kernel with no tuning can have maximum latency values higher than desired.

Performance strictly depends on the system at hand. However, a good rule of thumb for the maximum latency of a real-time Linux system is around 100 μs. On the other hand, real-time Ubuntu with a few changes to boot parameters can result in an average latency of 2-3 μs and max latency dropping considerably, with all values well under 100 μs.

The easiest way to get a feel for the improved results is to compare a generic Linux kernel with the non-tuned, default real-time Ubuntu and a tuned version.

Start by creating pre-defined grub files in which to put boot parameters. Those strictly depend on the specific use case – for instance, after a bit of tuning, 2 housekeeping CPUs may be the most effective. A real-time developer must figure this out on their system.

Assuming the below example combination leads to optimal results, add these boot parameters:

rcu_nocb_poll rcu_nocbs=2-95 nohz=on nohz_full=2-95 kthread_cpus=0,1 irqaffinity=0,1 isolcpus=managed_irq,domain,2-95

Then, set the IRQ affinity in /etc/systemd/system.conf and disable throttling as per:

sudo sysctl kernel.sched_rt_runtime_us=-1
echo -1 > /proc/sys/kernel/sched_rt_runtime_us

You can now disable timer migration via:

sudo sysctl kernel.timer_migration=0
echo 0 > /proc/sys/kernel/timer_migration

Finally, update grub and reboot. At this point, you can run Cyclictest to get baseline values for average and max latency:

sudo cyclictest --mlockall --smp --priority=80 --interval=30 --distance=0

Considerations after tuning

Tuning is an iterative process, and it is advisable to tweak one parameter at a time while measuring the results. Depending on the environment and how stringent the latency requirements are, tuning and testing a real-time system to evaluate and check its performance can take multiple days and potentially weeks. Despite the effort, tuning can bring beneficial effects and tangible improvements in latency results.

Do you want to run real-time Ubuntu in production?

Get in touch

Further reading

When building your real-time applications, the below material from the Linux Foundation may also be helpful:


How to enable RT in kernel? ›

  1. Update the build directory conf/local. conf file to include the preempt-rt kernel option. PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt"
  2. Source the build environment. Run the environment-setup script from the project directory. ...
  3. Build the platform project image. $ bitbake wrlinux-image-small.

What is real-time in kernel? ›

A real-time kernel is software that manages the time of microprocessor to ensure that time-critical events are processed as efficiently as possible.

What is kernel tuning? ›

Linux security

The ability to tune the Linux kernel while it is running is one of the most powerful aspects of using Linux. It enables making changes to the kernel parameters while it is running and without requiring a reboot.

How to tune kernel parameters in Linux? ›

Enter the command /sbin/sysctl -a to confirm that the values are set correctly. After updating the values of the kernel parameters in the /etc/sysctl. conf file, either restart the computer, or run the command sysctl -p to make the changes in the /etc/sysctl. conf file available in the active kernel memory.

How do I know if my kernel is realtime? ›

The simplest way to identify a real-time kernel is to execute the uname -r command on the terminal, and then look for the rt keyword in the kernel version. If rt is missing, then the system uses the standard kernel. Some important kernel-rt mechanisms include: A task's priority is checked (1-99) under heavy load.

Should I use RT kernel? ›

A kernel built with the realtime patches (an “RT kernel”) is needed only if: You want to run JACK with very low latency settings that require realtime performance that can only be achieved with an RT kernel. Your hardware configuration triggers poor latency behaviour which might be improved with an RT kernel.

What are the advantages of real-time kernel? ›

Advantages of Real-time operating system
  • Reduced downtime. An RTOS ensures that the system uses more resources while maintaining all devices in active condition. ...
  • Task Administration. It usually takes less time for a real-time operating system to switch from one task to another. ...
  • Availability. ...
  • Dependability.
Oct 12, 2022

Which kernel is used in RTOS? ›

Usually, an RTOS avoids the monolithic kernel but instead implements a microkernel architecture with added capabilities that are configurable. As a result of this model, the flexibility in the configuration of the kernel and its functionalities according to the embedded application is dramatically increased.

How to configure the kernel? ›

Kernel Configuration

As part of the kernel building process, we can set up our config file using different configuration options like make config or make menuconfig. Using these options, we can customize the kernel configuration and generate the files required to compile and link the kernel.

What kernel options might you need to tune? ›

Linux Kernel Tuning
  • SHMMAX - This parameter defines the maximum size, in bytes, of a single shared memory segment. ...
  • SHMALL - This parameter sets the total amount of shared memory pages that can be used system wide. ...
  • SHMMNI - This parameter sets the system wide maximum number of shared memory segments.

Which kernel is best for performance? ›

A linear kernel can provide a high accuracy of 96.5%, as the data is mostly linearly separable. A polynomial kernel can also attain a good accuracy of 95.8%, but it may overfit the data if the degree is too high.

Which file to edit for kernel tuning? ›

You can make permanent kernel-tuning changes without having to edit any rc files. This is achieved by centralizing the reboot values for all tunable parameters in the /etc/tunables/nextboot stanza file. When a system is rebooted, the values in the /etc/tunables/nextboot file are automatically applied.

Which file to edit for kernel tuning in Linux? ›

To edit a kernel parameter, add an entry to the /etc/sysctl. conf file or modify the current record value. If a parameter value is not set in the /etc/sysctl. conf file, the operating system default value is used for the parameter.

Does kernel run in real mode? ›

64-bit operating systems use real mode only at startup stage, and the OS kernel will switch the CPU into long mode.

How to check if process is realtime Linux? ›

You can list running processes using the ps command (ps means process status). The ps command displays your currently running processes in real-time.

Does the kernel run at all times? ›

It doesn't run all the time. The kernel sets an alarm interrupt for the CPU to wake it up every so often, then when the alarm interrupt fires the CPU stops executing the program and jumps to the kernel's interrupt vector.

Which is the most stable Linux kernel? ›

On top of the list, Debian Linux is the most stable Linux distribution. The great thing about it is that it is user-friendly, lightweight, and compatible with other environments.

Which language is best for kernel? ›

The kernel is written in the C programming language [c-language].

Is Windows kernel better than Linux kernel? ›

Kernel. Linux uses the monolithic kernel which consumes more running space whereas Windows uses the micro-kernel which takes less space but lowers the system running efficiency than Linux.

What are the different types of real-time kernels? ›

There are two RTOS architectures: monolithic and microkernel.

What is the difference between a general purpose kernel and real-time kernel? ›

While General Purpose Operating Systems (GPOS) can handle multiple tasks efficiently, they usually do so without the pressure of time running out. RTOS on the other hand is designed to deliver an accurate output within the expected timeline (which as stated earlier, is akin to the time taken for the blink of an eye).

What is the most important function of a real-time kernel? ›

The main functions that the Kernel performs are as follows: Process Management. Memory Management. Device Management.

What is the drawback of using kernel? ›

it results in discontinuous shape of the histogram. The data representation is poor. The data is represented vaguely and causes disruptions. Another disadvantage is the an internal estimate of uncertainty, due to the variations in the size of the histogram.

Does updating kernel improve performance? ›

Thanks to the open-source nature of Linux, the kernel is constantly being updated to remove vulnerabilities and improve performance. That's why it's a good idea to keep your kernel updated as using an outdated Linux kernel could put you and your data at risk.

What are two advantages of real-time processing? ›

Advantages of Real-Time Processing

Information is up to date and can be used immediately. You would need fewer resources to sync systems. You have increased uptime. It helps identify issues so you can take action immediately.

What are the disadvantages of real time operating system? ›

Disadvantages of Real-time Operating System

Costly: The hardware requirements like device drivers are a bit expensive. Complex: The algorithms and programs used in real-time systems are complex. Limited Tasks: The tasks or programs that real-time systems can process at a given time are limited.

What are the three types of RTOS? ›

Real Time Operating System (RTOS)
  • Hard Real-Time operating system: These operating systems guarantee that critical tasks be completed within a range of time. ...
  • Soft real-time operating system: This operating system provides some relaxation in the time limit. ...
  • Firm Real-time Operating System:
Apr 22, 2023

What are the most common RTOS kernel objects? ›

Common kernel objects include tasks, semaphores, and message queues. Services-are operations that the kernel performs on an object or, generally operations such as timing, interrupt handling, and resource management.

Which command is used to configure kernel? ›

Configuration on the Command Line. To configure the kernel, change to /usr/src/linux and enter the command make config. Choose the features you want supported by the kernel.

Where do you set kernel parameters? ›

Configuring kernel parameters temporarily through /proc/sys/ Set kernel parameters temporarily through the files in the /proc/sys/ virtual file system directory. Identify a kernel parameter you want to configure.

How do I access the kernel? ›

To check where it is present in your windows system, you can go to C drive (considering it where your windows OS is present). Then double click the Windows directory in C drive. Double click the boot directory. This is where kernel code of your Windows OS present.

What tools do I need to build kernel? ›

To build the Linux kernel from source, you need several tools: git, make, gcc, libssl-dev and (optionally) ctags, cscope, and/or ncurses-dev. The tool packages may be called something else in your Linux distribution, so you may need to search for the package.

Which main Linux utility or utilities do you use to tune up the kernel? ›

The Linux kernel can be optimized either by using sysctl, via the /proc and /sys file systems or by kernel command line parameters. This part covers tuning the I/O performance and optimizing the way how Linux schedules processes.

What is the most important kernel component? ›

Probably the most important parts of the kernel (nothing else works without them) are memory management and process management. Memory management takes care of assigning memory areas and swap space areas to processes, parts of the kernel, and for the buffer cache.

Which is the best kernel manager? ›

The Ultimate Tool to Manage your Kernel!

Is kernel mode faster than user mode? ›

Kernel mode drivers run in the same memory space as the operating system kernel, which is the core component of the system that manages resources, processes, and security. This means that kernel mode drivers have direct access to the hardware and can perform faster and more efficiently than user mode drivers.

Which tool is used for performance tuning? ›

Simple Performance Optimization Tool (SPOT)

How do I spike CPU usage in Linux? ›

3. Creating CPU Spikes
  1. 3.1. Using the dd Command. The dd utility is available on most Unix-like systems. ...
  2. 3.2. Using the stress Tool. ...
  3. 3.3. Using the yes Command. ...
  4. 3.4. Using the sha1sum Utility. ...
  5. 3.5. Using the while Loop. ...
  6. 3.6. Launching a Fork Bomb Attack. ...
  7. 3.7. Reading from /dev/urandom.
Mar 11, 2022

Which editor is best for kernel development? ›

  • Visual Studio Code is a code editor at the core, but it's not only a code editor. ...
  • Geany is a text editor and can also be used as an IDE. ...
  • IntelliJ IDEA is an IDE offered by JetBrains. ...
  • Apache NetBeans is an IDE by Oracle, and it's mainly used for Java development.
Feb 9, 2023

Is it legal to modify Linux kernel? ›

Yes, but you have to accept, honor, and comply with the licensing requirements of the Linux kernel. If you make changes, you have to make your changes freely available. You might need to document and make your build environment (for the kernel) available.

Can kernel memory be swapped? ›

In-kernel memory swapping is a Linux feature which creates RAM based swap area and provides a form of virtual memory compression. It increases performance by using a compressed block device in RAM for paging instead of disk.

Which main Linux utility do you use to tune up the kernel and make it more optimized and fit to your workload? ›

The Linux kernel can be optimized either by using sysctl, via the /proc and /sys file systems or by kernel command line parameters. This part covers tuning the I/O performance and optimizing the way how Linux schedules processes.

How do I modify my kernel boot arguments? ›

4 Temporarily modifying kernel boot parameters
  1. Switch on your computer. The boot process will start.
  2. In the GRUB 2 boot screen, highlight the entry you want to modify using the arrow keys ↑ and ↓.
  3. Press the E key. ...
  4. Search for the string splash=silent and remove it.
  5. To boot the entry, press F10 or Ctrl–X.

How to build Linux RT kernel? ›

Giving the Linux kernel possible real-time properties is not difficult:
  1. download the kernel.
  2. download the PREEMPT_RT patch.
  3. patch the kernel.
  4. build the kernel.
  5. restart your system.
  6. choose the RT kernel.
Feb 6, 2018

How do I enable kernel modules? ›

Loading a Module
  1. To load a kernel module, run modprobe module_name as root . ...
  2. By default, modprobe attempts to load the module from /lib/modules/kernel_version/kernel/drivers/ . ...
  3. Some modules have dependencies, which are other kernel modules that must be loaded before the module in question can be loaded.

How to enable SELinux in kernel? ›

  1. Compile the kernel with selinux enabled.
  2. Type make to compile mdp .
  3. Make sure that you are not running with SELinux enabled and a real policy. If you are, reboot with selinux disabled before continuing.
  4. Run install_policy.sh: cd scripts/selinux sh install_policy.sh.

Which is a function of RT kernel? ›

The "kernel" of a real-time operating system ("RTOS") provides an "abstraction layer" that hides the hardware details of the processor from the application software. The Kernel provides an interrupt handler, task scheduler, resource sharing flags and memory management.

Can you build your own kernel? ›

All Linux distributions are based on a predefined kernel. But, if you want to disable certain options and drivers or try experimental patches, you need to compile your own Linux kernel. In this step-by-step guide, you will learn how to build and compile a Linux kernel from scratch.

Is Linux kernel development hard? ›

Linux Kernel programming is hard and requires special skills. Linux Kernel programming requires access to special hardware. Linux Kernel programming is pointless because all of the drivers have already been written. Linux Kernel programming is time consuming.

How to create kernel rpm? ›

5.6. 1. Creating a Custom Kernel RPM using kernel. org's Source
  1. On the frontend, check out the Rocks source code. ...
  2. Change into the directory: ...
  3. Create a kernel "config" file and put it in config-<version> ...
  4. Update version.mk . ...
  5. Build the kernel: ...
  6. Copy the resulting RPMs into the current distribution: ...
  7. Rebuild the distribution:

How to set up kernel? ›

Add Virtualenv as Python Kernel
  1. Activate the virtualenv. $ source your-venv/bin/activate.
  2. Install jupyter in the virtualenv. (your-venv)$ pip install jupyter.
  3. Add the virtualenv as a jupyter kernel. ...
  4. You can now select the created kernel your-env when you start Jupyter:
Nov 28, 2022

How to check kernel status in Linux? ›

To check Linux Kernel version, try the following commands:
  1. uname -r : Find Linux kernel version.
  2. cat /proc/version : Show Linux kernel version with help of a special file.
  3. hostnamectl | grep Kernel : For systemd based Linux distro you can use hotnamectl to display hostname and running Linux kernel version.
Mar 31, 2023

What are three modes of SELinux? ›

SELinux supports enforcing, permissive, and disabled modes. Enforcing mode is the default. Permissive mode allows operations that are not permitted in enforcing mode and logs those operations to the SELinux audit log. Permissive mode is typically used when developing policies or troubleshooting.

When should I enable SELinux? ›

Tip: Use permissive mode with SELinux

A relatively better practice is to put SELinux into permissive mode before you deploy your application or debugging your issue and enable it again after that. The permissive mode works as if SELinux was disabled but at the same times, it will log as if SELinux was enabled.

What are the 5 main functions of the kernel? ›

Functions of a kernel include scheduling processes, resource allocation, device management, interrupt handling, memory management, and process management.

What are three functions of kernel? ›

In broad terms, an OS kernel performs three primary jobs. It provides the interfaces needed for users and applications to interact with the computer. It launches and manages applications. It manages the underlying system hardware devices.


Top Articles
Latest Posts
Article information

Author: Carmelo Roob

Last Updated: 01/07/2024

Views: 5870

Rating: 4.4 / 5 (65 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Carmelo Roob

Birthday: 1995-01-09

Address: Apt. 915 481 Sipes Cliff, New Gonzalobury, CO 80176

Phone: +6773780339780

Job: Sales Executive

Hobby: Gaming, Jogging, Rugby, Video gaming, Handball, Ice skating, Web surfing

Introduction: My name is Carmelo Roob, I am a modern, handsome, delightful, comfortable, attractive, vast, good person who loves writing and wants to share my knowledge and understanding with you.