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
2
votes
1answer
258 views

Is “top” accounting for Kernel Interrupts?

I have a simple interrupt that is triggered by a GPIO-input. The IRQ only increments a variable and returns. When I turn the frequency of the interrupts up to somewhere around 10-20 kHz, the system ...
0
votes
0answers
23 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 ...
0
votes
1answer
68 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
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
22 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
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 ...
4
votes
2answers
894 views

How does the Linux scheduler determine if a process is I/O bound or CPU bound

Adding to this question, how does the scheduler determine if a process is I/O bound or CPU bound? Mr. Love in this article, says "schedulers often employ complex algorithms to determine the most ...
3
votes
1answer
729 views

How to reschedule an at job to run earlier?

Suppose I had scheduled an at job to run 3 hours later: $ echo command | at now +3 hours $ atq 9 Mon Dec 5 14:00:00 2016 a nr but having passed 1 hour I change my mind, and then need to run ...
0
votes
2answers
23 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 ...
8
votes
2answers
2k views

Using and understanding systemd scheduling-related options in a desktop context

In systemd service files, one can set the following scheduling related options (from the systemd.exec man page, correct me if I'm wrong): Nice Sets the default nice level (scheduling ...
2
votes
1answer
41 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
17 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
68 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/...
15
votes
2answers
21k views

How to enable and use the BFQ scheduler?

I just installed Linux kernel version 4.12 on Ubuntu 17.04 using ukuu (Ubuntu Kernel Update Utility https://doc.ubuntu-fr.org/ubuntu_kernel_upgrade_utility). The thing is, when I check the available ...
4
votes
4answers
17k views

@hourly vs 0 * * * * - Cron - How to run jobs hourly, but at different times

I have jobs that I want to run hourly, but not necessarily at the same time, which I think 0 * * * * job Means run at the 0 minute of every hour on the dot. I know I can also use @hourly job ...
-1
votes
2answers
6k views

Cron job is not working [closed]

I have a cron job configured at var/spool/cron/testuser, Am calling adindex.sh file from there. Am getting results when am directly put the command directly in prompt(php and sh), But cron is not ...
4
votes
2answers
3k views

Using sched_rt_period_us for setting maximum time between task calls of order of 10ms

I realize sched_rt_period_us and sched_rt_runtime_us are meant to prevent freezing the system in case of runaway RT task. I wonder though, if it's possible to use a small value of sched_rt_period_us ...
2
votes
1answer
33 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 ...
3
votes
2answers
3k views

Why sudo user can use sched_setscheduler SCHED_RR while root can not?

I am running Arch Linux on a Raspberry Pi 2. I have a user-space program that uses Gordon's wiringPi library and, in particular, the piHiPri() function that attempts to set the highest priority for ...
11
votes
3answers
14k views

Which Scheduling algorithm is used in Linux?

Recently in an interview I was asked about the Scheduling algorithm used by Linux Operating system. What is the algorithm used any why? Also, what algorithm is used in in real-time operating systems ...
0
votes
1answer
666 views

cron.hourly “exited with return code 1” no output to log file

I'm currently on Linux Ubuntu 14.04 (I think). So I previously had a cron.daily script which was working fine. I decided to use the same script but move it to cron.hourly and now it wont work. /etc/...
1
vote
0answers
163 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 *...
9
votes
4answers
7k views

Simple queuing system?

Given a commodity PC, we would like to use it to execute some tasks in the background round the clock. Basically, we would like to have commands like: add-task *insert command here* list-tasks ...
189
votes
3answers
475k views

How can get a list of all scheduled cron jobs on my machine?

My sysadmin has set up a bunch of cron jobs on my machine. I'd like to know exactly what is scheduled for what time. How can I get that list?
1
vote
1answer
85 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
69 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
215 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 ...
2
votes
1answer
90 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 ...
1
vote
0answers
23 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 ...
42
votes
3answers
134k views

How to shutdown Linux at a specific datetime from terminal?

It seems I can shutdown using sudo shutdown by specifying a time or minutes. Is there a way to specify datetime for shutdown?
9
votes
3answers
2k views

How to recover deleted crontab

I was trying to edit crontab in the terminal, and I accidentally typed crontab -r instead of crontab -e. Who would figure such dangerous command would sit right next to the letter to edit the crontab? ...
3
votes
0answers
314 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 ...
1
vote
3answers
372 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 ...
4
votes
3answers
9k views

Conditional crontab command in bash script

How do I invoke a crontab command so that I can schedule to run a script with a 20 minute delay based on some condition? Edit: What if I wanted a command that schedules a script to be executed only ...
0
votes
1answer
53 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
29 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 ...
4
votes
2answers
1k views

Enable BFQ in Fedora

I am running Fedora with the stock kernel and I'd like to enable the BFQ disk I/O scheduler, and ideally BFS. I have built my own kernel and that works, though it is a royal pain dealing with the ...
0
votes
1answer
58 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
348 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
123 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
14 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 ...
3
votes
1answer
588 views

How does fcron know whether the job was run?

I recently migrated from vixie-cron to fcron, on my laptop. How does fcron knows if a particular job was run in given period of time? As a file can change during running, what constitute a different ...
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 (...
0
votes
1answer
460 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 ...
2
votes
1answer
564 views

Schedule a Job to run once a day in maestro scheduler

I wanted to run Job on a maestro scheduler automatically every business day whenever the file is a available on a specific file share. The job needs to run once only on a given day as soon as it sees ...
166
votes
9answers
362k views

Where are cron errors logged?

If I setup cron jobs incorrectly they appear to silently fail. Where should I look for an error log to understand what went wrong?
0
votes
2answers
445 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
73 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 ...