Stack Exchange Network

Stack Exchange network consists of 174 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.

0
votes
1answer
22 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
59 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
37 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
3 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 ...
-2
votes
0answers
16 views

Anacron job scheduling

Using anacron I am trying to make weekly backup. So, I have modified the /etc/anacrontab in the following way # These replace cron's entries 1 5 cron.daily run-parts --report /etc/cron.daily 7 ...
0
votes
1answer
34 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
0answers
13 views

Can I reschedule a process to real time scheduling?

I'm running some stuff in a python script. At one point there's a few lines of code where I need the timing to be exactly the same every time. The time isn't important - just consistency. ...
0
votes
0answers
15 views

How can I add parameters to the Linux Kernel scheduler? [migrated]

I am learning to work wiht Linux kernel. Currently I am using 4.15.0-36-generic. I understood that the schedulers after the kernel 2.6 use a completely fair scheduler. I also came to know that, the ...
0
votes
2answers
70 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.
0
votes
0answers
23 views

How to prevent realtime applications from being interrupted

I have a realtime application whose performance is being affected by the rest of the system. How can I stop that? My application looks like this: #include <sys/timerfd.h> int main() { ...
0
votes
0answers
29 views

How to force all processes with a known name D, started from a given process K have equal CPU ticks scheduled?

Say we have a process K that in itself starts docker images D. We want to make sure that CPU ticks are provided to each and every one from that pool of processes D in a round-robin, or fair meaning ...
-2
votes
2answers
46 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
140 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
28 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
32 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
0answers
80 views

Difference between macro and micro scheduler

What is the difference between macroscheduler and microscheduler? Are they the same of long-term and short-term scheduler, respectively? I'm looking for a definition of the two scheduler in a generic ...
0
votes
1answer
155 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
20 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
153 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
125 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
194 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
58 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
168 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
49 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
137 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 ...
0
votes
1answer
62 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
162 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
19 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
36 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 ...
1
vote
1answer
825 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
28 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
131 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
166 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
49 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
986 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
207 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
0answers
36 views

Why is my scheduling policy is 0 (SCHED_NORMAL) but priority is 20 as well?

I have a device which is running linux 2.6.36. There is no file, "sched", in /proc/pid. So I use /proc/pid/stat to see what priority is being used. The "stat" shows (as below) that my priority is 20 ...
0
votes
1answer
359 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. ...
0
votes
0answers
101 views

How to iterate tasks in a cgroup, one cpu at a time, holding runqueue's lock?

I want to achieve 3 goals. Iterate tasks through a task_group Aquire rq those tasks attached to. Group those tasks by rq, then lock the rq before iterating tasks (the reason for this: I want cfs_rq ...
1
vote
1answer
23 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
1k 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
50 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?...
0
votes
1answer
240 views

Enable CONFIG_PREEMPT_RT_FULL after the kernel compilation

I have Linux with a kernel that was compiled with the real-time patch, but the config option CONFIG_PREEMPT_RT_FULL was not enabled (it says in /proc/config that it is not set). Do you now if there ...
1
vote
0answers
35 views

Difference between se->cfs_rq->tg and task_of(se)->sched_task_group

Are they different by definition? What are their advantages?
0
votes
0answers
24 views

sched_entity struc

I am wondering if the following is correct: Having a Linux kernel 4.1 (the version cannot be changed) with group scheduling disabled is it always so that a user space thread has behind a task_struct ...
0
votes
0answers
33 views

gstack not scheduled

I have a big, long running task on a SLES 12 server. I just tried using gstack on it, but the gstack processes don't seem to be getting any CPU - nothing on the screen after over 20 minutes. The ...
0
votes
2answers
108 views

How to schedule a job as non-root user in CoreOS

I have a script on my CoreOS machine which look like below, that I am using to ssh to multiple nodes from a list and get required details host_det=$(ssh -Ao StrictHostKeyChecking=no -o BatchMode=yes -...
2
votes
0answers
29 views

May a process be assigned to another CPU before terminated?

I'm trying to monitor the action of CPU, and I've found something interesting. First I have a script named task.sh as below: #!/bin/sh for i in {1..999}; do sleep 2 echo $$ Then I execute ....
1
vote
1answer
218 views

Why is Linux allowed to become unresponsive? [closed]

This question Why can a system become unresponsive? comes close. The answer kind of explains what is likely happening, but I just don't understand why this problem hasn't been solved since at least ...