Questions tagged [real-time]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
12 views

How can PREEMPT_RT be used to provide real-time access to programs?

I have installed the real-time kernel 5.4.19-rt10 with the PREEMPT_RT patch on my Ubuntu 18.04. Now I need to write some programs that use the socket interface, how do I increase the preemption ...
user avatar
  • 11
2 votes
0 answers
35 views

How to stop the kernel from pausing my thread?

I have written a software PWM generator for the raspberry PI 4 (Debian Bullseye, kernel 5.10.92). It is a multi-threaded program and one thread is the PWM generator. It is supposed to run ...
user avatar
  • 211
0 votes
1 answer
48 views

Stream filtering changing log file in realtime

I have file.log with this sample: 11-Feb-2022 18:34:42 lorem uneeded5 11-Feb-2022 18:34:43 water uneeded6 11-Feb-2022 18:34:44 ipsum uneeded7 11-Feb-2022 18.34.45 waterfall uneeded8 I expect output ...
user avatar
1 vote
0 answers
27 views

Real-Time Priority in the user namespace

I have a small program starting a thread with realtime priority in a user-namespace. But every time I want to start it, I get an errno "Permission denied". The program: #include <stdio.h&...
user avatar
  • 11
2 votes
1 answer
58 views

Why would USB video be dropping frames in Realtime Linux?

We have a problem of losing about one frame every 60 seconds or so with four USB cameras hooked up to Ubuntu 20.04 with the Realtime Linux patches applied. From the user code ioctl(VIDIOC_DQBUF) call ...
user avatar
  • 233
0 votes
2 answers
89 views

Why is it necessary to block a signal before sigwait()'ing it?

In APUE, chapter 12 page 454, it is mentioned that: To avoid erroneous behavior, a thread must block the signals it is waiting for ... The similar is said in the standard: The signals defined by ...
user avatar
  • 429
0 votes
1 answer
67 views

How to Choose Between Real-Time, Low-Latency and Normal Kernels on Startup?

For instance, I know it's possible to easily install several desktop interfaces and choose what session to log into on startup. Is this type of thing possible for choosing between kernels? I would ...
user avatar
  • 9
0 votes
1 answer
33 views

Single Unix Specification version 4 (Issue 7) moved bunch of Real-Time APIs to Base, What Next?

While reading the standard, I noticed that bunch of APIs were, Introduced in Issue 5 for alignment with POSIX realtime APIs, Marked for option group membership in Issue 6, and Moved to Base in ...
user avatar
  • 429
0 votes
0 answers
16 views

Tracking interrupts on RPI

Currently writing a program which runs on a Raspberry Pi3 (Linux) which needs to get as close to real time collection of data as possible. I have set its policy to FIFO and given it the highest ...
user avatar
  • 1
0 votes
0 answers
39 views

What is exactly the timestamp measured by tcpdump?

We have a server that communicates over UDP with two clients (client1 and client2), via the same NIC through a switch. The server runs on debian 9 standard kernel (no real time patch). The system is ...
user avatar
  • 101
0 votes
0 answers
31 views

Predetermined State Computing

I've had this idea of making computing faster or what a friend called a version of Turing computing for a modern day computer. Mainly, the idea is based on utilizing the ECC-RAM utilized nowadays in ...
user avatar
0 votes
0 answers
19 views

Capturing a processes file activity and transmitting it to a remote host in real time

Are there any tools out there to intercept all the file activity of a process, transmit that to a process on a remote host (eg. zmq), and replay it there, in real time? This is to enable remote ...
user avatar
0 votes
0 answers
52 views

Do higher priority SCHED_RR real-time tasks completely starve all lower priority tasks if there are enough of them?

I'm reading through the man page for scheduling and the description for the round-robin real-time scheduling policy seems ambiguous to me: SCHED_RR: Round-robin scheduling SCHED_RR is a ...
user avatar
  • 383
1 vote
0 answers
675 views

Unable to set realtime priority on systemd service

Edit: there is now an open bug for this. Edit 2: the workaround for this issue is to use chrt as pointed out below. Running debian buster with 5.4.91 with PREEMT_RT patch on an embedded system. ...
user avatar
2 votes
1 answer
116 views

How to check if/how often my process is preempted by the kernel?

For the purpose of profiling a program I would like to run it uninterrupted on one CPU. To do this I use a combination of taskset and chrt: # taskset -c 1 chrt -f 99 ./my_program Now my question is ...
user avatar
  • 186
0 votes
0 answers
82 views

Using polkit to restrict a user to only the RealtimeKit

For user user1 I want polkit to deny access to everything except the realtime kit. I tried adding a custom rule which would return polkit.Result.NO except when accessing the realtime kit, but that ...
user avatar
0 votes
1 answer
3k views

Installing PREEMPT_RT kernel on Ubuntu 20.04

I am trying to install a PREEMPT_RT kernel for my ubuntu distribution as this is a requirement for a robot I am working on. But no matter what I do I get errors when compiling the kernel. I've ...
user avatar
1 vote
1 answer
261 views

How can I install a non real-time kernel in my Debian box?

I setup a box with Debian: # cat /etc/debian_version 9.13 # uname -a Linux orange 4.9.0-15-amd64 #1 SMP Debian 4.9.258-1 (2021-03-08) x86_64 GNU/Linux And now, I am trying to install CUDA but I am ...
user avatar
0 votes
2 answers
84 views

Can Linux use a CPU core as a micro-controller?

Correct me if I'm wrong: As far as I searched around the web, the main difference between a micro-controller (like Arduino) and a SBC (like Raspberry Pi) is that the micro-controller is atomic which ...
user avatar
  • 143
0 votes
1 answer
235 views

Mysterious issue with the 5.10.7-3 Linux Kernel

For the last month or so, I've been getting a very weird issue pretty much daily. I would be using my system like usual, and the screen would just suddenly freeze. If there's audio playing, the last ...
user avatar
  • 101
0 votes
1 answer
620 views

Duplicating audio in pure ALSA for playback on local device and streaming via trx

I am trying to achieve a multi-room audio setup in my house using Raspberry Pis. How can I get VLC playing simultaneously out the local headphone port while also streaming it to other devices via trx? ...
user avatar
5 votes
0 answers
594 views

rtkit: list threads it is "supervising"?

rtkit obviously knows which threads it is "supervising", since it spams syslog with messages like rtkit-daemon[1277]: Supervising 3 threads of 2 processes of 1 users. However, the nefarious ...
user avatar
  • 413
1 vote
2 answers
432 views

Real-time patch on Linux 5.9.1 does not show fully-preemptible option for arm64 option

I am trying to get my own custom Real-time Linux on a Raspberry Pi 4B. My status is this: I built the Linux 5.9.1 version, and have my own version of U-Boot, RFS with which I am able to successfully ...
user avatar
1 vote
2 answers
2k views

How to start a realtime process?

I looking for a way to start a real-time process or set a running process as a real-time process.
user avatar
  • 121
0 votes
1 answer
341 views

Install a real-time kernel on CentOS 7 i386

I have computer where I'm trying to install real-time kernel. My OS: # uname -a Linux localhost.localdomain 3.10.0-1127.el7.centos.plus.i686 #1 SMP Sun Apr 5 18:08:31 UTC 2020 i686 i686 i386 GNU/Linux ...
user avatar
0 votes
2 answers
268 views

What RT patch to use for a specific linux kernel version

Running the $uname -r command on my embedded device reveals my kernel to be 4.14.73-ltsi (it is a custom Linux kernel built for an embedded device). Now I intend to install the real time (RT) patch ...
user avatar
  • 101
1 vote
0 answers
422 views

Linux Time persist through reboot issue

I have a custom board that houses a System on module(SOM) running linux kernel 4.4.15 The board has an RTC that is backed up via small battery. I have the board running with no network connection ...
user avatar
  • 250
2 votes
4 answers
3k views

Trouble selecting "Fully Preemptible Kernel (Real-Time)" when configuring/compiling from source

I am trying to compile the 5.4 kernel with the latest stable PREEMPT_RT patch (5.4.28-rt19) but for some reason can't select the Fully Preemptible Kernel (RT) option inside make nconfig/menconfig. I'...
user avatar
0 votes
0 answers
156 views

What is UIE timer in RTC?

I am trying to apply a patch that enables UIE timer but I don't understand what UIE stands for and what's the use of it. https://lore.kernel.org/linux-rtc/20191021155631.3342-1-alexandre.belloni@...
user avatar
0 votes
0 answers
34 views

System becomes non interactive when multiple real time threads are run on limited number of CPUs

Linux arch 5.5.9-arch1-2 #1 SMP PREEMPT Thu, 12 Mar 2020 23:01:33 +0000 x86_64 GNU/Linux I have been experimenting with CPUs affinity and scheduling policies and there is one thing that has surprised ...
user avatar
  • 162
7 votes
1 answer
7k views

Why is the integer value of SIGRTMIN (first real-time signal) 34 and not 32? [duplicate]

Examining the output of kill -l command $ kill -l 1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP 6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1 11) SIGSEGV 12) SIGUSR2 13) ...
user avatar
  • 3,623
0 votes
1 answer
57 views

Linux read() system call sampling rate, task scheduling & RT_PREEMPT

I am working with a Measurement Computing PCIe-DAS1602/16 DAQ: https://www.mccdaq.com/pci-data-acquisition/PCIe-DAS1602-16.aspx with Linux device drivers written by Warren Jasper: https://github....
user avatar
  • 153
1 vote
0 answers
147 views

How to delete or shrink compiled kernel installation directory and still build an external module?

I am having trouble building external modules after compiling the linux kernel on an external device. It is the 4.19.103 kernel with the real time patch-4.19.103. My onboard storage disk is <3Gb ...
user avatar
0 votes
1 answer
47 views

Cutting out specific text from specific lines in real time

So I have a log running in real time and saving to a text file named 'test.txt' also in real time. Now I want to set up a process that constantly polls that text file for changes and cuts out a ...
user avatar
  • 1
0 votes
0 answers
168 views

faketime adjusting clock rate freezing graphical applications?

I am trying to trick Chromium to think time passes faster than it really does. One user suggested I use libfaketime. It works, almost. Specifying time shift works fine: faketime -f '+1y' chromium-...
user avatar
  • 141
1 vote
0 answers
128 views

How does the SCHED_DEADLINE runtime overrun signal (SIGXCPU) work?

I'm implementing a rt-thread using SCHED_DEADLINE. I'm trying to catch a SIGXCPU-signal, if the thread exceeds the specified sched_runtime. To my understanding of the manpage, this can be achived by ...
user avatar
  • 11
4 votes
1 answer
108 views

Change perception of real time for one process

I would like to change the perception of real time for one process. Making the process believe that time is passing at 50% or 150% of the speed my system/kernel/hardware-clock thinks. I'd like to ...
user avatar
  • 3,438
0 votes
0 answers
25 views

Strange ping latency

We have a complex real time application running RHEL 7.4 on ESX as a virtual machine. The VM is hosted on a large NAS-storage. Currently we have repeated latency bursts also evidenced in a running ...
user avatar
0 votes
1 answer
313 views

Inconsistent CPU Usage in Top

I'm experiencing very strange behaviour with some hardware we're working on. My setup consists of Linux 4.9.87 w/ SMP & PREEMPT RT on a dual-core iMX6 CPU. The application running on this setup ...
user avatar
  • 203
0 votes
1 answer
480 views

SCHED_RR and SCHED_FIFO only work on "prempt kernal"?

I am running a python program on the raspberry Pi (Raspbian) that I would like to give higher priority. I want to run the following command : $ sudo chrt --rr 50 python3 loopExample.py I have read ...
user avatar
  • 155
2 votes
1 answer
917 views

Why does /proc/stat count more than 100 tick/s

I have a developer complaining that the CPU usage reported by /proc/stat is not consistent. It is my understanding that /proc/stat is counting ticks, which since kernel 2.6 has been fixed to 100/s ...
user avatar
0 votes
0 answers
173 views

When are audio threads preempted?

In audio threads, I've been told it's good style to not use syscalls like e.g. printf() because they give control back to the kernel, which can then decide to continue with another thread, which means ...
user avatar
  • 333
0 votes
1 answer
881 views

Available options for real-time Linux (Centos 7) and their relation to one another [closed]

I'm looking to expand and also get more current information from the question asked here. I have a requirement for real-time behavior that has is sub-millisecond and am now exploring what my options ...
user avatar
  • 113
1 vote
0 answers
70 views

Small delay in sudo

I want my zsh prompt to display whether the session has sudo rights (from a previously run sudo command). After looking at the answers to this question, I arranged to use the exit status of sudo -n ...
user avatar
  • 169
2 votes
1 answer
2k views

How to set the SCHED_RR time slice or time quantum per process / thread?

The time slice (also called time quantum) for threads with SCHED_RR policy can, according to the sched_rr_get_interval man page be obtained using int sched_rr_get_interval(pid_t pid, struct timespec *...
user avatar
1 vote
1 answer
444 views

Realtime, SCHED_FIFO, CPU_SET()

I'm trying to assign two real time processes to two cpus(one each). I'm using SCHED_FIFO scheduling policy. I'm doing the following things: adding "quiet splash isolcpus = 6,7" at ...
user avatar
2 votes
1 answer
3k views

Detect if USB disk is mounted in C application in Linux

I would like to check if USB disk is mounted in a C application. I know that in a script I can accomplish this via mount | grep /mnt (the mount point where udev mounts the USB drive) but I need to do ...
user avatar
0 votes
0 answers
30 views

Filter output / print one record per event or time period

I've got a custom HID device which prints out exact coordinates of touched points at real time. It is very sensitive & currently printing out the coordinate that's being touched on multiple ...
user avatar
  • 111
0 votes
1 answer
686 views

compile and use a realtime kernel on CentOS 7

I would like to compile and use a realtime kernel on CentOS 7. I found a guide on the web: http://jensd.be/589/linux/complile-and-use-a-realtime-kernel-on-centos-7-or-rhel-7 When I try to use it I ...
user avatar
-1 votes
1 answer
2k views

Running make -j$(nproc) or make modules -j$(nproc)

I am following this. To run make -j$(nproc) make modules -j$(nproc) I know that make is running jobs Are the jobs supposed to run for hours? (I got impatient and interrupted.) make -j$(nproc)
user avatar