Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [scheduling]

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

2
votes
1answer
22 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
13 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
37 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
32 views

Encouraging the CPU to perform out of order execution [migrated]

I am attempting to exploit the meltdown security flaw on Ubuntu 16.04, with an unpatched kernel 4.8.0-36 on an Intel Core-i5 4300M CPU. First, I am storing the secret data at an address in kernel ...
1
vote
0answers
100 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
45 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
54 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
143 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
21 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
1answer
49 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 ...
2
votes
0answers
176 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
0answers
45 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
355 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
37 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
24 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
40 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
191 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
86 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
10 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
256 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
369 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
65 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 ...
1
vote
0answers
366 views

How linux kernel scheduling works on multi core processor? [closed]

I recently started reading Robert Love's book "Linux Kernel Development 3rd edition" and dived into the scheduler part, which left me with lots of questions. So first off, I understood there are 2 ...
2
votes
0answers
29 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
57 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
383 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
74 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
397 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
234 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
350 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
118 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
492 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
68 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
0answers
7 views

sched_deadline behaviour

I've studied the sched_deadline and i have some questions: 1) Is a portion of CPU assigned to sched_deadline algorithm at precise time intervals ? If yes, who decide how much Utilization Factor ...
0
votes
1answer
275 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
186 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
184 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
21 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
40 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. ...
0
votes
0answers
37 views

How to find the tree of schedulable entities in Linux?

I am trying to set the nice values of my VMs (KVM + QEMU). I do this by: ps -u libvirt-qemu # get pid of qemu-system-x86_64 process. ls /proc/${PID}/task/ # get pid of the CPU 0/KVM thread. renice -n ...
1
vote
1answer
232 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 <-- ...
2
votes
0answers
234 views

Shielding CPU from scheduler - How to move bound kernel threads from cores?

Suppose I have 4 physical cores (indexed 0-3) and I'm dedicating cores 1-3 to a shield for user applications and trying to steer all system threads onto core 0. I'm following the answers here and ...
1
vote
1answer
71 views

Why will crontab not run my file at a set time, but will run every minute?

So, I have attempted to get crontab to run a node.js file at a set time everyday. I have set it up by doing crontab -e. I have tested that it runs every minute by using the below: * * * * * //path of ...
0
votes
1answer
2k views

Custom priority value: is a pthread high sched prio positive or negative?

I’m trying to reimplement in a backward-compatible way the RobotC API from C (although some details would better fit or would be easier with C++), and trying to reimplement their multithreading API in ...
0
votes
1answer
360 views

How to troubleshoot failing cron job

I have a crontab root file that looks like this: lab-1:/var/www/cdd# crontab -l # do daily/weekly/monthly maintenance # min hour day month weekday command * * * * *...
0
votes
1answer
476 views

What happens when there is a context switch while the process is in Kernel mode?

This is my understanding: When in user mode and a trap/system call occurs, registers are saved on to the kernel stack, switch is made to kernel mode, and trap is handled and returned to user mode. ...
1
vote
1answer
29 views

Does increasing the niceness of processes reduce time spent on scheduling?

Suppose a server has many long-term cpu-bound processes with no realtime requirements for those processes. Would maximising the niceness of each process reduce cpu time spent on scheduling those ...
0
votes
1answer
2k views

How to disable blk-mq for NVMe and use CFQ, deadline, noop?

For testing purposes, I would like to use CFQ, deadline, and noop for an NVMe drive. Is this possible? I am able to use the blk-mq for SATA SSDs by adding "scsi_mod.use_blk_mq=1" to the grub boot (...
3
votes
0answers
51 views

What is the maximum processor frequency that Linux could run on?

Theoretically, if an extremely fast computer could be built (100s of GHz or even terahertz), what is the maximum frequency that could be expressed in the variable used by the scheduler allocate cycles?...