Re: Signal delivery

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

On Thu, Oct 16, 2008 at 3:50 AM, Daniel Baluta <daniel.baluta@xxxxxxxxx> wrote:
> Hello ,
>
> I want to understand how kernel handles  signals delivering between processes.
> Can you guide me through kernel code , or provide some basics ideas.

For basic idea, I could propose this kind of concept: think of it like
posting a message to destination (in this case...a task). After it is
posted to a target, rescheduling is called to make sure the target
process pick it up ASAP. of course there is no guarantee that process
will run right away since it's possible for example higher prio
runnable process is sitting in the run queue.

Let's assume the process is selected by scheduler and executed. Also
let's assume it's going from kernel space back to user space. Kernel
will notice there is "a message" sitting and determine what that is.
If it's SIGKILL or any other unmodifiable signal (no way to change the
handle), kernel handler will be engaged.

If kernel notice it needs to call user space handler, it will jump
into the related EIP in user space. At the same time, kernel will
modify the stack of the target process so that when it finished
executing the handler, sigreturn will be called so task will jump back
into the kernel path. And then it returns to normal flow, that is
going back to the path before the task entered kernel space.

I might missed something, so feel free to CMIIW people...

regards,

Mulyadi.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux