Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. User Mode vs Kernel Mode

User Mode vs Kernel Mode

Scheduled Pinned Locked Moved C / C++ / MFC
questionvisual-studio
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    msr_codeproject
    wrote on last edited by
    #1

    Hi Guys, I want to know the difference between User Mode and Kernel Modes (Drivers). Can't we create Kernel Mode drivers with latest operating systems? And what is the risk involved in using Kernel Mode Drivers? Regards msr

    Y L 2 Replies Last reply
    0
    • M msr_codeproject

      Hi Guys, I want to know the difference between User Mode and Kernel Modes (Drivers). Can't we create Kernel Mode drivers with latest operating systems? And what is the risk involved in using Kernel Mode Drivers? Regards msr

      Y Offline
      Y Offline
      yu jian
      wrote on last edited by
      #2

      In the kernel Mode, all the program can run, it runs on the ring0 and can visit all the I/O port. In the user Mode. only a part of program can be run. It runs on the ring3. Some operations of the program will be fobidden.

      我爸是李刚

      S 1 Reply Last reply
      0
      • M msr_codeproject

        Hi Guys, I want to know the difference between User Mode and Kernel Modes (Drivers). Can't we create Kernel Mode drivers with latest operating systems? And what is the risk involved in using Kernel Mode Drivers? Regards msr

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        msr_codeproject wrote:

        Can't we create Kernel Mode drivers with latest operating systems?

        Yes, get a copy of the Windows Driver Developer Kit[^].

        msr_codeproject wrote:

        And what is the risk involved in using Kernel Mode Drivers?

        If your driver breaks the rules it breaks the system.

        Just say 'NO' to evaluated arguments for diadic functions! Ash

        1 Reply Last reply
        0
        • Y yu jian

          In the kernel Mode, all the program can run, it runs on the ring0 and can visit all the I/O port. In the user Mode. only a part of program can be run. It runs on the ring3. Some operations of the program will be fobidden.

          我爸是李刚

          S Offline
          S Offline
          Sauro Viti
          wrote on last edited by
          #4

          yu-jian wrote:

          In the kernel Mode, all the program can run, it runs on the ring0 and can visit all the I/O port.

          What does all the program can run mean? In kernel mode your code runs at ring 0, so you can use privileged instructions of the processor, but you have too much constraints. For example you can call only a subset of the system API depending on the IRQL your driver is running on.

          yu-jian wrote:

          In the user Mode. only a part of program can be run. It runs on the ring3. Some operations of the program will be fobidden.

          What does this sentence means? At ring 3 you cannot use privileged instructions of the processor: if you try to use them an exception is thrown. Said that there are no limits on which parts of your code could be executed or not.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups