Canonical Announces Availability of Real-Time Kernel for Ubuntu 24.04 LTS - 9to5Linux (9to5linux.com)
from KarnaSubarna@lemmy.ml to linux@lemmy.ml on 30 May 2024 15:58
https://lemmy.ml/post/16263328

To get started with the real-time kernel for Ubuntu 24.04, check out the official documentation. One thing to keep in mind if you’re an NVIDIA GPU user is that the real-time Ubuntu kernel does not support the proprietary NVIDIA graphics drivers.

#linux

threaded - newest

just_another_person@lemmy.world on 30 May 2024 16:05 next collapse

You can just enable all of these features on any 6.8+ kernel. You don’t need Ubuntu Pro.

No, it will no radically improve your gaming performance, but it will definitely increase your energy bill.

transientpunk@sh.itjust.works on 30 May 2024 16:43 collapse

Why would it increase your energy bill?

Successful_Try543@feddit.de on 30 May 2024 17:30 collapse

I guess, the governor is set to performance for a realtime kernel to work properly, thus the CPU consumes more power.

just_another_person@lemmy.world on 30 May 2024 23:58 next collapse

Partially, but the shift is more in the amount of power required to constantly serve interrupts. That’s essentially what these flags enable. Where previously the kernel would be more lax about scheduling such things, this let’s all those interrupts off the chain. More interrupts = more power draw. The ARM and AMD extensions mean to reduce that in a meaningful way, though.

[deleted] on 03 Jun 2024 20:45 collapse

.

dinckelman@lemmy.world on 30 May 2024 17:12 next collapse

Why are we monetizing a kernel flag?

VeryImportantUser@lemmy.world on 31 May 2024 12:59 collapse

Perhaps because it takes time, resources and workforce to build another kernel version. Not to mention Ubuntu Pro is actually free. But then again, I know we’re just supposed to hate Ubuntu here.

Montagge@lemmy.zip on 30 May 2024 17:12 next collapse

Might try this out once I upgrade to 24.04

applepie@kbin.social on 30 May 2024 17:33 collapse

Can somebody explain real time kernel as if I am a golden retriever ?

far_university1990@feddit.de on 30 May 2024 18:11 next collapse

Who a good boy? You a good boy!

atzanteol@sh.itjust.works on 30 May 2024 18:19 next collapse

So, contrary to what it seems a single CPU core can only execute a single “thing” at a time. Modern operating systems do something called “preemptive multitasking” to give the illusion that more than one things are running at a time. The OS will start your task, then after a while save its state and start another task running, then switch back. It does this fast enough that each job seems to be running concurrently.

Now if you’re running on a RaspberryPI your program might be waiting for input from a GPIO pin. And when you get that input you want to turn on some switch. Maybe an important switch. BUT It could be that your application is in the “paused” state when that pin gets input which will cause a delay between when the pin is trying to send you input and when you actually process it.

A real-time OS minimizes such delays (latency) so that you can respond quickly.

applepie@kbin.social on 30 May 2024 20:18 collapse

I guess i am still skipping on how real time kernel address the pause? it just never pauses or it no longer needs to be paused?

as a side note, is this similar technology they use in high precision manufacturing?

atzanteol@sh.itjust.works on 31 May 2024 01:37 next collapse

I guess i am still skipping on how real time kernel address the pause? it just never pauses or it no longer needs to be paused?

When hardware has data ready for a program it generates an interrupt that lets the OS know that there is data ready for an application. My understanding is that real-time OSs give high priority to interrupts so that they’re processed quickly - usually within a fixed period of time (e.g. they may have a max time between interrupt and processing).

as a side note, is this similar technology they use in high precision manufacturing?

In those cases it may be more likely they use a micro-controller that doesn’t run any OS at all - at least not a multi-tasking one. If you’re just running a single program you don’t need to worry about latency due to other applications running.

gorysubparbagel@lemmy.world on 31 May 2024 11:55 collapse

Think of it like a club with a max capacity of 10 people, where some people have VIP cards. If a person with a VIP card wants to get into the club, the bouncer will kick out one of the people inside that doesn’t have a VIP card to make space for them.

For a more technical explanation:

There are several processors on computers and each can be in use by 1 process at a time. Different processes can get different amounts of time based on their priority (called niceness in Linux) and they’ll be removed from the processor once their time is up until their next share of time.

On a real-time kernel some processes are marked as real-time (certain range of niceness values, can’t remember the exact range). If a process that is real-time says it needs some processor time, a process that isn’t real-time that’s currently running will be immediately ripped off the processor to make room for the real-time process.

applepie@kbin.social on 31 May 2024 12:18 collapse

Alright, this landed!

electricprism@lemmy.ml on 30 May 2024 18:22 next collapse

Music recording? Idk

Sina@beehaw.org on 03 Jun 2024 11:49 collapse

Yeah that’s exactly one of the niche use cases, like using a midi keyboard, though using a low latency kernel like Linux Zen would be more than enough for most users.

Vivendi@lemmy.zip on 31 May 2024 00:47 next collapse

Basically tasks have a tight window of execution latency guarantee (although they can exceed that as Linux is not a deterministic hard realtime kernel)

This means potentially lower performance and other losses but it provides very low latency, which is useful for some tasks that need low latency due to their nature like high quality professional audio

stardreamer@lemmy.blahaj.zone on 31 May 2024 02:29 collapse

An alternative definition: a real-time system is a system where the correctness of the computation depends on a deadline. For example, if I have a drone checking “with my current location + velocity will I crash into the wall in 5 seconds?”, the answer will be worthless if the system responds 10 seconds later.

A real-time kernel is an operating system that makes it easier to build such systems. The main difference is that they offer lower latency than a usual OS for your one critical program. The OS will try to give that program as much priority as it wants (to the detriment of everything else) and immediately handle all signals ASAP (instead of coalescing/combining them to reduce overhead)

Linux has real-time priority scheduling as an optional feature. Lowering latency does not always result in reduced overhead or higher throughout. This allows system builders to design RT systems (such as audio processing systems, robots, drones, etc) to utilize these features without annoying the hell out of everyone else.