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
1
vote
1answer
27 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
31 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
vote
1answer
47 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
28 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
71 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/...
12
votes
3answers
592 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
35 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
45 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
65 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
49 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
60 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:...
0
votes
1answer
18 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
30 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
153 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
23 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
147 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
22 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
34 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
458 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
105 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
87 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
93 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
12 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
68 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
26 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
59 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
41 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
20 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
26 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
6 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
33 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
34 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
36 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
105 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
28 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
33 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
381 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
0answers
27 views

What is the suggested I/O scheduler to improve disk performance on HDFS file-system

What is the recommended I/O scheduler for HDFS file-system we have hadoop cluster with datanodes machines and we want to know the right configuration for I/O scheduler I/O scheduling in Linux ...
0
votes
1answer
56 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 * * * ...
0
votes
0answers
31 views

“Time Blocks” with Cron

I don't know the technical name for this but I am looking for the following behaviour: Define a daily time block (e.g. 9am to 5pm) with an associated action If this time block is entered while the ...
0
votes
2answers
85 views

How to pass command line arguments to bash script when executing with at?

I have a bash script needs run at a specific time and found out at is pretty much does what I need to do. But the problem is I'm not sure how can I pass command line arguments to the bash script ...
0
votes
1answer
31 views

Can i access the environment variables set when a script is added to linux “at” command queue?

I wanted to know if I can access the custom env variables that are set while adding a script to the "at" command queue before it runs ? I understand that certain system env variables like: TERM, ...
1
vote
0answers
68 views

How does the SCHED_DEADLINE runtime overrun signal (SIGXCPU) work?

I'm implementing a rt-thread using SCHED_DEADLINE. I'm trying to catch a SIGXCPU-signal, if the thread exceeds the specified sched_runtime. To my understanding of the manpage, this can be achived by ...
2
votes
0answers
152 views

Is pulseaudio's default nice value (-11) actually ineffective due to autogroup?

The pulseaudio daemon runs with nice level -11 by default, via rtkit. However, I'm noticing choppy audio at times of high cpu load, and decreasing the nice value even further by setting high-priority ...
0
votes
0answers
208 views

systemd-run not setting priority correctly for CPUSchedulingPolicy=fifo

Background I have a programme that I want to benchmark, using scheduling policy SCHED_FIFO (see man 7 sched) on Linux. A process with policy SCHED_FIFO may have priorities between 1 and 99 inclusive, ...
2
votes
1answer
245 views

Schedule command to run at specific timestamp with systemd

I would like to schedule a command to be run at a specific time, identified by a Unix timestamp. It seems like this might be doable with systemd, using systemd-run, but how would that work? And what ...
1
vote
1answer
129 views

Linux scheduling overhead in orders of magnitude?

I read that Linux has an O(1) scheduler, but this does not tell me actually how long a context switch roughly takes. Does someone have some current numbers? I know it depends on a lot of factors ...
3
votes
2answers
1k views

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 ...
4
votes
1answer
911 views

What is the hardware which the linux kernel uses for timer interrupt

I am reading about jiffies which will be updated for every timer interrupt. The frequency of the timer interrupt is determined by compile time constant HZ. We have lot of hardware devices present on ...

1
2 3 4 5
7