SIGVTALRM
Encyclopedia
On POSIX
POSIX
POSIX , an acronym for "Portable Operating System Interface", is a family of standards specified by the IEEE for maintaining compatibility between operating systems...

-compliant platforms, SIGVTALRM is the signal
Signal (computing)
A signal is a limited form of inter-process communication used in Unix, Unix-like, and other POSIX-compliant operating systems. Essentially it is an asynchronous notification sent to a process in order to notify it of an event that occurred. When a signal is sent to a process, the operating system...

 sent to a process
Process (computing)
In computing, a process is an instance of a computer program that is being executed. It contains the program code and its current activity. Depending on the operating system , a process may be made up of multiple threads of execution that execute instructions concurrently.A computer program is a...

 when a time limit has elapsed. In source code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...

, SIGVTALRM is a symbolic constant
C preprocessor
The C preprocessor is the preprocessor for the C and C++ computer programming languages. The preprocessor handles directives for source file inclusion , macro definitions , and conditional inclusion ....

 defined in the header file
Header file
Some programming languages use header files. These files allow programmers to separate certain elements of a program's source code into reusable files. Header files commonly contain forward declarations of classes, subroutines, variables, and other identifiers...

 signal.h
Signal.h
signal.h is a header file defined in the C Standard Library to specify how a program handles signals while it executes. A signal can report some exceptional behavior within the program , or a signal can report some asynchronous event outside the program .A signal can be generated...

. Symbolic signal names are used because signal numbers can vary across platforms.

Etymology

SIG is a common prefix for signal names. VTALRM is an abbreviation for virtual alarm.

Usage

SIGVTALRM is sent when a timer expires, like SIGPROF
SIGPROF
On POSIX-compliant platforms, SIGPROF is the signal sent to a process when the profiling timer expires. The symbolic constant for SIGPROF is defined in the header file signal.h. Symbolic signal names are used because signal numbers can vary across platforms....

 and the more popular SIGALRM
SIGALRM
On POSIX-compliant platforms, SIGALRM is the signal sent to a process when a time limit has elapsed. The symbolic constant for SIGALRM is defined in the signal.h header file. Symbolic signal names are used because signal numbers can vary across platforms....

. The distinction of SIGVTALRM is that its timer counts only time spent executing the process itself; SIGPROF measures time spent by the process and by the system executing on behalf of the process, while SIGALRM measures real time. It is suggested that SIGPROF be used with SIGVTALRM to profile the time spent by the process in user space
User space
A conventional computer operating system usually segregates virtual memory into kernel space and user space. Kernel space is strictly reserved for running the kernel, kernel extensions, and most device drivers...

 and kernel space.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK