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
1
vote
0answers
10 views

Is pulseaudio's default nice value (-11) actually ineffective due to autogroup?

The pulseaudio daemon runs with nice level -11 by default, via rtkit. However, I'm noticing choppy audio at times of high cpu load, and decreasing the nice value even further by setting high-priority ...
0
votes
0answers
16 views

systemd-run not setting priority correctly for CPUSchedulingPolicy=fifo

Background I have a programme that I want to benchmark, using scheduling policy SCHED_FIFO (see man 7 sched) on Linux. A process with policy SCHED_FIFO may have priorities between 1 and 99 inclusive, ...
0
votes
0answers
14 views

Schedule command to run at specific timestamp with systemd

I would like to schedule a command to be run at a specific time, identified by a Unix timestamp. It seems like this might be doable with systemd, using systemd-run, but how would that work? And what ...
1
vote
2answers
47 views

Linux scheduling overhead in orders of magnitude?

I read that Linux has an O(1) scheduler, but this does not tell me actually how long a context switch roughly takes. Does someone have some current numbers? I know it depends on a lot of factors ...
0
votes
2answers
91 views

Linux timer interrupt

I have two questions about the Linux kernel. Specifically, does anybody know exactly, what Linux does in the timer interrupt? Is there some documentation about this? And what is affected when ...
3
votes
2answers
149 views

What is the hardware which the linux kernel uses for timer interrupt

I am reading about jiffies which will be updated for every timer interrupt. The frequency of the timer interrupt is determined by compile time constant HZ. We have lot of hardware devices present on ...
0
votes
0answers
63 views

what's the execution sequence of multiple child processes

use the follwing code to fork four chile processes #define _GNU_SOURCE #include <stdio.h> #include <unistd.h> #include <sys/wait.h> #include <stdlib.h> pid_t pid; int ...
1
vote
0answers
15 views

What is the meaning of <idle>-0 in kernel debug tracing?

Recently when I tried to do some kernel driver debugging in Ubuntu 16.04, kernel version 4.15, I come across the kernel tracing mechanism, which is pretty handy to observe all kinds of kernel ...
1
vote
0answers
38 views

Scheduling CPU, between User space process/threads and kernel tasks/jobs [duplicate]

I was trying to understand the Linux process management and scheduling. I know that the scheduler schedules different processes based on priority/time slicing. But there are kernel tasks(I am not ...
3
votes
1answer
55 views

Are processes in square brackets scheduled in the same way as other processes?

ps(1), with the -f option, will output processes for which there is no associated command line in square brackets, like so: UID PID PPID C STIME TTY TIME CMD root 1 0 0 ...
0
votes
0answers
76 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 ...
4
votes
2answers
207 views

How does the Linux kernel schedule CPU, between user space processes/threads and kernel tasks/jobs

I was trying to understand the Linux process management and scheduling. I know that the scheduler schedules different processes based on priority/time slicing. But there are kernel tasks (I am not ...
0
votes
0answers
18 views

At -q not queuing

I am using Ubuntu server. I have the following at command: at -q a now I expected that the -q a would cause the commands to run sequentially, but they are not. On inspection with atq they are all ...
0
votes
0answers
16 views

How do I log process activity in linux with the least amount of interference (i.e. reduce observer effect)?

I want to log the following parameters of a set of running processes (in R state) : PID, NICE, PRIORITY. I can use ps to get these, but I want to continuously log these parameters for a certain ...
0
votes
0answers
17 views

Stop systemd-run after a set time

My question is similar to Start/stop a systemd.service at specific times, but deals with one-off processes scheduled with systemd-run rather than systemd timer files. I want to record fm transmissions ...
0
votes
1answer
45 views

How do I start a shell the way all the processes ran from within it and processes they run would have low priority?

I'd like to start a long, complex CPU and IO heavy command-line job to be done in background while I'm using the PC. It will hinder responsiveness of the system if I run it with normal priority. How ...
0
votes
1answer
41 views

CRON Job Schedule issues

I want to schedule a job for 3rd Friday of every month, 1 AM . I checked few cron entry websites for that didn't work for me. I was also checking for some awk options for this so far not successful ...
2
votes
0answers
42 views

Linux task state different in /proc/pid/stat compared to Ftrace output of sched events

I'm trying to trace the flow of a piece of code just to understand the points where the tasks go into D/S/R states (uninterruptible/interruptible/running). I do understand the meaning of each state, ...
1
vote
0answers
23 views

Deterministic thread cancelation

Is there a way to deterministicly cancel threads (Light-weight process) in linux. Let say I want to cancel a thread because it is possible in an infinite loop or my scheduler requires it. How would ...
0
votes
0answers
27 views

Why a long type memory is reserved to nice value in the PCB in Linux?

All right, my question is not sufficiently specific. I've not mentioned the kernel version, the distribution and other potentially interesting things. But, anyway... these are important but doesn't ...
1
vote
0answers
11 views

VRUNTIME variable maximum value in minutes / hours (CFS Scheduler)

VRUNTIME is described as the variable in the sched_entity structure that tracks time (nanoseconds). is this a 64 bit value ? If so what is the maximum time in minutes / hours this variable can hold. ...
0
votes
0answers
35 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 ...
0
votes
2answers
30 views

reducing scheduling time of a single process

I have a process that is mining a private blockchain and it takes 100% of the CPU. I don't need that much computing power for this, so in order to reduce my energy bill I need to configure this ...
2
votes
1answer
201 views

How to make a system suspend and resume on schedule?

I have a Linux server that's only needed at workdays in work hours. There's no point having it powered on all the time. How can I make a Linux system suspend and resume on set times and days without ...
1
vote
2answers
22 views

How to test two identical process with different scheduling policy and their cpu usage

what would be the best approach to compare usage of the processor (in %) for two identical processes with different scheduling policy in for example one-minute time frame. I'm pretty new to the linux ...
2
votes
1answer
108 views

What timezone does the `at` command use?

I've searched in the man pages for the at command there are no mentions of timezone or tz. There is this: The exact definition of the time specification can be found in  /usr/share/doc/at-3.1.10/...
2
votes
1answer
115 views

How does the kernel assign the nice value to a process after it has been executed?

The Linux kernel implements two separate priority ranges. The first is the nice value, a number from –20 to +19 with a default of 0. Nice values are the standard priority range used in all Unix ...
0
votes
1answer
18 views

Is it possible to schedule an anacron single line command execution instead of sourcing a file?

Everywhere on the internet, in articles or tutorials (in the searching of "schedule an anacron command"), I find a format such as the following: @daily 15 rsync.daily /bin/bash /home/steven/...
0
votes
0answers
40 views

Run and close a file every few minutes

I need to play an audio file and after 3 minutes close it, then all over again. play it 3 minutes and close it. Currently I'm using a cron job to open the file in VLC and close it, but it's not good ...
1
vote
0answers
229 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 *...
1
vote
1answer
178 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 ...
1
vote
2answers
125 views

Slurm like alternative for localhost

I have resources (e.g. GPU) I can only use once at a time. When performing experiments I always need to know on time of a batch files creation, what experiments I want to execute in the future. But I ...
0
votes
0answers
240 views

rcu_sched self-detected stall on CPU + watchdog: BUG: soft lockup - CPU#3 stuck for 22s

Being unable to ssh into a machine I connected it to a monitor and found the following: The machine is running Ubuntu Server 18.04 LTS and is a first generation 8 core Ryzen 1700. I've restarted the ...
1
vote
0answers
28 views

Determine average and maximum execution time of a task by using ftrace/perf

I've gathered some traces containing scheduling events ('sched:*') by using ftrace and perf record. By analyzing the results many of my questions could already be answered. However, I was wondering ...
2
votes
2answers
186 views

How can I visualize the scheduling domains on Linux?

It seems current versions of Linux use scheduling domains to distribute processes between CPUs, hyperthreads, NUMA nodes, etc. Say I wanted to visualize the domains that exist on a system, and some ...
3
votes
1answer
498 views

ext4 jbd2 and I/O priority

I want to delete a huge directory with over 6 million files across over 4000 directories, totaling about 26GB of data. As I knew this was going to take a while I used ionice to set the I/O priority ...
0
votes
1answer
84 views

Range of values of virtual runtime in CFS scheduler

I am trying to understand the working of the Linux CFS scheduler using kernel version 4.19.2. As mentioned in the documentation, it does not use timeslices in the traditional way but uses the concept ...
1
vote
3answers
404 views

What's the advantage of mere Ansible on mere shell-scripting if one doesn't use communally-maintained Ansible-Galaxy roles? [closed]

I establish a LAMP with a few extras on a remote Debian machine with a similar shell (Bash) script: #/bin/bash apt update -y apt upgrade ufw sshguard unattended-upgrades wget curl git zip unzip tree ...
0
votes
1answer
222 views

change a value in a file

I have a configuration file that some of its lines is like below: # Mandatory: no # Range: 0-5 # Default: DebugLevel=3 I want to change the 3 at DebugLevel to 5 at 2 AM then after for example 2 ...
0
votes
0answers
39 views

ionice vs nice for mysqlimport

I am trying to import a huge .sql file into a mysql server. What (if any) is a best option to speed up the process (all other parameters being equal) reducing the process niceness to -20? setting ...
1
vote
1answer
101 views

Is it possible have a deterministic run of linux process inside docker?

Imagine that I have a linux program that does some network IO. Execution of the program is not deterministic: it gonna produce different results depending on how it's threads are scheduled, what ...
1
vote
1answer
513 views

What's the process scheduler in Linux?

I read wikipedia about process scheduler: The process scheduler is a part of the operating system that decides which process runs at a certain point in time. I don't really understand what that ...
1
vote
1answer
163 views

Restrict time of day for anacron jobs in Linux Mint

I'd like to restrict the time of day the jobs set in anacrontab are allowed to run. I can find in man pages online info about START_HOURS_RANGE which is supposed to do precisely that. For example ...
0
votes
1answer
1k views

How to schedule to run testng.xml file on terminal on linux environment?

I have scripted a Selenium automation testcase. I have generated the testng.xml file which should be executed on the linux terminal at a particular time of my need. Say I want to schdule to execute ...
0
votes
2answers
592 views

How to schedule a command to execute in every 2 hours?

I want to run a small monitoring jar file every 2 hours in my ubuntu machine. java -jar mymonitoringtool.jar I don't know how to set it up.
-2
votes
2answers
88 views

Why is there no choice for cooperative scheduling?

Operating System Concepts says CPU-scheduling decisions may take place under the following four circum- stances: When a process switches from the running state to the waiting state (for ...
2
votes
0answers
34 views

Incorrect Top? or manpage?

According to top's manpage: 16. PR -- Priority The scheduling priority of the task. If you see `rt' in this field, it means the task is running under real time scheduling priority. ...
1
vote
1answer
92 views

FCFS disk scheduling [closed]

I want to find head movement through Disk Scheduling first come first serve algorithm queue = 98, 183, 37, 122, 14, 124, 65, 67 head start at 53 I have confused because this same quotation two book ...
0
votes
1answer
894 views

/proc/PID/sched measure units

Does anyone know what are the measurement units for the metrics in /proc/<PID>/sched file in Linux? cat /proc/1277/sched flush-202:32 (1277, #threads: 1) ----------------------------------------...
0
votes
1answer
343 views

Is it recommended to use param.sched_priority in Linux FIFO during thread creation?

In my embedded device I absorb strange behaviour with the protocol we use, sometimes it takes a while to send the data via serial device using FIFO. My suspicion is Linux is not real-time OS and why ...