- SIGXCPU
Infobox Computing signal
description = CPU time limit exceeded (4.2BSD)
action = Abnormal termination of the processOnPOSIX -compliant platforms, SIGXCPU is a signal, which is delivered to and can be caught bycomputer program s when they have used up theCPU for a duration that exceeds a certain predetermined user-settable value.Citation
title = getrlimit, setrlimit - control maximum resource consumption,POSIX system call specification
publisher =The Open Group
url = http://www.opengroup.org/onlinepubs/009695399/functions/getrlimit.html
format = html
date = 2001-2004
accessdate = 2008-09-10] Citation
title = signal.h,POSIX header file specification
publisher =The Open Group
url = http://www.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html
format = html
date = 2001-2004
accessdate = 2008-09-10] In source code, SIGXCPU is a symbolic constant defined in theheader file
. Symbolic signal names are used because signal numbers can vary across platforms.signal.h Etymology
"SIG" is a common prefix for signal names. "XCPU" is an abbreviation for "exceeded CPU time".
Usage
SIGXCPU is sent when the total time spent by the processor executing the process's instructions exceeds the allowed value, as determined by the user through the
[http://www.opengroup.org/onlinepubs/009695399/functions/getrlimit.html setrlimit]
or[http://www.opengroup.org/onlinepubs/009695399/functions/fcntl.html fcntl]
system call s (which can be invoked directly or through ashell builtin command). This is not the same as total elapsed time, as some of the time since the process started will have been spent waiting on I/O and servicing other processes.By default, SIGXCPU will result in program termination. And the
POSIX standard further states that if this behavior is changed, namely, "if the process is catching or ignoring SIGXCPU, or all threads belonging to that process are blocking SIGXCPU, [then] the behavior is unspecified" by POSIX. Nevertheless, individual operating systems, likeLinux , usually define the act of catching or ignoring SIGXCPU as legitimate. Under this setting, the usage model of this signal is typically such that its arrival indicates to the receiving process that the process has reached a CPU consumption "soft limit", soon be followed by a system-wide "hard limit": When the latter is reached, the process will be delivered aSIGKILL signal that cannot be ignored or caught, and would therefore immediately terminate the process.Thus, the arrival of a SIGXCPU signal provides the receiving process a chance to quickly save any intermediate results and to exit gracefully, before it is terminated by the operating system for good. This kind of a mechanism is especially important in supercomputers, where parallel programs run for long periods of time and use up immense computational resources. And indeed, supercomputer resource managers, like the IBM
LoadLeveler , make explicit use of SIGXCPU exactly for this purpose.Citation
title = IBM LoadLeveler for AIX 5L, "Using and Administrating" (Version 3, Release 2)
publisher =IBM
url = http://www.sdsc.edu/us/resources/datastar/docs/ll_usg_and_admin_v3r2.pdf
format = pdf
date = 2003
page = 344
accessdate = 2008-09-10]Other uses are possible. For example, on some
operating system s, theBoehm garbage collector uses SIGXCPU andSIGPWR to synchronize cross-thread garbage collection.Fact|date=September 2008References
Wikimedia Foundation. 2010.