Prev | Current Page 1359 | Next

Christopher Negus

"Linux Bible, 2008 Edition: Boot up to Ubuntu, Fedora, KNOPPIX, Debian, openSUSE, and 11 Other Distributions"


The kernel runs in a protected CPU mode known variously as ring 0, kernel mode, or, more prosaically,
kernel space. User programs such as Web browsers, e-mail clients, graphics programs, and
games run outside of kernel mode in what is colloquially referred to as user space.
The distinction between kernel space and user space is important. The kernel has raw, uncontrolled
access to system resources such as the CPU, RAM, and attached peripherals. The kernel
mediates all access from user space programs to system resources, funneling it through the system
call, or syscall, interface. The syscall interface carefully checks the data passed in from user programs
before passing that data on to other parts of the kernel. As a result of this careful gatekeeping,
it is extremely rare for even the most poorly written user space program to crash the kernel.
The strict division between kernel and user space code is what contributes to Linux??™s reliability and
stability and why you hardly ever see the familiar Windows ???Blue Screen of Death??? on a Linux system
(except in a screensaver).
753
Programming Environments and Interfaces 28
In addition to the distinction between kernel and user mode code, the kernel and user programs
have their own distinct memory regions.


Pages:
1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371