scheduling

How many times has my process been preempted?

How many times has my process been preempted? I wrote a simple program with a thread which runs on a CPU core. It spins kind of aggressively, and it takes 100% of the CPU core. I can see that with top + 1. After N minutes, I would like to be able to know: How …

Total answers: 1

Cron Job vs. Scheduler: Understanding the Differences and Use Cases

Cron Job vs. Scheduler: Understanding the Differences and Use Cases What are the key differences between a Cron job and a scheduler, and in what use cases is using one of these tools more appropriate than using the other? Asked By: orchard || Source You have here a list of schedulers: https://en.m.wikipedia.org/wiki/List_of_job_scheduler_software Cron is one …

Total answers: 1

Run a scheduled command on open terminal

Run a scheduled command on open terminal A task/script scheduled with cron or at (AFAIK) can not run inside a specific terminal: it can only print the output (through redirection) of a task/script to a specific terminal. Instead, I would like to schedule a command which should run in an already open terminal, as if …

Total answers: 1

DPROBES (DTRACE_PROBE) for measuring high latency stuff under 1µsec

DPROBES (DTRACE_PROBE) for measuring high latency stuff under 1µsec Currently, I’m analyzing the performance of a high latency application but I’m not confident in my measurements at all. So far, I have used DPROBES for instrumentation and BCC/funclatency for measuring. Would someone be able to verify those numbers? Also, if someone knows of a better …

Total answers: 1

Load a process into RAM, but don't execute?

Load a process into RAM, but don't execute? Is there a way to load a process into RAM, but somehow tell the scheduler not to execute it? The aim being to have the system read the binary from disk, allocate the pages in RAM for the code, but not to immediately jump into the code …

Total answers: 1

When will an interval cron execute the first time? (Ex: */3 days)

When will an interval cron execute the first time? (Ex: */3 days) tl;dr: Does cron use the numerical value of an interval compared to the numerical value of the day to determine its time of execution or is it literally "every 3 days" at the prescribed time from creation? Question: If I add the following …

Total answers: 3

Should I attempt to 'balance' my threads or does linux do this?

Should I attempt to 'balance' my threads or does linux do this? A simple example. I’m running a process that serves http request using TCP sockets. It might A) calculate something which means CPU will be the bottleneck B) Send a large file which may cause the network to be the bottleneck or C) Complex …

Total answers: 3

Linux timer interrupt

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 changing the CONFIG_HZ setting, when building the kernel? Thanks in advance! Asked By: SimonC || Source The Linux timer interrupt handler …

Total answers: 2

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

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 Aug28 ? 00:07:42 /sbin/init root 2 0 0 Aug28 …

Total answers: 1

Does `at` run a command later if the computer is off at the specified time?

Does `at` run a command later if the computer is off at the specified time? I want to schedule jobs with at, but I’m not sure what happens if the computer is suspended at the specified time: Will the command be executed as soon as the computer wakes up again (like with anacron) or will …

Total answers: 1

How to recover deleted crontab

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? Moreover, I am still trying to figure out how does crontab -r not ask …

Total answers: 3

How to enable and use the BFQ scheduler?

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 I/O schedulers, I can’t seem to find the BFQ nor the Kyber I/O scheduler : cat /sys/class/block/sda/queue/scheduler > noop deadline [cfq] So …

Total answers: 3

How to select the mq-deadline scheduler?

How to select the mq-deadline scheduler? I’m trying to select the new mq-deadline io scheduler but it doesn’t seem available. $ cat /sys/block/sda/queue/scheduler noop [deadline] kernel: $ uname -a Linux pluto 4.11.6-zenbook #1 SMP Wed Jun 21 09:39:34 EDT 2017 x86_64 GNU/Linux dmesg: $ sudo dmesg|grep deadline [ 0.077863] TSC deadline timer enabled [ 1.383260] …

Total answers: 2

How does Linux kernel find out which process to wake up during interrupt handling?

How does Linux kernel find out which process to wake up during interrupt handling? I was reading the book Linux Kernel Development on Chapter Process Scheduling. On Page 61, section Waking Up, the first paragraph reads: Waking is handled via wake_up(), which wakes up all the tasks waiting on the given wait queue. It (Q1:what …

Total answers: 3

How to schedule shutdown every day?

How to schedule shutdown every day? We have a server that is used for Linux thin clients in a class. The server is started when required and I want to schedule it to power off at 22:00 every day to avoid power wasting. I thought of using crontab but, after reading this answer, I am …

Total answers: 1

Why does the 'user' and 'sys' time vary on multiple executions?

Why does the 'user' and 'sys' time vary on multiple executions? There is a nice question and answer explaining the relationships between ‘real’, ‘user’ and ‘sys’. It explains the reasons why ‘real’ can vary, and defines the ‘user’ and ‘sys’ as times the process actually spent running on the processor. Let’s now completely ignore ‘real’. …

Total answers: 1