







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An overview of loadable kernel modules in linux and solaris systems, including their components, management, registration, and conflict resolution. Additionally, it covers signals and asynchronous event notification, their apis, and how to generate, deliver, block, mask, and ignore signals.
Typology: Slides
1 / 13
This page cannot be seen from the preview
Don't miss anything!








Supports loading modules into memory and letting them talk to the rest of the kernel. Module loading is split into two separate sections:
Allows modules to tell the rest of the kernel that a new driver has become available. The kernel maintains dynamic tables of all known drivers, and provides a set of routines to allow drivers to be added to or removed from these tables at any time. Registration tables include the following items:
Early minimal IPC (no info) mechanism asynchronous event notification system software analog of hardware interrupts Three distinct APIs original (buggy, unreliable) signals slightly differing semantics between Sys V, BSD reliable (Posix) signals real-time (Posix) signals Things you can do with signals generate (send, raise): kill() deliver (receive, handle): during kernel to user transition block , mask : temporarily disable delivery (but not generation) ignore : throw away on delivery catch (handle): execute a user-supplied handler on delivery
Signals have names (macros) and numbers examples: SIGINT (2), SIGKILL (9), SIGPWR (30) kill – l lists platform assignments some are architecture and processor dependent SIGSTKFLT – coprocessor stack error (Intel) Signals can be generated by users via special shell character (control-c) via user-level commands (kill -9 1234) programs via system calls (kill(pid, sig)) the kernel (e.g. in response to exceptions)
Basic system calls generate : kill(), rt_sigqueueinfo() block, unblock : sigprocmask(), rt_sigprocmask() check pending : sigpending(), rt_sigpending() establish handler : sigaction(), signal(), rt_sigaction() wait for signal : sigsuspend(), rt_sigsuspend() Calls often operation on signal sets two element arrays of ints (64 bit bitmask) Blocking, pending, delivery blocked: delivery delayed until unblocked possible for signal to be blocked with no signal pending generated: pending for a short while even if unblocked unblocked pending signals: delivered on kernel to user transition delivery opportunities every timer interrupt (but only for current)
Masking signals current signal delivery masked during handler execution like interrupt masking handlers need not be re-entrant old, buggy semantics: current signal not masked Default actions all signals have a default action terminate dump – terminate and dump core ignore – throw away on delivery stop – control-z continue – possible to catch most signals establish user-specified handler SIGKILL, SIGSTOP can’t be caught, blocked, or ignored