7.4. Traps and Protection Violations

Another important category of CPU bottleneck is caused by traps. Traps are software interrupts that are caused by:

  • Page faults

  • Page protection violations

  • Floating point emulation

  • Integer and floating point overflow and underflow

Traps are costly in CPU utilization because whatever is executing is interrupted. A trap requires a switch to kernel mode, a save of state, and processing time to determine the cause of the trap and then take the appropriate action. A trap may also cause a context switch if the action causes an I/O such as a page-in, or if a higher priority process is ready to run.

Protection violations occur when a process attempts to access a page of memory for which the protection ID is not loaded ...

Get HP-UX 11i Tuning and Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.