Contents
What does uninterruptible process mean in Linux?
An uninterruptible process is a process which happens to be in a system call (kernel function) that cannot be interrupted by a signal. To understand what that means, you need to understand the concept of an interruptible system call.
Is it possible to avoid an uninterruptible sleep?
As to your second question: you can’t avoid uninterruptible sleeps, they are a normal thing (it happens, for instance, every time a process reads/writes from/to the disk); however, they should last only a fraction of a second.
What does the uninterruptible flag mean in Linux?
TASK_UNINTERRUPTIBLE, the uninterruptible sleep. If a task is marked with this flag, it is not expecting to be woken up by anything other than whatever it is waiting for, either because it cannot easily be restarted, or because programs are expecting the system call to be atomic. This can also be used for sleeps known to be very short.
What happens when the process is sleeping in the system?
While the process is sleeping in the system call, it can receive a Unix asynchronous signal (say, SIGTERM), then the following happens: The system call exits prematurely, and is set up to return -EINTR to user space. The signal handler is executed.
How to learn the basics of interrupt programming?
Study the basics of interrupt programming: arm, enable, trigger, vector, priority, acknowledge. Use SysTick to create sounds and spin motors. Video 12.0.
What does it mean to enable or disable interrupts?
One arms a trigger if one is interested in interrupts from this source. Conversely, one disarms a trigger if one is not interested in interrupts from this source. To enable means to allow interrupts at this time. Conversely, to disable means to postpone interrupts until a later time.
How can I interrupt a process in Linux?
Frequently the most effective manner to do this without hitting the power switch is to pull the power cord. You can also become a kernel hacker and make the driver use TASK_KILLABLE, as explained in the LWN article. When a process is on user mode, it can be interrupted at any time (switching to kernel mode).