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
0answers
6 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
41 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
34 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
30 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
22 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
25 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
9 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
24 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
25 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
84 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
19 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 ...
1
vote
1answer
81 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
45 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
17 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
38 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
184 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
123 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
88 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
230 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
26 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
134 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
383 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
72 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
389 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
112 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
36 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 ...
0
votes
1answer
75 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
415 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
137 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
0answers
15 views

Thread scheduling behavior between steps of GDB compared to non-stepped execution

The GDB manual states that when using all-stop mode for debugging a multithreaded application, it is not possible to advance every thread in lock-step by exactly one statement. This makes sense since ...
0
votes
1answer
691 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
489 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
78 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
33 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
84 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
686 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
233 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 ...
1
vote
2answers
816 views

Meaning of parameter “kernel.sched_min_granularity_ns” in RHEL6/RHEL7

While studying the kernel behaviour from RHEL6 to RHEL7, we came across an explanation on RHEL6 kernel parameters: > kernel.sched_min_granularity_ns sched_min_granularity_ns is the initial ...
1
vote
1answer
321 views

How does the kernel scheduler know a timeslice has passed?

In my previous question How does the kernel scheduler know how to pre-empt a process? I was given an answer to how pre-emption occurs. Now I am wondering, how does the kernel scheduler know that a ...
1
vote
2answers
542 views

How does the kernel scheduler know how to pre-empt a process?

As far as I understand, the kernel is not a process, but rather a set of handlers that can be invoked from the runtime of another progress (or by the kernel itself via a timer or something similar?) ...
1
vote
0answers
163 views

How to keep Linux kworker threads alive?

I'm experiencing some data loss on a USB-to-serial adapter on a Raspberry Pi running at a (relatively) high data rate. I believe most of the work is carried out by kernel threads: 2569 root 20 ...
1
vote
2answers
977 views

Giving users scheduling privileges

I have some code which uses sched_setscheduler from sched.h sched_param sched; sched.sched_priority = 70; sched_setscheduler(getpid(), SCHED_FIFO, &sched); However, this function will fail ...
1
vote
0answers
76 views

Linux (kernel 3.x and 4.x) Pthread and general process scheduling algorithms

I was wondering if both scheduling (contention) scopes (SYSTEM and PROCESS) are used in the Linux kernel scheduling logic. POSIX supports PROCESS scope pthreads (MXN model) and SYSTEM scope pthreads (...
0
votes
1answer
407 views

CFS and real-time policies

I'm trying to implement a real-time algorithm in Linux. I've studied the linux Real-Time policies : sched_rr, sched_fifo. Than i go deeper and i found the Completely Fair Scheduler. I deduced that ...
1
vote
1answer
276 views

Does Linux 3.10 CFS have “timeslices”?

Does Linux 3.10 CFS have "timeslices"? I am confused, because sched-design-CFS.txt clearly states: CFS uses nanosecond granularity accounting and does not rely on any jiffies or other HZ detail. ...
1
vote
3answers
216 views

How to schedule activation/termination of KVM/QEMU virtual mahines?

I run an IPv4 server in a Fedora virtual machine. This server hosts a git service for a group of developers and is open to the internet. As a consequence, it is confronted to hacking attempts (mainly ...
2
votes
0answers
22 views

How to check a process is running in which core? [duplicate]

I have a very computationally intensive job(single threaded) running in my system, and htop is showing one of the core is ~100% utilized. Obviously, the job is scheduled to this core. But, I am ...
1
vote
0answers
43 views

During what kinds of operations is a process considered for the 'load average'?

In general, I'm trying to understand the numbers displayed by uptime (and numerous oder commands): $ uptime 13:40:52 up 18 days, 2:10, 8 users, load average: 0.20, 0.30, 0.64 Here, my system's ...
2
votes
1answer
1k views

Kubuntu 18.04, cron task does not load @reboot

I am running Kubuntu 18.04, and have a simple script to reset the plasmashell every time after suspend/lockscreen since there's a known bug that corrupts folder/file names upon returning from suspend. ...
1
vote
1answer
351 views

Set usb flash drive as non rotational drive

I'm trying to optimize the IO schedulers and to use a proper scheduler for rotational and for non rotational drives (different). When I run: cat /sys/block/sd*/queue/rotational I get: 1 <-- ...