Questions tagged [preemption]
131 questions
2
votes
1 answer
Non preemptive Earliest deadline first scheduling
I am working on a task scheduler and I would like to use EDF scheduling. The task set I need to schedule contains only tasks with deadlines equal to their periods and the tasks must be scheduled periodically. The problem I have is that the tasks…

vicch
- 564
- 3
- 10
- 25
2
votes
2 answers
attach preempt_notifier to user process in linux
I am needing to identify whether a user process was ever preempted somehow, I understand we have hooks in preempt.h and sched.c which allow us to define preempt_notifiers which can in turn call sched_in and sched_out functions whenever a process is…

Mahesh M
- 21
- 2
1
vote
0 answers
Can you prevent a Kubernetes job from being preempted?
This page describes how to make a non-preempting priority class in Kubernetes:
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: high-priority-nonpreempting
value: 1000000
preemptionPolicy: Never
globalDefault:…

Gaëtan
- 779
- 1
- 8
- 26
1
vote
1 answer
How to monitor pod preemption event
I have a bunch of Rancher clusters I take care of and on some of them developers use PriorityClasses to ensure that some of the more important workloads get scheduled. The 3 PriorityClasses are in 3 digits range so they will not interfere with the…

Bart C
- 1,509
- 2
- 16
- 17
1
vote
1 answer
Task Preemption in FREE RTOS
Going through the manual for Free RTOS, I encountered a sentence where it mentions
It is important to note that the end of a time slice is not the only
place that the scheduler can select a new task to run; as will be
demonstrated throughout this…

G-aura-V
- 145
- 1
- 7
1
vote
0 answers
Why is multi threading not faster on single core?
This question is not a duplicate of any question related to why multithreading is not faster on single-core, read the rest to figure out what I actually want to know
As far as I know, multithreading is only faster on a CPU with multiple cores, since…

Mahan Lamee
- 322
- 3
- 12
1
vote
0 answers
how linux preempt in IRQ?
I don't understand how the preempt work on interrupt exit path.
the source code is under linux/v5.11.14/source/arch/arm/kernel/entry-armv.S
__irq_svc:
svc_entry
irq_handler
#ifdef CONFIG_PREEMPTION
ldr r8, [tsk, #TI_PREEMPT] @ get…

jason
- 36
- 3
1
vote
0 answers
disabling preemption while executing schedule() function
The scheduler entry in Linux starts with executing schedule() which then calls the __schedule() function. It is defined as :
asmlinkage __visible void __sched schedule(void)
{
struct task_struct *tsk = current;
sched_submit_work(tsk);
…

Lucifer Poltergeist
- 31
- 3
1
vote
1 answer
Confusion around spin_lock_irqsave: in what nested situation is interrupt state kept?
There are many Q&As about spinlocks, but it's still confusing to me. I think it's because the questions and answers assume different settings or not clearly explain the settings about if it's SMP or if it's preemptive kernel or not when they ask or…

Chan Kim
- 5,177
- 12
- 57
- 112
1
vote
2 answers
How to modify process preemption policies (like RR time-slices) in XV6?
Right now it seems that on every click tick, the running process is preempted and forced to yield the processor, I have thoroughly investigated the code-base and the only relevant part of the code to process preemption is below (in trap.c):
// Force…

mgh
- 377
- 2
- 4
- 14
1
vote
1 answer
Which Google Compute Engine Server is least likely to preempt my vms?
I'm running a large cluster process that requires hundreds of VMs, but my process is fault-tolerant so I can use preemptible VMs. However, it takes a few minutes of lost time after being preempted for the process to restart, so I'd like to choose…

Neal Barsch
- 2,810
- 2
- 13
- 39
1
vote
2 answers
is linux kernel preemptive or not?
Is the Linux kernel preemptive or not?
There is a big difference between Understanding the Linux Kernel 2nd edition and 3rd edition. In the 2nd it is written that the Linux kernel is not preemptive but in the 3rd in the same paragraph nothing is…

likeIT
- 297
- 5
- 10
1
vote
0 answers
why hrtick timer callback function do not called?
in kernel/sched/core.c, init_rq_hrtick(rq) is called by sched_init().
init_rq_hrtick(rq) initialize hrtick_timer and specifies the callback function to be called upon expiration.
01 static void init_rq_hrtick(struct rq *rq)
02 {
03 #ifdef…

doosolLee
- 43
- 7
1
vote
1 answer
Priority Preemptive Scheduling of infinite loop tasks
There is much of material available regarding priority preemptive scheduling on Google and Stackoverflow, but I am still having confusion regarding scheduling of infinite loop tasks in a priority preemptive scheduling kernel. Let's consider the…

Arshan
- 736
- 6
- 19
1
vote
2 answers
Linux CONFIG_PREEMPT_RT for a quad core ARM A53 (newbie doubts)
I would like to activate the PREEMPTion features of my Linux Kernel. To do that I should download the right patch matching the version of the kernel I am using and that I compiled (as explained here). The version of the kernel I have is the Linux…

Leos313
- 5,152
- 6
- 40
- 69