Questions tagged [preemption]
131 questions
0
votes
2 answers
How linux handles when a function containing infinte loop is queued in the work queue?
I tried searching the net but couldn't find a perfect answer for this? What is the name of the procedure which is followed to avoid this situation where the other worker function will wait forever for this infinte loop to get over

Shashwat KN
- 23
- 4
0
votes
1 answer
why spin_lock should disable preempt? if not disable preempt what will happend?
For this situation: Process B will wait Process A release spin,so preemt OK ???
Process A:
-->spin lock --> do strict call --> before unlock time int
Time int ISR:
--> Process A time slice finished --> need schedule
…

rowan
- 1,293
- 1
- 8
- 6
0
votes
1 answer
Calling kmap_atomic() in process context
I have a kernel module. It has one IOCTL which allocates pages and then maps in to the kernel using kmap_atomic one page at a time.
When i run exercise this ioctl through a test app, i get the following scheduling BUG:
[41216.007065] BUG:…

Harshdeep Dhatt
- 76
- 1
0
votes
1 answer
Meaning of atomicity of POSIX pipe write
According to the POSIX standard, writes to a pipe are guaranteed to be atomic (if the data size is less than PIPE_BUF).
As far as I understand, this means that any thread trying to write to the pipe will never access the pipe in the middle of…

athos
- 1,281
- 3
- 14
- 24
0
votes
1 answer
Preemptive scheduling algorithm for autonomous vehicle
I'm not sure if this is the best place for this question, but I think the problem has some relations to optimal scheduling algorithms and queueing theory, so hopefully it will be okay.
I'm setting out to build an RC car to navigate courses…

Austin
- 6,921
- 12
- 73
- 138
0
votes
1 answer
In priority inversion, why can't the high priority process preempt the medium priority process?
Both the book "Operating System Principles" by Silberschatz/Galvin (9th Edition), as well as the article on Wikipedia on priority inversion say that in priority inversion, a high priority process can't use a resource held by a low priority process…

Meathead
- 493
- 2
- 6
- 15
0
votes
0 answers
non volatile memory in fpga
I am working on a project on hardware preemption in fpga.
I have two independent tasks. Initially, say, task 1 is running and task 2 is not.
Now when I preempt task 1, it should stop and its context should be stored in a memory unit and task 2…
0
votes
0 answers
Non-preemptive scheduling of periodic tasks
I try to decide schedulability of non-preemptive periodic tasks with same priorities. I have found a question on: Non preemptive Earliest deadline first scheduling, however the tasks were not periodic. The question is, whether periodic tasks may…

HaloPid
- 1
0
votes
1 answer
How to calculate average turnaround time in non-pre-emptive scheduling?
Process - Arrival Time - Burst Time
P1 - 0.0 - 7
P2 - 0.5 - 3
P3 - 1.0 - 2
Additional info: Schedule is non-pre-emptive.
Question: What is the average turnaround time (ATT)…

Rafael van den Berg
- 13
- 1
- 10
0
votes
1 answer
Query Regarding Non Preemptive thread
I was reading about non preemptive threads and I found a slide from Princeton University and it shows the following diagram: (Source Link: http://www.cs.princeton.edu/courses/archive/fall11/cos318/lectures/L5_ThreadsImplementation.pdf)
From what I…

user1692342
- 5,007
- 11
- 69
- 128
0
votes
1 answer
Linux - reasons for preemption
I want to update the kernel to do some more stuff when switching between tasks and for that i need to find the reason for each switch.
First, i can't find the function where schedule() is called when there is a higher priority task than the current…

juliarak
- 1
- 1
0
votes
1 answer
Is Kaveri a HSA-compliant processor?
I have looked at lots of HSA introductions and find that a HSA-compliant GPU should be preemptible and support context switch.
But the Wikipedia article "AMD Accelerated Processing Unit" says GPU compute context switch, GPU graphics preemption will…

user3337215
- 83
- 1
- 4
0
votes
1 answer
RTOS : Disabling the task preemption
I have one query related to RTOS. We are using Nucleus RTOS. But my query is Generic. Suppose if a task is executing and if it's preemption is disabled, then is the task becoming atomic in nature? What i am asking here is, once the preemption of a…

user2239053
- 11
- 1
- 4
0
votes
0 answers
how to make kernel threads preemptive?
I wrote a C code programme that creates many threads (pthreads) which do all the same thing. Each of these threads tries to acquire a common mutex (one binary semaphore shared among these threads). When the first thread manages to acquire the mutex,…

Discipulus
- 245
- 1
- 3
- 13
0
votes
0 answers
mount and loop0 preempting user processes for long time
I created some processes in user space and tried to visualize its working in kernelshark with the trace recorded using trace-cmd. But processes like the ones shown below are preempting my processes with real-time priority 98 as long as 4 seconds.…

sagittarius
- 33
- 1
- 1
- 6