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
0answers
8 views

Can I isolate/de-isolate CPU core dynamically in runtime without reboot?

Can I isolate and de-isolate CPU core dynamically in runtime without reboot(like isolcpus)? I want to change vCPU pinning of virtual machine, which is executing, using virsh vcpupin --live command, ...
1
vote
0answers
40 views

Is it possible to make a program that goes into continuous Uninterruptible Sleep and is non-killable?

According to my knowledge processes in Uninterruptible Sleep cannot be killed. So I thought - Is it possible to make a program that goes into that state and stays in it without going through other ...
1
vote
0answers
27 views

Does the Linux Genreic Block Layer prefer Read requests over Write Requests?

Does the Generic Block Layer in the Linux kernel, prioritize read requests over write requests ? That is without taking the I/O scheduler into account.
0
votes
1answer
33 views

How to tune the linux Scheduler for parallel computation?

I have a linux machine dedicated to running some parallel computation, and I'm trying to understand how to choose / tune the scheduler, and perhaps other parameters, to extract the most performance (...
0
votes
0answers
14 views

How to terminate a process scheduled with SCHED_DEADLINE if it meets its deadline?

I created a process scheduled with SCHED_DEADLINE mode as follow : attr.sched_policy = SCHED_DEADLINE; attr.sched_runtime = US_TO_NS(monitor_params.normal_wcet_us); attr.sched_period = US_TO_NS(...
1
vote
1answer
30 views

Full feature Linux scheduler

The scheduler cron processes outputs of programs only sending them via mails or writing them in files. So these outputs can't be assigned for example to a PHP variable (see this StackOverflow question)...
0
votes
1answer
33 views

systemd timer on boot but not too often

Would it be possible to create a timer that will run a service on a boot, but not more often than once a week? In my case it would be beneficial to run a TRIM (fstrim) for SSD disk on a boot, but once ...
1
vote
1answer
66 views

How to automate switching between light and dark modes?

I am a user of Linux Mint. One feature I often wish I had in Linux is the ability to switch between light and dark modes depending on the time of the day, as in macOS and mobile devices. I have put ...
2
votes
0answers
36 views

Placing the entire Xserver and GUI inside a cgroup/slice?

With the intent to guarantee a minimum amount of cpu cycles to keep the desktop environment smooth and snappy, Questions: Is it doable? Would this be a good idea? How would you go about doing this? ...
1
vote
1answer
51 views

Does uninterruptible tasks consume CPU time?

Assumption My assumption is what I myself consider fact based on my understanding: Tasks in either TASK_INTERRUPTIBLE and TASK_UNINTERRUPTIBLE state are not "runnable". As such, they are ...
0
votes
2answers
70 views

How to set cron job correct path to run a node.js script?

I'm trying to automate a Node.js file to run on schedule. But I can't get it to work. I'm using root user. This is the path to get to the file location from login: nodejs_projects/amazon_search_v2 ...
1
vote
1answer
50 views

Daily cron jobs active or inactive for periods of months

I'm trying to schedule a cron job and I'm failing soundly. I'm even starting to think that this can't be done with cron. I'm trying to set a job that will run at a certain hour every day for six ...
0
votes
0answers
13 views

Test case for Deadline IO Scheduler

I am trying to measure the impact of Deadline IO scheduler on the performance of Block IO. My setup includes: Kernel Version: 4.4.154 Storage device: eMMC 64GB Distribution: VERSION="18.04.4 LTS ...
1
vote
0answers
33 views

Can a mprotect() call lead to priority inheritance in Linux scheduling?

Is it possible, that a call of mprotect() in Linux can lead to priority inheritance? When analyzing an ftrace file, I see a call of mprotect() by Task 1 followed by a priority inheritance. Task 2 gets ...
-1
votes
1answer
57 views

How to get number of threads/tasks per core in Linux?

As you may know, in Linux, each CPU core has its own run queue. How can I get the number of threads currently running on each core in Linux (Ubuntu)?
1
vote
0answers
30 views

Limit processor time of individual processes

We have a shared system/cpu for many students at our university. Everyone can launch processes and there limits on how much processing power a user can take. This works rather well except for some ...
3
votes
1answer
104 views

Scheduling policy of a POSIX thread Vs kernel's Completely Fair Scheduler when the thread is actually executing

I have some doubts about setting the policy of a thread and how that policy is going to be followed while it is executing. Pthread allows setting the scheduling policy of a thread to SCHED_FIFO/...
13
votes
3answers
1k views

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

Cron Job for everyday except second Sunday and fourth sunday

What will be the cron job for scheduling a script for every day except second Sunday and fourth Sunday of the month. Thanks
1
vote
1answer
159 views

Run cronjob on specific day of the month, but earlier if that falls on a weekend

I have a cronjob that runs a script on the 20th day of the month at 6 AM: 0 6 20 * * /opt/example.sh This works as intended, but I'd like to adjust this, so the script is executed earlier, if the ...
-2
votes
1answer
131 views

Why is it not possible to use SJF (Shortest Job first) in Linux? [closed]

why it is not possible to use SJF as the scheduling algorithm for Linux?
1
vote
1answer
62 views

I am trying to make new linux process scheduler

I downloaded the source code of linux kernel 5.7.3. I already compiled it and installed it by the following commands: make make modules_install make install the kernel is added to grub2 and it is ...
-1
votes
2answers
179 views

What is meaning of “hrtimer” in the output of `ps -elf`?

As the subject, here is the related output: F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD 0 S john 124024 118530 0 80 0 - 4930 hrtime 05:09 pts/9 00:00:...
1
vote
1answer
62 views

Delay/offset crontab */x scheduling by a certain amount of time

I'm running a script every 4 days with 0 */96 * * * /path/to/script.sh However I want to offset this such that I can run a second script every 4 days, but spaced apart from the first script by 2 ...
1
vote
0answers
97 views

Systemd transient timer created with systemd-run is not shown in listed units

Some time ago, I created a systemd timer using the command: systemd-run --on-calendar='*-*-01 12:00:00' --description='Update root hints for unbound' --property='After=network.target' --timer-...
8
votes
3answers
198 views

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 ...
0
votes
0answers
25 views

Schedule system notifications with messages and print the list of all scheduled jobs with related messages

I am writing a bash script where I need to schedule notifications with specific messages. So I was planning to use: echo "notify-send -t 60000 \"$MESSAGE\"" | at "$1" for the purpose. The problem is ...
0
votes
1answer
813 views

How to start/stop a python script as a service at a specific time on CentOS?

I am trying to put a python script on a VPS running CentOS 7, that crawls some stock data online from a web service. What I want to do is to set this script as an OS service that start/stops at a ...
0
votes
0answers
36 views

How to limit jar file execution in shell script (need to stop process if running more than 5)

I am executing one jar file, now I have to set a limit of execution is 5 (Max 5 process of that jar execution permitted) if 6th is invoked via crontab it should be blocked. e.g.: abc.jar file is ...
0
votes
1answer
95 views

Kernel preemption

Do priority of the processes constitute to preemption when they are in Kernel mode?. Say there are two processes with priorities 3 and 5. It is quiet obvious that the priority 5 process can be ...
4
votes
3answers
477 views

iptables rule to unblock internet acess, and block it again 3600 seconds later

I do this, from my son's terminal, to sometimes give him internet access (disabled by default): ./unblockinternet.sh <enter password> with this script: su -c "iptables -D OUTPUT -m owner --...
1
vote
1answer
228 views

Linux Completely Fair Scheduler and sched_latency_ns

I thought I understood CFS but... The scheduled latency is the time that in which every runnable process can expect to get a share of the processor. In the Linux Kernel code it gives: (default: 6ms *...
1
vote
0answers
216 views

ps command output, WCHAN column '-' for all processes

ps axo ppid,pid,stat,wchan,cmd outputs - for the WCHAN column for all processes, including the ones in sleep, on Debian bullseye, did I do something wrong? BTW, wchan shows 'the kernel function in ...
0
votes
1answer
292 views

Schedule task with cygwin script

In fact I have installed cygwin on windows server 2016, and my scripts run perfectly inside bash terminal. Now I want to schedule my scripts to run per day using windows task scheduler. So I have ...
0
votes
0answers
14 views

How to Pre-empt User Level Threads?

I am learning Operating System concepts. So I am working on developing a library to support User Level Thread Creation and Scheduling. So far I can create thread( function pointer) and schedule ...
1
vote
2answers
87 views

How can I prevent repeated malloc from slowing down system to a halt before the program is killed with SIGKILL?

Obviously I don't typically run: #include <stdlib.h> int main() { while (malloc(50)); return 0; } But I have been attempting to compile large projects. When running cmake, my computer'...
0
votes
1answer
31 views

Problems with pthread scheduling and output

I am having some problems with outputing my threads in a right order. My program needs to take at least 2 parameters (could be more, but always 2 at a time because one is integer(how many second does ...
0
votes
0answers
153 views

audio dropouts on ubuntu with pulseaudio and bluetooth devices

I upgraded to ubuntu 18.04.4 with a lowlatency kernel from a ubuntu studio 16.04 installation recently. Linux uvstudio 5.3.0-40-lowlatency #32~18.04.1-Ubuntu SMP PREEMPT Mon Feb 3 14:53:06 UTC 2020 ...
0
votes
0answers
104 views

how to determine timeslice from nice values?

i am new to linux kernel and i read the robert love book to understand it. in chapter4(page 49 at the bottom) there is an example to show how nice values of 0 and 5 for two processes with a target ...
1
vote
0answers
24 views

Is there a Cache Scheduler?

I am trying to understand how Schedulers work in Linux. I am aware that there is an I/O scheduler and CPU scheduler in Linux. My question is how does Last Level Cache scheduling work? Is there any ...
0
votes
0answers
28 views

System becomes non interactive when multiple real time threads are run on limited number of CPUs

Linux arch 5.5.9-arch1-2 #1 SMP PREEMPT Thu, 12 Mar 2020 23:01:33 +0000 x86_64 GNU/Linux I have been experimenting with CPUs affinity and scheduling policies and there is one thing that has surprised ...
0
votes
0answers
7 views

schedule a one time task, to be performed at a specified time or right after boot if machine was down at that time

I wish to run a task at a certain time. at seems to be the tool of choice for that, but I want the guarantee that the task will be run regardless of any downtime. at persists across reboots, however ...
0
votes
0answers
45 views

renice and ionice processes that are hogging resources

I've noticed that Linux grids to a halt as soon as 1 application or 2 take up all the CPU or Disk IO resources. The best solution I've found so far is to renice the processes to idle, this is of ...
0
votes
1answer
40 views

Linux read() system call sampling rate, task scheduling & RT_PREEMPT

I am working with a Measurement Computing PCIe-DAS1602/16 DAQ: https://www.mccdaq.com/pci-data-acquisition/PCIe-DAS1602-16.aspx with Linux device drivers written by Warren Jasper: https://github....
0
votes
0answers
40 views

'at' command on Suse SLES 11 does nothing, works perfectly on other (RHEL) server

When our users want to schedule a job using the at command it doesn't work on our SLES 11 server. If they do the exact same on our Red Hat Enterprise Linux server it works perfectly. I've tested it ...
0
votes
1answer
171 views

I need to know how to calculate the initial virtual runtime of a process in completely fair scheduler

I am trying to implement a completely fair scheduler. I want to know how to calculate the initial value of virtual run time of a process in order to insert the process into a red black tree
1
vote
0answers
40 views

In which context the linux block device driver request runs?

Finally, the invocation of the request function is (usually) entirely asynchronous with respect to the actions of any user-space process. You cannot assume that the kernel is running in the ...
2
votes
0answers
34 views

Process Scheduling in CPU

Assume I have 2 CPU's C1 and C2. At the very base, every process executes on the CPU for a given time slice 't'. Using cgroups, assume I limit the process to ensure that it takes only 50% of cpu. Now, ...
4
votes
2answers
689 views

How interrupt is queued up in linux?

In hardware and software interrupt flow how queue up is handled? more precisely I have following doubts Lets take a scenario I have a machine with 2 CPUs. CPU1 is processing process P1 and CPU2 is ...
0
votes
1answer
70 views

Executing hourly / weekly task with crontab

I want to execute a task using cron once per week or once per hour, but not starting until a given time. If it was a daily task I would write simply this (after crontab -e). 00 07 * * * ...

1
2 3 4 5
8