What are Unix signals?

本文介绍了Unix信号的基础概念,包括各种信号的作用及应用场景。探讨了如何通过信号与进程进行交互,例如重启配置文件或终止进程。此外,还详细列举了FreeBSD和Solaris系统中的信号名称、编号及其描述。

一个信号,是一个信息,可以发送到运行的过程。

Signals can be initiated by programs, users, or administrators.信号可启动程式,使用者或管理员。

For example, to the proper method of telling the Internet Daemon (inetd) to re-read its configuration file is to send it a SIGHUP signal.举例来说,以适当的方法告诉互联网守护进程 ( inetd的) ,以重看其配置文件,是发送一个sighup信号。

For example, if the current process ID (PID) of inetd is 4140, we would type:举例来说,如果当前的进程ID ( PID控制)的inetd的是4140年,我们会类型:

 kill -SIGHUP 4140 

Another common use of signals is to stop a running process.另一种普遍使用的信号是停止一个运行的过程。 To stop the inetd process completely, we would use this command:停止inetd的进程完全中,我们会用这个命令:

 kill 4140 

By default, the kill command sends the SIGTERM signal.默认情况下,杀死指挥移送sigterm信号。 If SIGTERM fails, we can escalate to using the SIGKILL signal to stop the process:如果sigterm失败的话,我们可以升级使用sigkill信号,以阻止过程:

 kill -9 4140 

Because SIGKILL cannot be handled, stopping a process with SIGKILL is generally considered a bad idea.因为sigkill不能处理,制止过程中与sigkill被普遍认为是一个坏主意。 Using SIGKILL prevents a process from cleaning up after itself and exiting gracefully.用sigkill阻止一个进程,从清理后,本身并退出缓慢下降。

Handling Signals信号处理

Each Unix signal has a default set of effects on a Unix program.每个Unix信号具有默认设置的效果上的Unix程序。 Programmers can code their applications to respond in customized ways to most signals.程序员可以码及其应用响应定制的方式,以最信号。 These custom pieces of code are called signal handlers .这些习俗件代码是所谓的信号处理

Two signals are unable to be redefined by a signal handler.两路信号无法重新定义,由一个信号处理器。 SIGKILL always stops a process and SIGSTOP always moves a process from the foreground to the background. sigkill总是站有一个过程, sigstop总是一个过程,从前台到后台。 These two signals cannot be "caught" by a signal handler.这两个信号不能被"捕获"的一个信号处理器。

FreeBSD Signals

Signal NameSignal NumberSignal Description
SIGHUP1Terminal line hangup
SIGINT2Interrupt program
SIGQUIT3Quit program
SIGILL4Illegal instruction
SIGTRAP5Trace trap
SIGABRT6Abort
SIGEMT7Emulate instruction executed
SIGFPE8Floating-point exception
SIGKILL9Kill program
SIGBUS10Bus error
SIGSEGV11Segmentation violation
SIGSYS12Bad argument to system call
SIGPIPE13Write on a pipe with no one to read it
SIGALRM14Real-time timer expired
SIGTERM15Software termination signal
SIGURG16Urgent condition on I/O channel
SIGSTOP17Stop signal not from terminal
SIGTSTP18Stop signal from terminal
SIGCONT19A stopped process is being continued
SIGCHLD20Notification to parent on child stop or exit
SIGTTIN21Read on terminal by background process
SIGTTOU22Write to terminal by background process
SIGIO23I/O possible on a descriptor
SIGXCPU24CPU time limit exceeded
SIGXFSZ25File-size limit exceeded
SIGVTALRM26Virtual timer expired
SIGPROF27Profiling timer expired
SIGWINCH28Window size changed
SIGINFO29Information request
SIGUSR130User-defined signal 1
SIGUSR231User-defined signal 2
SIGTHR32Thread interrupt

Solaris Signals

Signal NameSignal NumberSignal Description
SIGHUP1Hangs up
SIGINT2Interrupts
SIGQUIT3Quits
SIGILL4Illegal instruction
SIGTRAP5Trace trap
SIGABRT6Used by abort
SIGEMT7EMT instruction
SIGFPE8Floating-point exception
SIGKILL9Kill (cannot be caught or ignored)
SIGBUS10Bus error
SIGSEGV11Segmentation violation
SIGSYS12Bad argument to system call
SIGPIPE13Writes on a pipe with no one to read it
SIGALRM14Alarm clock
SIGTERM15Software termination
SIGUSR116User-defined signal 1
SIGUSR217User-defined signal 2
SIGCHLD18Child status change alias (POSIX)
SIGPWR19Power-fail restart
SIGWINCH20Window size change
SIGURG21Urgent socket condition
SIGPOLL /SIGIO22Pollable event occurred or Socket I/O possible
SIGSTOP23Stop (cannot be caught or ignored)
SIGTSTP24User stop requested from TTY
SIGCONT25Stopped process has been continued
SIGTTIN26Background TTY read attempted
SIGTTOU27Background TTY write attempted
SIGVTALRM28Virtual timer expired
SIGPROF29Profiling timer expired
SIGXCPU30Exceeded CPU limit
SIGXFSZ31Exceeded file size limit
SIGWAITING32Process' LWPs are blocked
SIGLWP33Special signal used by thread library
SIGFREEZE34Special signal used by CPR
SIGTHAW35Special signal used by CPR
SIGCANCEL36Thread cancellation signal used by libthread
SIGLOST37Resource lost
SIGRTMIN38Highest priority real-time signal
SIGRTMAX45Lowest priority real-time signal


<script type="text/javascript"></script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script>
基于数据驱动的 Koopman 算子的递归神经网络模型线性化,用于纳米定位系统的预测控制研究(Matlab代码实现)内容概要:本文围绕“基于数据驱动的Koopman算子的递归神经网络模型线性化”展开,旨在研究纳米定位系统的预测控制方法。通过结合数据驱动技术与Koopman算子理论,将非线性系统动态近似为高维线性系统,进而利用递归神经网络(RNN)建模并实现系统行为的精确预测。文中详细阐述了模型构建流程、线性化策略及在预测控制中的集成应用,并提供了完整的Matlab代码实现,便于科研人员复现实验、优化算法并拓展至其他精密控制系统。该方法有效提升了纳米级定位系统的控制精度与动态响应性能。; 适合人群:具备自动控制、机器学习或信号处理背景,熟悉Matlab编程,从事精密仪器控制、智能制造或先进控制算法研究的研究生、科研人员及工程技术人员。; 使用场景及目标:①实现非线性动态系统的数据驱动线性化建模;②提升纳米定位平台的轨迹跟踪与预测控制性能;③为高精度控制系统提供可复现的Koopman-RNN融合解决方案; 阅读建议:建议结合Matlab代码逐段理解算法实现细节,重点关注Koopman观测矩阵构造、RNN训练流程与模型预测控制器(MPC)的集成方式,鼓励在实际硬件平台上验证并调整参数以适应具体应用场景。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值