Kill raise alarm pause abort sleep functions
Answers
Answer:
Explanation:
Signals are software interrupts. They provide a way of handling asynchronous events. Most nontrivial application programs need to deal with signals.
POSIX reliable signals
Signals have been provided since the early versions of the UNIX System, but the signal model provided with systems such as Version 7 was not reliable. Signals could get lost, and it was difficult for a process to turn off selected signals when executing critical regions of code. Both 4.3BSD and SVR3 made changes to the signal model, adding what are called reliable signals. But the changes made by Berkeley and AT&T were incompatible. Fortunately, POSIX.1 standardized the reliable-signal routines, and that is what we describe here.
This chapter starts with an overview of signals and a description of what each signal is normally used for, then discusses problems with earlier implementations, since it is often important to understand what is wrong with an implementation before seeing how to do things correctly. This chapter contains numerous examples that are not entirely correct and a discussion of the defects.
Signal Concepts
Every signal has a name. They all begin with the three characters SIG. For example:
SIGABRT is the abort signal that is generated when a process calls the abort function.
SIGALRM is the alarm signal that is generated when the timer set by the alarm function goes off.
FreeBSD 8.0 supports 32 different signals. Mac OS X 10.6.8 and Linux 3.2.0 each support 31 different signals, whereas Solaris 10 supports 40 different signals. FreeBSD, Linux, and Solaris, support additional application-defined signals introduced to support real-time applications.
Signal names are all defined by positive integer constants (the signal number) in the header <signal.h>.
Implementations actually define the individual signals in a different header file, but this header file is included by <signal.h>.
It bad for the kernel to include header files meant for user-level applications, so if the applications and the kernel both need the same definitions, the information is placed in a kernel header file that is then included by the user-level header file.
<sys/signal.h>: FreeBSD 8.0 and Mac OS X 10.6.8
<bits/signum.h>: Linux 3.2.0
<sys/iso/signal_iso.h>: Solaris 10
No signal has a signal number of 0. The kill function uses the signal number of 0 for a special case. POSIX.1 calls this value the null signal.
Numerous conditions can generate a signal:
The terminal-generated signals occur when users press certain terminal keys. Pressing the DELETE key or Control-C on the terminal normally causes the interrupt signal (SIGINT) to be generated.
Hardware exceptions generate signals. For example, divide by 0 and invalid memory reference. These conditions are usually detected by the hardware, and the kernel is notified. The kernel then generates the appropriate signal for the process that was running at the time the condition occurred. For example, SIGSEGV is generated for a process that executes an invalid memory reference.
The kill(2) function allows a process to send any signal to another process or process group, with limitations: we have to be the owner of the process that we’re sending the signal to, or we have to be the superuser.
The kill(1) command allows us to send signals to other processes. This program is just an interface to the kill function. This command is often used to terminate a runaway background process.
Software conditions can generate signals when a process should be notified of various events. For example:
SIGURG: generated when out-of-band data arrives over a network connection),
SIGPIPE: generated when a process writes to a pipe that has no reader)
SIGALRM: generated when an alarm clock set by the process expires).
Answer:
Girish alarm pause about sleep function in mobile
because when we sleep the alarms sometime raise to pause sometime about to sleep function say have to raise alarm pose about sleep function to keep alarming regularly......