Thread: User-mode and Kernel-mode

  1. #1
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361

    User-mode and Kernel-mode

    I've come across these terms a thousand times, yet i've been unable to find any detailed information on exactly what they are, and how they differ from each other. Such as, "critical sections are user-mode objects"
    So, what exactly is meant by "user mode" and "kernel mode"?

  2. #2
    Registered User
    Join Date
    Jan 2003
    Posts
    648
    These terms most likely come when you're developing operating systems. Computers have two modes: system and user mode. These are toggled (along with a bunch of other settings) using the control registers on the x86 (cr0 to cr7) and by executing several machine instructions. System mode basically allows full access to everything. User mode is restricted. For example, context switches (threading) is only allowed in system mode. Another: a windows program wants to send data to a driver using a WinAPI call. The API call switches to system mode (probably using a software interrupt), sends the data to the driver, and switches back to user mode. Other things done in system mode is I/O. The operating system can schedual its I/O with algorithms for speed/efficiency and for parralel tasking (cpu is working while data is being read/written, simultaneously). In user mode, all these complex things are transperant to you, they are left for the operating system.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. User mode and Kernel Mode
    By learner01 in forum Linux Programming
    Replies: 9
    Last Post: 08-10-2006, 08:20 PM
  2. User mode and Kernel mode
    By learner01 in forum C++ Programming
    Replies: 7
    Last Post: 08-09-2006, 02:38 PM
  3. Programming RIP2 with kernel routes table
    By jpablo in forum Linux Programming
    Replies: 1
    Last Post: 04-22-2006, 11:26 AM
  4. Entering Kernel Mode
    By Lionel in forum Windows Programming
    Replies: 1
    Last Post: 07-05-2005, 07:58 PM
  5. Kernel mode
    By /Muad'Dib\ in forum C++ Programming
    Replies: 2
    Last Post: 06-02-2004, 08:36 AM