People talk about user space vs. kernel space. Whats the advantage of each?
• (REG) User space is what all user (including root) programs run in. It is fully virtual memory (i.e. normally swappable). The X server is in user space, for example. So is your shell. Kernel space is the domain of the kernel (wow!), device drivers and hardware interrupt handlers. Kernel memory is non-swapable (i.e. it’s REAL RAM), and hence should be used sparingly. Also, operations performed in kernel space are not pre-emptive: this means other processes are prevented from running until the operation completes. Some people think that it’s better to implement stuff in kernel space (“so that everyone has it”). In general this is a Bad Idea ™ (see “creeping featurism” above), since kernel space resources are more “heavy” than user space resources. For example, coding a Mandelbrot fractal generator in kernel space is a *really stupid* idea.