12247 views|11 replies

1

Posts

0

Resources
The OP

The difference between kernel-mode drivers and user-mode drivers [Copy link]

RT, I have been writing WinCE drivers for a while, but I am ashamed that I still don't understand the difference between kernel-mode drivers and user-mode drivers. I would like to ask for your advice.
This post is from Embedded System

Latest reply

Yes, WinCE6 is divided into user mode and kernel mode. User mode: The driver is loaded in the udevice.exe process. udevice.exe is a user-mode process like ordinary applications. When an application wants to interact with peripherals, it needs to forward the request to the corresponding driver through the operating system kernel. Such a request may need to repeatedly enter and exit the kernel many times, and also need to switch between different processes. The advantage is that the stability of the operating system is improved, and the entire operating system will not crash due to defects in a certain device driver. The disadvantage is that the efficiency of completing requests is too low. Kernel mode: The driver no longer needs to switch between different processes to complete a request, nor does it need to repeatedly enter and exit the kernel. The advantage is that the efficiency of the driver in kernel mode to complete the request will be greatly improved. The disadvantage is that any error in the kernel may cause the entire operating system to crash. It is recommended to run the driver in user mode when it is just written, and then change it to kernel mode after the driver is stable.  Details Published on 2010-7-1 10:44

1

Posts

0

Resources
2
Help. ~! ! ! ! ! ! ! !
This post is from Embedded System

1

Posts

0

Resources
3
I am also ashamed. My biggest understanding is that the priority of kernel-mode drivers is higher than that of user-mode drivers. I learned from PB that the process address of kernel-mode is isolated from that of user-mode. Other things are too complicated. We can learn and improve together. I just read books before, but I didn’t really understand it deeply.
This post is from Embedded System

1

Posts

0

Resources
4
I don't understand it either. I wrote ordinary drivers and didn't call setkmode, but it doesn't seem to matter now. Isn't it said that the access range needs to be restricted in the registry? I didn't write it, and I haven't seen that driver write it like this.
This post is from Embedded System

1

Posts

0

Resources
5
Kernel-mode drivers have high permissions and can access all address spaces.
This post is from Embedded System

1

Posts

0

Resources
6
Just started learning
This post is from Embedded System

1

Posts

0

Resources
7
I recommend you to read two articles written by a great guy from the CE team. After reading them, you should understand kernel mode and user mode, as well as user mode drivers in CE6. CE6 Drivers: What you need to know http://blogs.msdn.com/b/ce_base/archive/2006/11/09/ce6-drivers_3a00_-what-you-need-to-know.aspx
This post is from Embedded System

1

Posts

0

Resources
8
mark
This post is from Embedded System

1

Posts

0

Resources
9
6.0 is the only difference
This post is from Embedded System

1

Posts

0

Resources
10
5.0 is not divided into such fine details, I am ashamed.
Quote the reply of huangqibin888: RT, I have been writing WinCE drivers for a while, but I am ashamed that I still don’t understand the difference between kernel-mode drivers and user-mode drivers. I am here to ask for your advice.
This post is from Embedded System

1

Posts

0

Resources
11
Learned
This post is from Embedded System

1

Posts

0

Resources
12
Yes, WinCE6 is divided into user mode and kernel mode. User mode: The driver is loaded in the udevice.exe process. udevice.exe is a user-mode process like ordinary applications. When an application wants to interact with peripherals, it needs to forward the request to the corresponding driver through the operating system kernel. Such a request may need to repeatedly enter and exit the kernel many times, and also need to switch between different processes. The advantage is that the stability of the operating system is improved, and the entire operating system will not crash due to defects in a certain device driver. The disadvantage is that the efficiency of completing requests is too low. Kernel mode: The driver no longer needs to switch between different processes to complete a request, nor does it need to repeatedly enter and exit the kernel. The advantage is that the efficiency of the driver in kernel mode to complete the request will be greatly improved. The disadvantage is that any error in the kernel may cause the entire operating system to crash. It is recommended to run the driver in user mode when it is just written, and then change it to kernel mode after the driver is stable.
This post is from Embedded System

Guess Your Favourite
Find a datasheet?

EEWorld Datasheet Technical Support

Related articles more>>

    EEWorld
    subscription
    account

    EEWorld
    service
    account

    Automotive
    development
    circle

    Robot
    development
    community

    Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
    快速回复 返回顶部 Return list