linux - How does a process come to know that it has received a signal -
Please correct me if I am wrong. Here is my understanding about the signs:
As far as I know, there are 2 different things in signal generation and signal delivery. To generate a signal, process control of the OS process Set bit in bitarre made in block (PCB). Each bit corresponds to a particular signal, and when a bit is set, it means that the signal corresponding to the bit is pending.
Delivery: Before transferring a process back into user mode, the kernel always checks the pending signals for this process should be checked at the kernel location, because some signals are not ignored by any process That is - SIGSTOP and SIGKILL.
This means that the signal can only be delivered in one process when the kernel decides what to do, ie is it allocating the CPU? When a CPU is actually implemented, can any process get a hint? If so, how is it possible how the process knows that a signal is pending for it (because it is executed in user mode and can not reach PCB)
Say multi processor machine And therefore there is real equality that means many processes are implemented at the same time. The process is executing on P1 CPU 1 and the process is executing on P2 CPU2 and now P2 (adequate privilege) sends a signal to the P1 process whether this signal is currently distributed on P1 Or it will be distributed after the CPU is discarded for any reason for any reason and has been scheduled by the kernel again in a later time and then this signal P1 has been given to the process.
Please do not say that the question implementation is dependent. If you believe the correct answer implementation is defined, then I am looking for answers in Linux, FreeBSD or any * nix platform for which you have knowledge.
Regards
Post-text "itemprop =" text ">
answer implementation is dependent:). On Mac OS X (and FreeBSD), the signals are controlled asynchronously - the kernel receives a thread which is not blocking the signal, and the asynchronous system sets the trap flag on that thread. Next time when the kernel schedules the schedule, it handles the trap rather than continuing the normal continuity of the thread in the user-space (except for the process, ignoring the trap or making the signal-handler suitable in the user space. is). In
Solaris (I'm not sure how the findings in this context are discussed, but this is useful).
Posix.4 also defines real-time signals, but I have not worked with them.
Comments
Post a Comment