[cs631apue] Question on user code and kernel code

Jan Schaumann jschauma at stevens.edu
Wed Sep 10 17:06:32 EDT 2014


"xxu15 at stevens.edu" <xxu15 at stevens.edu> wrote:

> How to defferentiate between user code and kernel code ?

In addition to the answers you already got, it's worth distinguishing
between "kernel code" (as the code that makes up the kernel) and other
code.  When writing kernel code, you are often limited to only using the
interfaces available in this layer (ie system calls).

> Is there a standard to defferentiate the boundry of the two ? Or just
> the Unix designers/engineers defined the boundry ?

The OS itself enforces this.  When you write an OS, you can make that
decision and define what code runs in ring zero and what code does not.

-Jan


More information about the cs631apue mailing list