Chapter 26. Trap Handling

A trap, in SPARC terms, is something that causes an immediate branch to kernel code — an interruption of the normal stream of instructions. This interruption can be due to a user request (a system call) or some external event (a page fault, a disk interrupt, or a keystroke). In either case, the interrupt is processed by hardware and very low-level software, so understanding how traps work and how they are handled requires some understanding of the architecture of the system. The CPU hardware will identify the type of the trap and attempt to get to the right place to handle it; the kernel must set up some control registers to make sure the appropriate trap handling code can be reached.

Once the system has started up and ...

Get Panic! UNIX® System Crash Dump Analysis now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.