Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

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
0 answers
41 views

Debugging RCU stalls on Ubuntu Server 22.04, 5.15-realtime

I am trying to isolate CPUs on an AMD EPYC 8534PN (64C/128T). Unfortunately, I see the RCU stalls and the server crashes over and over. And I am not really sure what I am doing wrong. The crashes only ...
ninjab3s's user avatar
2 votes
0 answers
48 views

High resolution sleep in kernel thread?

What is the correct way to sleep to us resolution in a thread? I'm trying to write a device driver and I need to keep a pin high for a certain number of us after a GPIO interrupt. My plan is to create ...
FourierFlux's user avatar
1 vote
1 answer
44 views

How does Kernel Clock Rate matter in network emulation (by netem)?

I want to use network emulation (netem) on a PREEMPT-RT kernel to emulate latency and jitter down to 0.5 ms +- 10 %. Thus, I initially thought that I have to adapt the internal kernel clock rate to at ...
JanMrt's user avatar
  • 13
0 votes
0 answers
81 views

Can I prevent a pthread from ever being interrupted by the scheduler?

I'm programming an embedded real-time Linux device with a 4 core ARM CPU. There is a requirement for a periodic computation at 10 kHz that should not jitter too much and should never be lost. My POSIX ...
Jens's user avatar
  • 1,762
2 votes
1 answer
144 views

is there a sleep command that works with real date time and ignores suspend?

is there a sleep command that works with real date time and ignores suspend? echo a;sleep 3600;echo b i work 10mins, suspend the notebook for 2h. When I wake it up from suspend, "b" will ...
VeganEye's user avatar
2 votes
0 answers
42 views

How to cancel a packet scheduled for time-based transmission after it's enqueued?

I have a time-sensitive networking application I am writing that involves receiving individual Ethernet frames, and then sending the data onward in another Ethernet frame after a precise 1 second ...
AJMansfield's user avatar
0 votes
1 answer
184 views

To create a Linux RT real-time system, which functions in the kernel should be cropped out?

I am customizing a Linux real-time system using the Linux 6.4.0 kernel and patch-6.4.6-rt8 patch. When running make menuconfig, which configurations should be turned off to improve real-time ...
just a student's user avatar
1 vote
0 answers
59 views

How to become member of a Real-Time Group to circumvent the "sudo" command [closed]

I have a script that starts 7 processes. These processes interact with one another by sending messages and accessing the same shared memory and etc. I need 4 of these processes to run under SCHED_FIFO ...
michael hernandez's user avatar
0 votes
0 answers
45 views

heavy timing jitter in a loop that just sums up data, why? only imx8 suffered?

I created in C a small application that does allocate 2 char buffers of 5 MByte do a loop 1000 times in the loop either sum up all elements of array1 or array2 (alternating), so in an internal loop ...
Arno's user avatar
  • 115
0 votes
2 answers
158 views

How to find PID of all processes related to a given process?

How can I go about finding the PID or other information about a process that is doing the work of another process? I'm talking about kworker threads, for example, or any other threads/processes that ...
stochasticlover1's user avatar
0 votes
0 answers
387 views

How accurate is the PPS device?

I am doing research in timing synchronization, and want to measure how time synchronization is impacted by injecting various faults into a system. I understand that the PPS devices on linux machines ...
stochasticlover1's user avatar
2 votes
1 answer
195 views

How to make a process occupy one CPU completely?

I am working on an embedded Linux system (kernel-5.10.24). I am trying to make a process to occupy one CPU completely without being scheduled out. #define _GNU_SOURCE #include <sched.h> #include ...
wangt13's user avatar
  • 431
0 votes
1 answer
208 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-...
F. Hauri  - Give Up GitHub's user avatar
-1 votes
1 answer
73 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 ...
NicuMarasoiu's user avatar
0 votes
1 answer
345 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 ...
Andrew15_5's user avatar
2 votes
1 answer
392 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 ...
Pravesh Kumar Sharma's user avatar
0 votes
1 answer
437 views

Installing real-time kernel on EndeavourOS

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 ...
ProgXIVe's user avatar
0 votes
2 answers
691 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 ...
Sukanya U's user avatar
0 votes
2 answers
683 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 ...
Nandor Takacs's user avatar
-2 votes
2 answers
305 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 ...
Maverick's user avatar
  • 107
0 votes
1 answer
69 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 ...
DannyNiu's user avatar
  • 620
0 votes
1 answer
430 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 ...
AntVival's user avatar
-2 votes
2 answers
133 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 ...
Sukanya U's user avatar
-1 votes
2 answers
264 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 ...
Sukanya U's user avatar
0 votes
1 answer
515 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 ...
xNaXDy's user avatar
  • 1
2 votes
1 answer
348 views

System-wide scheduling modification

Is there a way to change the process scheduling policy of the whole system? For example, I want to change the default SCHED_OTHER to SCHED_RR for all processes. The command chrt operates on a process. ...
mahmood's user avatar
  • 1,211
2 votes
0 answers
448 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 ...
chmike's user avatar
  • 211
0 votes
1 answer
641 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 ...
Muhammad Ikhwan Perwira's user avatar
1 vote
0 answers
225 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&...
Mario's user avatar
  • 11
2 votes
1 answer
466 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 ...
Ken Y-N's user avatar
  • 253
0 votes
2 answers
845 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 ...
DannyNiu's user avatar
  • 620
0 votes
1 answer
612 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 ...
GPWR's user avatar
  • 152
0 votes
1 answer
66 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 ...
DannyNiu's user avatar
  • 620
0 votes
0 answers
27 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 ...
Jason Iversen's user avatar
0 votes
0 answers
564 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 ...
davolfman's user avatar
  • 602
3 votes
0 answers
3k 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/...
user247243's user avatar
2 votes
1 answer
986 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 ...
Peter's user avatar
  • 205
1 vote
1 answer
10k 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 ...
lutzlook's user avatar
1 vote
1 answer
829 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 ...
Camps's user avatar
  • 111
0 votes
2 answers
156 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 ...
Sasan's user avatar
  • 143
0 votes
1 answer
349 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 ...
Oussema's user avatar
  • 101
0 votes
1 answer
2k 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? ...
michaeljtbrooks's user avatar
7 votes
1 answer
2k 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 ...
usretc's user avatar
  • 638
1 vote
2 answers
1k 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 ...
Sreedhar's user avatar
3 votes
2 answers
7k 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.
JustWe's user avatar
  • 141
0 votes
1 answer
589 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 ...
BrilliantContract's user avatar
0 votes
2 answers
923 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 ...
bobbydev's user avatar
  • 101
1 vote
0 answers
1k 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 ...
Chad G's user avatar
  • 270
3 votes
4 answers
6k 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'...
Spartan Scrub's user avatar
0 votes
0 answers
349 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@...
tannoy connect's user avatar