1/52
Vocabulary flashcards covering key terms from the lecture notes on UNIX signals and process control.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Control flow
The sequence of instructions a CPU reads and executes from startup to shutdown.
Exceptional control flow
Mechanisms that allow a system to react to events, enabling exception processing.
Exception
An event that disrupts normal execution and requires handling.
Exception processing
The handling of an exception when control flow is diverted from its normal path.
Exception return
Optional mechanism to resume normal execution after an exception is handled.
Interrupt
A low‑level mechanism that interrupts CPU execution to handle hardware/software events.
Trap
A software-generated exception used to transfer control to the operating system.
Fault
An error condition that causes abnormal program behavior and requires handling.
Abort
An unrecoverable error leading to process termination.
Process context switch
High‑level OS/hardware mechanism to switch CPU context between processes.
Signals
Asynchronous notifications sent by the OS to a process to notify events, handled by a signal handler.
Nonlocal jumps (setjmp/longjmp)
C runtime facility to transfer control nonlocally between function calls.
UNIX signal definition
A signal is a special message sent through the OS to tell a process of a command or event.
Signal
A message delivered by the OS to a process to notify an event and trigger a handler.
Signal handler
Function executed when a signal is delivered.
SIGHUP
Hangup signal (POSIX).
SIGINT
Interrupt signal (ANSI).
SIGQUIT
Quit signal (POSIX).
SIGABRT
Abort signal (ANSI).
SIGFPE
Floating-point exception signal (ANSI).
SIGKILL
Kill signal (unblockable in POSIX).
SIGSEGV
Segmentation fault signal (ANSI).
SIGTERM
Termination signal (ANSI).
SIGSTKFLT
Stack fault signal.
SIGCHLD
Child status has changed signal (POSIX).
SIGCONT
Continue signal (POSIX).
SIGSYS
Bad system call signal (ANSI).
SIGILL
Illegal instruction signal (ANSI).
SIGTRAP
Trace trap signal (POSIX).
SIGIOT
IOT trap (4.2 BSD).
SIGBUS
BUS error signal (4.2 BSD).
SIGUSR1
User-defined signal 1 (POSIX).
SIGUSR2
User-defined signal 2 (POSIX).
SIGSTOP
Stop, unblockable signal (POSIX).
SIGCONT (again)
Continue signal (POSIX).
SIGSYS (again)
Bad system call signal (ANSI).
PID
Process ID; a unique identifier for a running process.
ps
Process status utility; lists PIDs and related process information.
kill
Program that sends signals to processes; defaults to SIGTERM if no signal is given.
killall
Program that sends signals to all instances of a named program.
raise
System call for a process to send a signal to itself.
User-defined signal handlers
Custom functions that handle specific signals instead of the default handler.
signal
Legacy API to set a signal handler.
sighandler_t
Type of a signal handler function pointer.
signal handler
The function invoked when a specified signal is delivered.
Function pointer
A pointer that can refer to a function, be passed as an argument, and be invoked.
sigaction
System call to specify signal handling with greater control than signal.
SA_NODEFER
Flag to prevent blocking of the signal while its handler runs.
SA_ONSTACK
Flag to use an alternate signal stack for the handler.
SA_RESETHAND
Flag to restore the default action after the handler is invoked.
struct sigaction
Data structure used by sigaction to define the handler and options.
Graceful shutdown
Proper shutdown with resource cleanup and synchronization to storage.
Signal vs. sigaction
sigaction provides more control (blocking, stacks, reset behavior) than the basic signal API.