2022 Developer Survey is open! Take survey.

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
23 views

How to get schedule delay information of each cpu?

I know that the scheduling information of each process can be obtained from procfs, but I don't know how to get the schedule delay information of each cpu. It's better to use procfs or syscall.
user avatar
  • 1
1 vote
1 answer
24 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....
user avatar
0 votes
0 answers
32 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 ...
user avatar
-2 votes
1 answer
54 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 ...
user avatar
  • 221
-2 votes
1 answer
54 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 ...
user avatar
  • 221
0 votes
1 answer
17 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 ...
user avatar
  • 995
0 votes
1 answer
53 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 ...
user avatar
  • 995
2 votes
1 answer
67 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. ...
user avatar
  • 995
1 vote
2 answers
53 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 ...
user avatar
  • 995
2 votes
1 answer
25 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 $ ...
user avatar
  • 995
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
1 vote
3 answers
110 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 ...
user avatar
  • 269
0 votes
1 answer
43 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 ...
user avatar
0 votes
1 answer
47 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 ...
user avatar
  • 111
0 votes
0 answers
8 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 ...
user avatar
3 votes
1 answer
26 views

Crontab scheduling for specific option

I need to add a crontab entry which runs every quarter ,on second sunday ,at 02 am. Which of the below one is correct? the OS is AIX. 00 02 8-14 */3 0 && /myscript.sh or 00 02 8-14 */3 * [...
user avatar
1 vote
3 answers
127 views

Running a python script via cron at a random time between 10AM-11PM once every day

I'm on ubuntu and need to run a python script once every day randomly between 10AM-11PM. Right now I've only got it running at a fixed hour, I've seen a few examples but mostly for repetitive tasks ...
user avatar
  • 11
0 votes
1 answer
39 views

How does Debian (or OSs in general) handle opening of multiple instances of a program?

How does the OS handle it if I were to open up 10 terminal windows? Does it use multi-threading, or multi-processing? Or is there some other concept that I am yet not aware of? And if I were to run a ...
user avatar
0 votes
1 answer
193 views

schedule cron job for every hour is not working

I am running a single instance cron job for certain task. My script looks like below: # every hour interval 0 * * * * php /project/yii daily/order # every 30 minutes interval */30 * * * * php /...
user avatar
0 votes
0 answers
53 views

Scheduling difference manual execution vs Slurm srun/sbatch

tl;dr A CPU intensive workload ignores the nice values of other processes only when started via Slurm sbatch/srun (not when manually started). I am running a systemd service which periodically gathers ...
user avatar
1 vote
2 answers
128 views

Spike in number of page faults with make -j`nproc`

I am running a benchmark to figure out the number of jobs I should allow GNU Make to use in order to have optimal compile time. To do so, I am compiling Glibc with make -j<N> with N an integer ...
user avatar
1 vote
1 answer
32 views

Linux CFS scheduler: how are tasks stopped?

As far as I understand by reading some SO questions and the kernel docs, in Linux, a task (thread, process, or even a group of tasks) is allowed to execute without interruption during a minimum amount ...
user avatar
0 votes
3 answers
73 views

What is the easiest way to run a program from time X to time Y?

There is a certain potentially failing process that I want to run until it succeeds, during the night time, say, from 23:00 to 7:00, but not later. A possible solution would be to: Add a cron job for ...
user avatar
0 votes
0 answers
26 views

What is the most efficient way to run a task every X hours of runtime, accumulated over all power-ons?

Let us assume that I have a machine which wakes up at 7:00, does some work, usually for 15 minutes, but sometimes for days (e.g., experiment supervision), and after the works is done, it powers ...
user avatar
2 votes
0 answers
18 views

How do I flag a process to avoid hyperthreading (SMT)?

Suppose I have an 18 core CPU with SMT enabled, and there are 18 long runnning processes, all using ~100% of a thread. If I start a 19th process, the kernel will schedule it to run on one of the cores,...
user avatar
  • 131
0 votes
0 answers
7 views

Is it possible to migrate a task running on non-isolated core to an isolated core?

I am trying to run Real-Time tasks on a separate core. For that, I isolated one core, but the isolated core got out of the scheduler. And Most probably, the tasks will arrive on a non-isolated core. ...
user avatar
  • 41
1 vote
1 answer
214 views

Understanding overhead cost of context switching

I've always read/heard that context switching is expensive. I recently started reading Robert Love's "Linux Kernel Development" and have made it through the Processes and Process Scheduling ...
user avatar
  • 111
0 votes
1 answer
41 views

Display Sleep / Wake on Schedule

Is there some sort of display keep-awake command that could be scheduled? I have a machine I'd like to run a dashboard display during certain hours without having to interact with it every day to wake ...
user avatar
1 vote
1 answer
1k views

systemctl cannot access service file, Permission denied

On Fedora 35, I create my own service to schedule a backup. I have the script in /usr/local/bin/ and service files plus timer in /lib/systemd/system/ ls -an /usr/local/bin/ prints -rwxr--r--. 1 0 0 ...
user avatar
3 votes
0 answers
164 views

SCHED_BATCH description confusing - what does it actually do?

There are several scheduling options in Linux, which can be set to a process with the help of a chrt command line. And I can't seem to grasp one of them... Which is SCHED_BATCH. In fact, it's ...
user avatar
0 votes
1 answer
309 views

How to run a cron job Sun-Fri at 1 PM and 11 AM on Sat?

am trying to set up a cron job schedule which is supposed to run from Sun-Fri at 1 PM but on Sat I want it to run at 11 AM. I am trying this URL to create a cron schedule but doesn't seem to figure ...
user avatar
1 vote
1 answer
197 views

Linux equivalent of Thread Director?

The 12th Generation Intel chips are rumoured to have "Efficient" and "Performance" cores. Apparently Microsoft's Thread Director, in Windows 11, takes advantage of them. What will ...
user avatar
  • 111
0 votes
1 answer
127 views

How does the page table of a process knows which page was swapped?

I'm refering to those links: Page table content when the physical page we are looking for is in swap area how does linux update page table after context switch How does the kernel address swapped ...
user avatar
  • 9
0 votes
0 answers
34 views

How can Linux fair scheduler allow two web servers to listen for requests on one cpu?

If two web servers are on one CPU, with IFS, each allocated 500 millicores (for example, in Kubernetes), how can the kernel be listening on two ports at any given time? For example, if two requests ...
user avatar
1 vote
1 answer
40 views

Tools for batching N commands over L scripts (for N≫L)?

Let's say that I have access to a high-performance Linux cluster equipped with a scheduler (e.g. LSF, Slurm, etc.) that will allow me to have up to M jobs either running or pending at any one time, of ...
user avatar
  • 12.8k
3 votes
0 answers
118 views

systemd niceness and scheduling configurations not effective in processes performance

My team inherited the care and maintenance of code for a service that runs three python scripts and creates processes which play a part in sending data from our product to another product. One process ...
user avatar
0 votes
0 answers
55 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
0 votes
0 answers
55 views

smp: csd: Re-sending CSD lock (#2) IPI from CPU#89 to CPU#32

Seeing this log, smp: csd: Re-sending CSD lock (#2) IPI from CPU#89 to CPU#32 What is the reason causing this log? any idea to improve it?
user avatar
  • 371
0 votes
0 answers
218 views

Cron Script to execute every 14 days starting from a specific date,timezone

All, I am looking for a CRON expression which should run every 14 days(2 weeks) on Thursday. As an e.g. if I execute the JOB on June 24th Thursday , next execution should be on July 8th THU, next is ...
user avatar
  • 1
0 votes
0 answers
220 views

How to disable rcu_sched detected stalls warnings

When doing some stress, I will get: INFO: rcu_sched detected stalls on CPUs/tasks: According to: https://www.kernel.org/doc/Documentation/RCU/stallwarn.txt Stall-warning messages may be enabled and ...
user avatar
  • 371
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
1 answer
183 views

Crontab not running when mac asleep despite scheduled wakeup

I have a crontab that works as expected when my mac is awake but seems not to run when the mac is asleep even though I've scheduled the it to wake up a few minutes before it's supposed to run. In the ...
user avatar
0 votes
0 answers
23 views

anacron is given priority over cron

An extract from the book Linux-In-Action As you can see from the crontab file, anacron is given priority over cron. the crontab file he is referring is - /etc/crontab Consider the below scenario My ...
user avatar
1 vote
1 answer
1k views

How to schedule a cron for 1st 2nd and 3rd week and on specific day of week?

I am trying to schedule a cron, where if a month has 5 weeks and 5 wednesdays, script A.sh should run on 1st week wednesday 2nd week Wednesday, 3rd week wednesday and 4th week wednesday, where as on ...
user avatar
2 votes
1 answer
78 views

Am I making invalid assumptions with regard to my kernel module's shared memory?

I have written a "device driver" (see source code here: https://bitbucket.org/wothke/websid/src/master/raspi/websid_module/ ) that runs fine for most of the time (see https://www.youtube.com/...
user avatar
  • 21
1 vote
0 answers
63 views

Is it possible to make a program that goes into continuous Uninterruptible Sleep and is non-killable?

According to my knowledge processes in Uninterruptible Sleep cannot be killed. So I thought - Is it possible to make a program that goes into that state and stays in it without going through other ...
user avatar
1 vote
0 answers
30 views

Does the Linux Genreic Block Layer prefer Read requests over Write Requests?

Does the Generic Block Layer in the Linux kernel, prioritize read requests over write requests ? That is without taking the I/O scheduler into account.
user avatar
0 votes
1 answer
121 views

How to tune the linux Scheduler for parallel computation?

I have a linux machine dedicated to running some parallel computation, and I'm trying to understand how to choose / tune the scheduler, and perhaps other parameters, to extract the most performance (...
user avatar
  • 101
1 vote
1 answer
33 views

Full feature Linux scheduler

The scheduler cron processes outputs of programs only sending them via mails or writing them in files. So these outputs can't be assigned for example to a PHP variable (see this StackOverflow question)...
user avatar
  • 11
0 votes
1 answer
99 views

systemd timer on boot but not too often

Would it be possible to create a timer that will run a service on a boot, but not more often than once a week? In my case it would be beneficial to run a TRIM (fstrim) for SSD disk on a boot, but once ...
user avatar

1
2 3 4 5
8