Skip to main content

Questions tagged [scheduling]

A technique for scheduling tasks to be run at a specific time or on a specific event.

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

How to get scheduling latency with Ftrace in Linux?

I am working on an embedded Linux (kernel-5.10.24) system where ftrace is enabled but NO perf. I checked the tracefs in my system, and got followings, # ls /sys/kernel/tracing/events/sched/ -l total 0 ...
wangt13's user avatar
  • 443
0 votes
1 answer
50 views

When does the CFS schedule a new task?

I am learning about operating systems by reading through "Three Easy Pieces", and I am stuck on the chapter about the Completely Fair Scheduler (Can be read here, p. 8-10). I understand that ...
Josef's user avatar
  • 101
0 votes
1 answer
33 views

Relationship between number of cores and ability to run processes with higher nice values?

When I "flood" my CPU with 8 high priority (nice=-20) OS threads (the number of cores I have), operation becomes "halty" for obvious reasons, but is still usable. Note that when I ...
doliphin's user avatar
  • 125
0 votes
0 answers
117 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,787
0 votes
0 answers
75 views

Should I see these processes on an isolated core?

I am trying to verify whether my build of linux is behaving as intended. I am using the isolcpus kernel command line argument to isolate one core of a two cored machine simulated on the RISC-V SPIKE ...
confusedandsad's user avatar
0 votes
0 answers
81 views

Linux Mint: Can I have timeshift take a snapshot automatically before updates are installed?

Because I'm paranoid, I'd like Timeshift to take a snapshot immediately before updates are automatically installed. Currently I have daily snapshots, and choose to install updates manually, but I'd ...
Das Louis's user avatar
0 votes
0 answers
37 views

Schedule command to run once at specific time, and re-schedule it to the later time if the machine was powered off

at 10:00 will schedule the command to run at the next occurrence of 10:00. If the machine was powered off at 10:00, at will run the command as soon as possible on the next power on Is there any way to ...
Azerum's user avatar
  • 101
0 votes
1 answer
59 views

How to avoid impact on scheduled jobs by the time leap and reverse on Daylight Saving Time (DST)

Suppose the Time Zone is AEST (Australian Eastern Standard Time) where time leaps from 2AM to 3AM on start, and reverse from 3AM to 2AM on end. Australian Government - Time zones and daylight saving ...
mon's user avatar
  • 180
0 votes
0 answers
240 views

Calculating the CPU-utilization given a round-robin scheduler with 1 ms time quantum, CPU-bound and I/O-bound tasks, and a context-switch time penalty

Consider a system running ten I/O-bound tasks and one CPU-bound task. Assume that the I/O-bound tasks issue an I/O operation once for every millisecond of CPU computing and that each I/O operation ...
NoName123's user avatar
  • 101
1 vote
0 answers
26 views

Latency on pselect caused by other user space processes

I have the following pre-condition on Linux: I'm using a process to read serial data using pselect on a serial device /dev/ttySX. Data comes in at a stable frequency of 400 Hz. To optimize latency of ...
nyquist's user avatar
  • 11
0 votes
0 answers
553 views

Running Scripts Before and After Suspend with Systemd

I found this blog article here that explains the process of Running scripts before and after suspend with systemd. Here are the steps: Create a /usr/lib/systemd/system-sleep/suspend-date.sh script: #...
jophuh's user avatar
  • 23
0 votes
1 answer
36 views

Schedule IO problem via udev by-id

As the title, i'm trying to set the scheduler from boot by inserting the various disks using the udev rules. The problem is that indicating the disk by id (/dev/disk/by-id) in the udev rules (in the ...
vincenzogianfelice's user avatar
0 votes
0 answers
87 views

reserve one core for a special task / process

For diagnostics I want to let an application on a core that is only reserved for it. I do have a CPU with 4 cores (imx8) - so this is an embedded device - not full blown system. So I did the isolcpus=...
Arno's user avatar
  • 115
0 votes
0 answers
56 views

Frequency of Intra versus interprocess context switching

In a book I'm reading (from 2013) it says that, in the Linux Kernel, intraprocess switching is much more cheaper than interprocess switching, I guess, because the switching in a same CPU between two ...
ABu's user avatar
  • 556
0 votes
1 answer
564 views

What does parameter max_newidle_lb_cost actually mean?

What this parameter of scheduling domain mean? e.g. kernel.sched_domain.cpu0.domain0.max_newidle_lb_cost = 11372
TN.'s user avatar
  • 105
2 votes
1 answer
781 views

GPU scheduling in Linux

Please, does someone know how GPUs are scheduled in Linux? Is the Linux scheduler responsible for both CPU and GPU scheduler, or is it done in the hardware or by a driver? For example, with DPU (Data ...
S Bitchebe's user avatar
1 vote
0 answers
230 views

How can I run my systemd service with a SCHED_DEADLINE scheduling policy?

I want to run my systemd service with a SCHED_DEADLINE scheduling policy. I already have this with chrt -d --sched-runtime 1000000 --sched-deadline 5000000 --sched-period 5000000 -p 0 <PID> ...
Trofen's user avatar
  • 11
0 votes
1 answer
482 views

How many times has my process been preempted?

I wrote a simple program with a thread which runs on a CPU core. It spins kind of aggressively, and it takes 100% of the CPU core. I can see that with top + 1. After N minutes, I would like to be able ...
ThreadFrank's user avatar
2 votes
1 answer
223 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
  • 443
1 vote
1 answer
545 views

How does the Completely Fair Scheduler prevent starvation if it's always taking the process with the lowest vruntime?

I've been through quite a few explanations about the Completely Fair Scheduler and they all seem to lack an important detail. The way everything is explained essentially comes down to a summary of the ...
Sniggerfardimungus's user avatar
0 votes
1 answer
3k views

Cron Job vs. Scheduler: Understanding the Differences and Use Cases

What are the key differences between a Cron job and a scheduler, and in what use cases is using one of these tools more appropriate than using the other?
orchard's user avatar
0 votes
0 answers
144 views

Cron doesn't run the Cron Job I wrote [duplicate]

I wrote a Cron Job and it doesn't run. Any Idea why it doesn't run? This is the Cron Job I expect to run: # # # (day of month) (day of week) # min hou dom (day ...
michal roesler's user avatar
0 votes
1 answer
361 views

Run a scheduled command on open terminal

A task/script scheduled with cron or at (AFAIK) can not run inside a specific terminal: it can only print the output (through redirection) of a task/script to a specific terminal. Instead, I would ...
BowPark's user avatar
  • 4,955
0 votes
1 answer
609 views

Grant Permission to Run Process with FIFO

I am trying to run a program that sets its own scheduler policy to sched_FIFO, but it errors out saying operation not permitted. If I run it with sudo then it succeeds, but I want to reduce the ...
Chad's user avatar
  • 73
1 vote
1 answer
126 views

DPROBES (DTRACE_PROBE) for measuring high latency stuff under 1µsec

Currently, I'm analyzing the performance of a high latency application but I'm not confident in my measurements at all. So far, I have used DPROBES for instrumentation and BCC/funclatency for ...
Bahamas's user avatar
  • 113
0 votes
1 answer
214 views

Cron expression at 11h30 and 19h every day

I would like to make a cron expression that runs at 11:30 a.m. and 7 p.m. every day. But 0 30 11,19 ? * * * runs at 11h30 and 19h30 And 0 30,0 11,19 ? * * * runs at 11h, 11h30, 19h and 19h30 How can I ...
Chrys's user avatar
  • 1
2 votes
1 answer
595 views

How does round-robin scheduling and context switching work from a low-level?

Using round-robin scheduling, the kernel provides time slices for different processes / tasks. It seems that the kernel will initialize a timer, and when the timer times out, this will cause the ...
Engineer999's user avatar
  • 1,171
1 vote
1 answer
88 views

This cron script was missed by shutdown

Is there a way to setup cron (or any other scheduler, like anacron) to run such that it checks immediately after I resume working on my laptop (e.g. after suspension or shutdown) whether it has ...
user7088941's user avatar
3 votes
0 answers
1k views

cgroups v2 cpuset doesn't take an effect without process restart

I'm trying to isolate some CPU cores for latency-sensitive processes using the cpuset controller in cgroup v2. I created a group lowlatency: mkdir /sys/fs/cgroup/lowlatency and restricted it to use ...
Maxpain's user avatar
  • 31
1 vote
1 answer
85 views

Is there a user-level utility which offers the features of "cron" or "at" and only within a particular session?

I want to run a some scheduled commands on a timed basis within a manually startedscreen session and only within that screen session, because it uses an ssh authentication tied to that session. ...
vfclists's user avatar
  • 7,619
0 votes
1 answer
152 views

the column values shown by perf sched record don't make sense

The problem I'm seeing occurs with virtually any command I run with perf sched record I'll use ls as a very simple example. So if I do perf sched record ls followed by perf sched latency the ...
rkg1's user avatar
  • 15
0 votes
0 answers
115 views

Renicing X server and compositing manager (kwin-like) on a linux_kernel desktop

Long time ago (pre-2.6 kernels) on a very low end desktop, I had been happily following Con Kolivas suggestion to (quite heavily (-10)) renice the X server. (for better responsiveness) With newer ...
MC68020's user avatar
  • 8,241
4 votes
2 answers
1k views

Should the irqbalance daemon be used on a modern desktop x86 system?

Today I've read this opinion however I don't understand the topic of interrupts at all, so it would be nice if knowledgeable people chimed in and explained the rationale behind using this daemon in ...
Artem S. Tashkinov's user avatar
1 vote
1 answer
320 views

Load a process into RAM, but don't execute?

Is there a way to load a process into RAM, but somehow tell the scheduler not to execute it? The aim being to have the system read the binary from disk, allocate the pages in RAM for the code, but not ...
Ralph Bolton's user avatar
0 votes
0 answers
91 views

Any good tool/library for queue processing with good monitoring/management interface?

I'm trying to run an experiment that involves transforming a lot of files through a pipeline like this. A and B take a file as input and produces a file, or some text through stdout. C takes those ...
sigh's user avatar
  • 101
0 votes
1 answer
74 views

Process status logic

How can a process have a status when only threads are being scheduled (Windows and Linux)? Let’s say we create process P Thread T1 is now allocated as well T1 is now in runnable state Scheduler picks ...
X XXX X's user avatar
1 vote
1 answer
563 views

chrt fails to set policy - Invalid argument

This happens both on Fedora and Garuda. Here are example error messages: $ sysctl kernel/sched_deadline_period_min_us kernel/sched_rt_period_us kernel/sched_rt_runtime_us kernel....
adamski234's user avatar
1 vote
1 answer
932 views

Linux kernel BUG: scheduling while atomic: swapper/0/0/0x7fff0001

I'm running Arch Linux, kernel 5.17.3 (though this issue has been happening across many versions.) Every couple of days, I get random complete system freezes. The kernel logs vary, but they most ...
Keegan Conlee's user avatar
-2 votes
1 answer
1k views

Where and how is the scheduler running? Can I "see" it? [duplicate]

The scheduler is not a thread but it's a kernel function, so there's no way to actually "see" what the scheduler is doing (I assume). These particular kernel parts are kind of invisible from ...
Allexj's user avatar
  • 265
-1 votes
1 answer
755 views

Where is the process scheduler running? Can I track it?

Is the process scheduler "visible" at user space? Can I see it with ps? Maybe is it one of the kernel threads? If yes, how is it called? How can I "see" it? It doesn’t exist as a ...
Allexj's user avatar
  • 265
0 votes
1 answer
554 views

Finding default process scheduler

Where in the Linux code, I can find the default process scheduler at the time of launching a process. For a running process, chrt shows SCHED_OTHER. On the hand, in various websites, I see that the ...
mahmood's user avatar
  • 1,241
1 vote
1 answer
2k views

No sched_min_granularity_ns in kernel parameters

According to this post, there are three kernel parameters for controlling process scheduler: kernel.sched_min_granularity_ns kernel.sched_latency_ns kernel.sched_wakeup_granularity_ns However, on my ...
mahmood's user avatar
  • 1,241
2 votes
1 answer
384 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,241
1 vote
2 answers
777 views

chrt has no effect on changing scheduling policy

I would like to change the scheduling policy of a process via chrt, however, as you can see below, it has no effect on the systemd process. This is an example and I tried other processes, too. It ...
mahmood's user avatar
  • 1,241
2 votes
1 answer
273 views

Adding more schedulers

I have seen different IO schedulers in tutorials, e.g. cfq, noop, but when I test on my linux, I don't see them. $ cat /sys/block/sda/queue/scheduler [mq-deadline] none $ uname -r 5.13.0-27-generic $ ...
mahmood's user avatar
  • 1,241
2 votes
0 answers
501 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
1 vote
3 answers
3k views

What config value should I set to make the HZ value (jiffies) physically correct?

When building linux kernel Image, we set the value HZ. linux kernel has the default HZ value. It is a software clock frequency the kernel operates at and 1/HZ (=jiffies) is the unit of scheduler ...
Chan Kim's user avatar
  • 397
0 votes
1 answer
228 views

What starts threads in Linux OS?

I am currently investigate a question related to threads in the Linux OS. I know that processes are started by the scheduler in Linux Kernel, but what starts threads inside a process - Linux Kernel ...
Evil JuniorCplusplus's user avatar
0 votes
1 answer
912 views

How does linux decide which core a thread runs on?

I know the linux decides which cores threads run on, therefore, the tasks of each core are guaranteed to be balanced. But where can I see the introductory documentation? I would like to understand the ...
daohu527's user avatar
  • 111
1 vote
0 answers
79 views

How does Completely Fair Scheduling handle new Processes

I'm currently trying to understand Completely Fair Scheduling (CFS) and stumbled across something I can't understand. Let's make an example: I have a process running in the background (for example ...
Philipp Bleimund's user avatar

1
2 3 4 5
9