Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

People talk about user space vs. kernel space. Whats the advantage of each?

advantage Kernel people talk user vs
0
10 Posted

People talk about user space vs. kernel space. Whats the advantage of each?

0

• (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.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123