7 ms·
It’s a Linux distribution with real-time kernel. Here’s a download link if anybody is interested: https://github.com/elk-audio/elk-pi/releases https://github.
by protoman3000 5y ago
It’s a Linux distribution with real-time kernel.
Here’s a download link if anybody is interested:
https://github.com/elk-audio/elk-pi/releases https://github.com/elk-audio/elk-pi/releases
- matheusmoreira 5y agoSo the real time kernel patches have been mainlined? How comprehensive are the real time features of Linux now?
- PaulDavisThe1st 5y agoAlmost all of the original PREEMPT_RT patchset are mainlined now, but the features are not (all) enabled by default. Low latency will always present a tradeoff with bandwidth, and Linux is used for so many different purposes that one is not clearly more important than the other. For more than 10 years, Linux with the PREEMPT_RT patch has been capable of more-or-less hard real time, with latencies in the 10's of usecs range. That can be thwarted, however, by a variety of hardware features (SMI being the worst offender, plus devices that hog the PCI bus for too long), so you are not guaranteed this performance just by running that kernel.
- zamadatix 5y agoDumb question inbound are those features boot/runtime toggable or compile time options?
- PaulDavisThe1st 5y agoCompile time.
- snvzz 5y ago>more-or-less hard real time Also known as soft realtime. For hard realtime, you need guarantees. Linux is too complex and cannot possibly offer them; this is the territory of formal proof, with complexity growing exponentially with code size. Look at seL4 for hard realtime.
- PaulDavisThe1st 5y agoEven with the "guarantees" offered by e.g. seL4, you still need cooperating hardware. SMIs on most mobos cannot be masked, and can take an eternity to be handled by the BIOS. Fortunately, for realtime audio, you don't need hard realtime unless you're very close to overloading the CPUs. Soft realtime (i.e. 99% of all interrupts handled within N usecs, 100% handled with N*2) is good enough.
- jeffreygoesto 5y agoRight. Also for hard realtime with 100% deadline guarantees (absence of soft and programming errors assumed, for a second) you would choose an appropriate CPU like the ARM Cortex-R series. You'd also take care of the peripherals, i.e. choose 801.2AS or even Flexray.
- zurn 5y ago100% handled with N*2 would be hard realtime.
- kbumsik 5y agoNo. Soft real time can miss some real time deadline. AFAIK Linux RT kernel is designed to hit every deadline, but they just cannot offer a formal proof. So "more-or-less" hard real time.
- ComputerGuru 5y agoOne of the problems is that the Linux RT kernel doesn’t stop you from using/writing devices/drivers that break those guarantees systemwide, as I understand it.
- colonwqbang 5y agoWhat kernel can give such a guarantee?
- 5y ago
- viraptor 5y agoIf anyone wants to try the as-much-rt-as-possible build in a nice ready package, there's the Xanmod project https://xanmod.org/ https://xanmod.org/ which offers it precompiled with a few other tweaks. It's aimed at gamer crowd, but I had a really good experience using it with music processing.
- PaulDavisThe1st 5y agoThe default xanmod kernel is still not using the PREEMPT_RT features. They do note that "Real-time Linux kernel (PREEMPT_RT) build available [5.10-rt]." and that's how you get "as much RT as possible". The features in the normal version of their kernel will improve the user experience of latency, but will not address "realtime" in the way that PREEMPT_RT does.
- viraptor 5y agoCorrect, the 5.12 versions don't have the PREEMPT patches, you'll need the 5.10-rt version.
- vinkelhake 5y agoElk is using Xenomai, it's not just PREEMPT_RT. https://elk.audio/audio-latency-demystified-part-ii/ https://elk.audio/audio-latency-demystified-part-ii/
- phlakaton 5y agoWhen I read things like this, I really wish BeOS, with its already pervasively multithreaded kernel, had won the audio OS wars. _Le sigh._
- andai 5y agoDoes Haiku share these qualities?
- doublerabbit 5y agoYes.
- yosamino 5y agoIt's a bit weird but I have such a nostalgic connection to this very specific BeOS ability. As a teenager I had heard about BeOS and I tried it out. I must have gotten it from a magazine's CD. And by mistake, clicking around, I opened all of my mp3 collection's files at the same time. Each of the mp3s opened in their own little player window - and they all started playing at the same time, without the UI starting to lag at all. It gave me an appreciation of what a computer can do
- pjmlp 5y agoNot only because of that, being fully written in C++ and multimedia oriented, for me it had a feeling of second coming of Amiga. Oh well.
- fierro 5y agowhat is a real time kernel vs a normal kernel? just "faster"?
- mutagen 5y ago'real time' generally means latency guarantees and trading some throughput for consistent low latency for interrupts and scheduling. So faster in some dimensions and slower in others. The Arch Linux wiki has some description of their real time patches: https://wiki.archlinux.org/title/Realtime_kernel_patchset https://wiki.archlinux.org/title/Realtime_kernel_patchset
- jmiskovic 5y agoArch wiki is an amazing source of practical information. It's like graybeard forums but distilled into a readable text. My last laptop ran Mint distro; whenever I searched around for HW issues it was always their wiki, fully stocked with useful info and steps how to fix stuff.
- froh 5y ago"graybeard forums" = ?
- jmiskovic 5y agoI'm referring to the usenet, mailing lists, various issue trackers and distro-specific forums were knowledgeable people diagnose and solve problems for others. The arch wiki has some of same diagnostics/troubleshooting content in more approachable format and kept up to date. Quite a few times it pointed me in right direction even if I don't use Arch.
- froh 5y agoah so grey haired as in experienced people think John Maddog Hall. got it. thanks.
- 5y ago
- 1vuio0pswjnm7 5y agoIs it possible to make a BSD kernel real-time. (No, IIRC.) I notice Elk uses Xenomai. NetBSD has a utility called schedctl that purports to control the scheduling of threads and processes. An example in the manpage describes running top(1) with "real-time priority". https://man/netbsd.org/schedctl.8 https://man/netbsd.org/schedctl.8 The ability to compile a (close to) real-time kernel seems to be one difference between Linux and BSD not often discussed.
- crest 5y agoFreeBSD includes a realtime scheduler priority class (round robin per priority level).
- twic 5y agoThe approach of making general-purpose OS kernels realtime seems like hard work to me. Surely what we want is a realtime microkernel, on which the conventional operating system can run as a (large!) task. As long as there is a way for processes running under the kernel to start realtime tasks directly on the microkernel, you can support all your realtime use cases, without having to make the whole operating realtime.