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
1answer
538 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
32 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?...
0
votes
1answer
364 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
39 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
48 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
130 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
31 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
281 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 ...
1
vote
0answers
62 views

Automatic nice value?

I noticed that a process - here sort - has been scheduled with a higher nice value (2) - meaning lower priority. But what is the policy for deciding that? Also, it seems to be a rare event, as all ...
-1
votes
3answers
130 views

cron job is not doing anything

I am trying to run a cron job that runs every 10 minutes to kill the process sshd. so I did open /etc/crontab as a root and inserted the following line. */1 * * * * pkill sshd I ...
1
vote
0answers
2k views

Crontab in Mac is not working

I'm trying to automate a python job using crontab in mac. It's not running on the cron however it's working when run manually & have given full permission to the scripts. As a test, did a echo ...
2
votes
0answers
530 views

How does Linux CFS schedule processes vs threads fairly in 2018 4.9 kernels?

The Linux scheduler keeps evolving: How does the kernel schedule processes vs threads today? Do I need autogroups? The previous similiar stack overflow question is many years old and likely obsolete. ...
2
votes
1answer
42 views

How much kernel time is triggered by niced processes?

I've got some CPU usage alarms that are triggering when I don't want them to. I'm reading /proc/stat, and comparing the increase in user and system jiffies to the overall increase of jiffies. If the %...
1
vote
0answers
56 views

Power on a Linux machine at specific time [duplicate]

I have a Linux laptop and I want to set it up as an alarm clock (used to have it on my Mac years ago). The problem is if I shutdown my laptop the night before, the alarm will not work. Is there a ...
15
votes
3answers
1k views

What was the reason of the non-preemptivity of older Linux kernels?

Why did the first Linux developers choose to implement a non-preemptive kernel? Is it to save synchronization? As far as I know, Linux was developed in the early '90s, when PCs had a single processor....
19
votes
1answer
907 views

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 ...
1
vote
0answers
297 views

Linux / CFS: How do cgroupsv1 cpu.share / cgroupsv2 cpu.weight and nice process weights interact

I was wondering how cgroup cpu shares/weights (v1: cpu.shares or v2: cpu.weight) and the niceness value of a task do interact in Linux with the CFS (Completely Fair Scheduler). Both values have an ...
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? ...
1
vote
0answers
221 views

Does it make sense to combine chrt and nice?

I want a CPU-intensive process to have the lowest possible impact on other processes. I can use nice -19 for maximum niceness and chrt -i 0 to give the process a SCHED_IDLE priority. Which is more ...
0
votes
0answers
237 views

Comparing I/O schedulers

I intend to compare different three I/O schedulers: "noop", "cfq", and "deadline" and I plan to compare them for both random reads and writes. So far, the only meaningful cases that I have identified ...
1
vote
1answer
832 views

Could someone explain the sleep/wake dynamics in Linux?

I am studying the locking mechanisms in an OS and came across these POSIX functions: pthread_cond_wait(pthread_cond_t *c, pthread_mutex_t *m); pthread_cond_signal(pthread_cond_t *c); I fully ...
3
votes
1answer
990 views

Lower priority thread appears to block higher priority thread? [closed]

I have 2 threads, each set to a different real-time priority using SCHED_FIFO. Thread throttling has been disabled, so theoretically the highest priority thread should be able to use 100% of CPU ...
1
vote
1answer
1k views

Using taskset to set processor affinity

I have the following code in a bash script: echo "bash pid => $$"; echo "processor affinity before => $(taskset -p $$)" taskset -cp ${AN_INTEGER} $$ echo "processor affinity after => $(...
-2
votes
1answer
691 views

How to set Linux Scheduler to don’t stop a Linux process?

If I have a CPU with 4 Cores ( for example, a Intel I5 ) and a I need to keep a process running exclusively in one theses Cores without being interrupted by the Linux Scheduler, even for a few ...
2
votes
0answers
297 views

Hyper Threading and Process Priority

Are there any methods (linux kernel options, sysctl settings or configurable scheduler modules) that can cause a high priority process/thread to run on a physical processor core with the second (hyper ...
2
votes
1answer
567 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 ...
1
vote
1answer
1k views

Repeat a task with the “at” command everyday at 6PM

I want to repeat a task every day at 6PM. I know this command executes a task at the next 6PM: echo "ls -l" | at 18:00 I tried to RTFM but didn't find anything relevant to repeating said task. ...
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 ...
1
vote
2answers
6k views

How can I run two commands in succession from cron?

I have 2 commands that need to run every hour, so I put these in /etc/cron.hourly/hrcron file, in following format command1; command2 It should've worked in my opinion, but does anyone have any idea ...
4
votes
2answers
4k views

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 ...
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/...
5
votes
0answers
327 views

Limiting per process dirty bytes without slowing down the whole system

Given a busy system with a really fast block device (highend NVMe raid, 2 GB/s write, 4 GB/s read) mounted at /data and an a really slow device (USB HDD with spinning 8 TB disk, 50 MB/s write, 60 MB/s ...
2
votes
1answer
285 views

Preventing scheduler to use certain cores on FreeBSD

It appears to be possible to pin down a process to a particular core via the cpuset(1) utility. It is possible to tell the scheduler to avoid that particular core with all other processes (current and ...
0
votes
1answer
137 views

gnome-scheduler - 'command not found'

I have Lubuntu and I just switched my default terminal to gnome-terminal (I needed default login shell). I noticed that gnome-scheduler is no longer lauching anything. For example, if I have a task ...
2
votes
1answer
73 views

Is the coordination overhead between two processes significant?

I have 24 compute intensive processes, each process running in a single thread, each running about 2 hours. I'm on a 8 core CPU. Does it make a difference on the total run time, if I run all 24 ...
2
votes
1answer
110 views

Creating a timelapse with guvcview

Is there a way to create a timelapse video (or similar) with guvcview? I'm using an external (USB) camera and ordinary footage seems to very quickly fill a hard drive. Can I get it to record an ...
0
votes
1answer
422 views

Is it possible to monitor how a process is scheduled real-time with Linux?

I am trying to develop a multi-process system with RaspberryPi in which I want to monitor all major processes and how they are scheduled using Linux. That is, obtaining scheduler states, start time, ...
2
votes
1answer
349 views

Change Ubuntu 1604 IO scheduler on AWS?

I am using a VM from AWS, Ubuntu 1604. The tricky thing is that I am not able to change the block device's IO scheduler in this way: root@ip-10-0-96-236:/home/ubuntu# cat /sys/block/xvdb/queue/...
0
votes
1answer
261 views

SFTP creating new directory

I am doing SFTP to transfer files . But during the process , if the path doesn't exists , the sftp is creating a directory bydefault ? Can anyone please explain this to me
1
vote
1answer
573 views

Can SCHED_FIFO be preempted by SCHED_DEADLINE?

As stated in the man pages: A SCHED_FIFO thread runs until either it is blocked by an I/O request, it is preempted by a higher priority thread, or it calls sched_yield(2). From the same source: ...
2
votes
0answers
185 views

Running a process in a specified time window

Large computational tasks consume time and computational resources, therefore I am looking for a way to execute them in a specified time window using a shell script. I want to run the script batch.sh ...
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 ...
0
votes
1answer
1k views

Submitting non-interactive jobs over ssh [duplicate]

I have SSH remote access to a machine I'd like to use for long-running jobs. What I currently do is simply ssh user@remote command-to-run This has several drawbacks: I can't simply suspend my ...
2
votes
2answers
135 views

Only back up when connected to power and only within time window

I make daily backups using Deja Dup (the standard backup application of Ubuntu) on my laptop running Ubuntu 16.04. Creating a backup takes a lot of power which is why I only want a backup to be ...
1
vote
1answer
843 views

Cron job with a dynamic date

I've been looking around but haven't found a solution to my particular problem. I need to create a cron job to backup a file system on daily basis. But the application needs the current date/time to ...
1
vote
2answers
9k views

Running a script via cron at a random time, but a certain number of times per day [closed]

I want to be able to run my script, say, 2 or 3 times per day -- 24 hours -- but at a different time each time. What would you recommend a simple and reliable solution?
2
votes
1answer
420 views

Cron task executes every hour instead of every 3 hours

I have a cron task: $ crontab -l */180 * * * * /my_script.py For some reason, as I can see from /var/log/syslog, it executes every hour instead of every 3 hours. Why is that?
1
vote
3answers
1k views

How to schedule jobs on Arch Linux?

I want Transmission starts up everyday at 20:00 and start downloading the existent torrents.