# Understanding User and Kernel Mode

**URL:** <https://discourse.codinghorror.com/t/understanding-user-and-kernel-mode/405>\
**Category:** blog\
**Created:** [January 3, 2008, 12:00am UTC](https://discourse.codinghorror.com/t/understanding-user-and-kernel-mode/405 "2008-01-03T00:00:00Z")\
**Posts on this page:** 1\
**Showing post:** 56

<div class="post-metadata">

**Author:** ![f0dder](https://discourse.codinghorror.com/letter_avatar_proxy/v2/letter/f/b4bc9f/32.png) [@f0dder](https://discourse.codinghorror.com/u/f0dder)\
**Post date:** [January 5, 2008, 12:00am UTC](https://discourse.codinghorror.com/t/understanding-user-and-kernel-mode/405/56 "2008-01-05T00:00:00Z")

</div>

Kernel mode time could be because of memory allocation? Or some serializing instruction? Hard to tell without digging into it with a debugger. I should pick up on dotNET stuff.

Please don’t run amok and think exceptions are superbad and should be avoided just because of this, the trick is to use them for _exceptional_ conditions, and not to _abuse_ them for general control flow manipulation (and obviously not for tight loops ;)).

If exceptions are used _as they ought to be_, imho the speed hit could be even worse, and it would still be insignificant.

---

_[View the full topic](https://discourse.codinghorror.com/t/understanding-user-and-kernel-mode/405)._
