What is the difference between kernel mode and user programming?

I would like to know how the kernel programmer thinks about memory programming and user mode. I would also like to know a few differences between kernel programming and user-mode programming.

+5
source share
3 answers

User mode programming refers to programming under the mechanisms of protection, monitoring, and abstraction of the kernel of the operating system. for example: in user mode, you cannot write disk sectors, since they are "hidden" in the file system APIs. You cannot write to physical memory addresses because the kernel controls the translation between virtual and physical memory, although you can reserve memory for your needs. In addition, although you can go at a low level (assembly), you cannot follow instructions that are privileged, for example, trying to get confused with the processor caches, TBL, and MMU.

- . , , , /, ..

, " " KM. KM, , , usermode. , usermode .

. KM/UM - DOS, ( , 8086/88 - DOS Extenders).

+6

.

+2

The ideal answer is chosen as the answer. In a nutshell, according to my limited knowledge, in kernel mode, you read / write bytes to the physical addresses of a device, such as a VGA card. However, in user mode, you write a file, that is, if the operating system on UNIX is similar.

-2
source

All Articles