Questions tagged [real-time]

For questions about real-time computing and how to achieve a certain level of guaranteed response time with UNIX or Linux systems like RTLinux. For real-time clocks (RTC) use the /clock tag instead.

Filter by
Sorted by
Tagged with
0 votes
1 answer
41 views

Why is a gap between `journalctl -k -b -0` and `ps ho lstart 1`?

I encounter a strange observation: If I do: journalctl -k -b -0 | sed -e 's/^\(.\{76\}\).*/\1.../;3q' I will see something like: -- Journal begins at Sun 2022-08-07 12:06:55 CEST, ends at Mon 2023-02-...
-1 votes
1 answer
23 views

http latency wild variance on localhost

Running on MBP M1 with 10 cores. Running 1 thread client (wrk) and 1 thread server (java). A youtube is also running on the system. Load average 2 out of 10. Except GC, which could be the reasons of ...
0 votes
0 answers
57 views

Boot into PREEMPT_RT kernel on Armbian Linux

I am using an Orange Pi board with an Armbian image. To perform some tasks, I need to be able to use it with the PREEMPT RT kernel. I installed the most recent rt kernel package that was available. ...
0 votes
0 answers
35 views

Implementation details about pthread mutex and realtime semaphore with regard to signal safety

In the current standard, the sem_post is listed as an async-signal safe function; pthread mutex unlocking (and condition variable signalling) functions on the other hand are not. In my understanding: ...
  • 532
0 votes
1 answer
59 views

Time it takes to open a new terminal window

I just checked my timings: it takes about 0.41-0.45 seconds to open a new gnome-terminal window and about 0.55-0.65 seconds to open kitty. And it does bother me a bit that it takes so much time to ...
2 votes
1 answer
132 views

A realtime priority application is consuming all of CPU

I am running PopOs 22.04 on my dell laptop [amd64, intel i3, 4GB ram]. The booting was taking so much time, so I run sudo dmesg in terminal and it shows error: rcu: INFO: rcu_preempt detected ...
0 votes
1 answer
211 views

Installing real-time kernel on gnu/linux(EndeavourOS/Arch)

I'm trying to install a real-time kernel on EndeavourOS without any success. I tried different method... the first one, downloading it from yay repository as suggested by the Arch Linux wiki but ...
0 votes
2 answers
291 views

Issue with timedatectl

Hi can any help me how timedatctl works my understanding are if system clock sysnc with NTP serivce through internet system time will be updated to current date and time. If system clock sync with ...
0 votes
2 answers
302 views

Why is there less latency and jitter when there is additional high bandwidth traffic between two computers with Ubuntu 22.04 installed on them?

I have two computers that are connected via an Ethernet cable with Ubuntu 22.04 installed on them. I have a client on computer A) which is sending UDP packets to a server on computer B) and I am ...
0 votes
0 answers
18 views

error: ‘SCHED_FLAG_DL_OVERRUN’ undeclared

I am trying to use SCHED_FLAG_DL_OVERRUN but my compilation fails at: sched_attr.sched_flags = SCHED_FLAG_DL_OVERRUN; The error is : error: ‘SCHED_FLAG_DL_OVERRUN’ undeclared (first use in this ...
  • 101
-2 votes
2 answers
131 views

Using the command "sudo chrt -r 99" for a video encoding benchmark I always get bigger (worse) times

I am using a video encoding benchmarking application. The strange thing to me is that when I am using the command sudo chrt -r 99 VideoEncoding cfg I always get bigger time (worse results) instead of ...
  • 107
0 votes
1 answer
26 views

Is there an implementation of POSIX semaphore not based on Mutex+CV?

I read that semaphores in the FreeBSD kernel is not as efficient as Mutex+CV from this man page. I've examined the kernel and syscall implementation of POSIX semaphore from the source code and ...
  • 532
0 votes
0 answers
26 views

Real time clock and counter?

I gone through driver datasheet for RTC (synopsis) but in ip feature they mentioned Counter enable mode and counter wrap mode can any one let me know what are these tearms, can we validate this things,...
0 votes
1 answer
160 views

How to interpret the ptp4l statistics in the ouput?

I get the following output from the ptp4l command on slave PTP node. When I terminate it, some global statistics are printed out, but I cannot interpret the values, as I do not find any evident ...
-2 votes
2 answers
113 views

Real Time clock regarding timestamp storage

I gone through some of the datasheet regarding RTC like MCP79411X, but having confusion like where RTC stores timestamp in sram or eeprom, can anyone explain me the flow of the below fig suppose ...
-1 votes
2 answers
123 views

Where does RTC stores Date and Time in SRAM or EPROM

I gone through some of the datasheet regarding RTC like MCP79411X, but having confusion like where RTC stores timestamp in sram or eeprom, suppose RTC store Time in sram means it is volatile memory ...
0 votes
0 answers
45 views

Why was semaphore part of Realtime rather than Pthread?

In my opinion, semaphore is a general-purpose synchronization primitive with a wide range of application. So why did the IEEE people initialy standardize it as part of Realtime extension rather than ...
  • 532
0 votes
1 answer
164 views

Reduce microsecond jitter (using realtime kernel)

I have a raspberry pi 4B running Gentoo, with the 5.15.44 raspi kernel & realtime patches applied to it. The kernel is configured for CONFIG_PREEMPT_RT (big surprise), as well as ...
  • 1
0 votes
0 answers
31 views

real-time stdin using stty [duplicate]

I'm making a little command-line game and need to get the key presses in real-time. In a shell script I can use stty raw min 0 time 10 to get individual characters from stdin without waiting for ...
  • 1
2 votes
0 answers
192 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 ...
  • 211
0 votes
1 answer
347 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 ...
1 vote
0 answers
149 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&...
  • 11
2 votes
1 answer
198 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 ...
  • 233
0 votes
2 answers
384 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 ...
  • 532
0 votes
1 answer
378 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 ...
  • 121
0 votes
1 answer
49 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 ...
  • 532
0 votes
0 answers
32 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 ...
0 votes
0 answers
20 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 ...
0 votes
0 answers
319 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 ...
  • 459
2 votes
0 answers
2k 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. Edit 3: this is now fixed as of v252 via https://github.com/systemd/systemd/commit/...
2 votes
1 answer
493 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 ...
  • 196
1 vote
1 answer
7k 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 ...
1 vote
1 answer
512 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 ...
0 votes
2 answers
115 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 ...
  • 143
0 votes
1 answer
301 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 ...
  • 101
0 votes
1 answer
1k 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? ...
6 votes
0 answers
1k 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 ...
  • 522
1 vote
2 answers
827 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 ...
1 vote
2 answers
4k 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.
  • 121
0 votes
1 answer
475 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 ...
0 votes
2 answers
548 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 ...
  • 101
1 vote
0 answers
743 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 ...
  • 260
3 votes
4 answers
4k 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'...
0 votes
0 answers
224 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@...
0 votes
0 answers
42 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 ...
  • 162
8 votes
1 answer
10k 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) ...
  • 3,704
0 votes
1 answer
83 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....
  • 155
1 vote
0 answers
204 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 ...
0 votes
1 answer
50 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 ...
  • 1
0 votes
0 answers
249 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-...
  • 141