Click here to Skip to main content
15,909,325 members
Home / Discussions / Hardware & Devices
   

Hardware & Devices

 
GeneralRe: Kernal Mode VS User Mode Pin
JudyL_MD6-Feb-08 7:20
JudyL_MD6-Feb-08 7:20 
GeneralRe: Kernal Mode VS User Mode Pin
ForNow6-Feb-08 13:25
ForNow6-Feb-08 13:25 
GeneralRe: Kernal Mode VS User Mode Pin
JudyL_MD7-Feb-08 2:12
JudyL_MD7-Feb-08 2:12 
GeneralRe: Kernal Mode VS User Mode Pin
ForNow7-Feb-08 2:25
ForNow7-Feb-08 2:25 
GeneralRe: Kernal Mode VS User Mode Pin
fat_boy4-Feb-08 5:29
fat_boy4-Feb-08 5:29 
GeneralRe: Kernal Mode VS User Mode Pin
Dan Neely4-Feb-08 5:46
Dan Neely4-Feb-08 5:46 
GeneralRe: Kernal Mode VS User Mode Pin
fat_boy4-Feb-08 7:03
fat_boy4-Feb-08 7:03 
GeneralRe: Kernal Mode VS User Mode Pin
Mike Dimmick5-Feb-08 7:32
Mike Dimmick5-Feb-08 7:32 
It's instructive to compare modern Windows to DOS. In classic DOS, a program could write to any address in the system, potentially overwriting operating system data structures. It could also control any I/O device in the system. Very powerful, but also very dangerous as any program could crash the system or corrupt data. It also made sharing of I/O devices between programs pretty difficult.

This problem had been recognized previously in the mainframe and minicomputer worlds, and hardware had been added to add modes, typically called 'user mode' and 'supervisor mode', with certain instructions reserved for supervisor mode and the ability to protect regions of memory and I/O devices so that only code running in supervisor mode can read from or write to them. User mode - application code - can only then perform these tasks indirectly by requesting that the supervisor (or kernel) carry out the task for it. If it tries to perform such an operation, the CPU instead raises a fault (or exception) to the supervisor; the supervisor can then do whatever is required to fix the fault, or terminate the program.

The processor boots up in kernel mode, then when running a program it runs it in user mode. On x86 this is done by changing a couple of bits in one of the registers, but only supervisor mode code can change that. To get back into supervisor mode, you used to have to issue a software interrupt but in recent processors, the SYSENTER instruction was added. Hardware interrupts also put the processor into supervisor mode, with a return-from-interrupt instruction putting it back into user mode if the processor was running user-mode code when the interrupt occurred.

Generally operating systems try to keep as little code as possible in kernel mode, as the opportunity for this code to do damage is great. User-mode code should only be able to crash the process, not crash the whole system. Where the kernel only has responsibility for memory allocation and thread scheduling, with I/O performed by user-mode processes, this is typically called a microkernel. Windows Explorer and Internet Explorer are both user-mode processes.


DoEvents: Generating unexpected recursion since 1991

GeneralRe: Kernal Mode VS User Mode Pin
ForNow5-Feb-08 13:17
ForNow5-Feb-08 13:17 
GeneralRe: Kernal Mode VS User Mode Pin
Mike Dimmick5-Feb-08 13:53
Mike Dimmick5-Feb-08 13:53 
GeneralRe: Kernal Mode VS User Mode Pin
ForNow5-Feb-08 16:05
ForNow5-Feb-08 16:05 
GeneralRe: Kernal Mode VS User Mode Pin
Mike Dimmick6-Feb-08 0:39
Mike Dimmick6-Feb-08 0:39 
GeneralRe: Kernal Mode VS User Mode Pin
ForNow6-Feb-08 1:40
ForNow6-Feb-08 1:40 
GeneralExtending a network Pin
Malcolm Smart3-Feb-08 5:25
Malcolm Smart3-Feb-08 5:25 
GeneralRe: Extending a network Pin
Johpoke3-Feb-08 5:53
Johpoke3-Feb-08 5:53 
GeneralRe: Extending a network Pin
Sebastian Schneider4-Feb-08 2:54
Sebastian Schneider4-Feb-08 2:54 
QuestionHow to get the device instance id of a disk or volume? Pin
Hemant kulkarni31-Jan-08 5:56
Hemant kulkarni31-Jan-08 5:56 
AnswerRe: How to get the device instance id of a disk or volume? Pin
ruready5112-Feb-08 7:16
ruready5112-Feb-08 7:16 
Questionanyone has some information about step motor driver circuit. [modified] Pin
Adnan Merter23-Jan-08 11:48
Adnan Merter23-Jan-08 11:48 
GeneralRe: anyone has some information about step motor driver circuit. Pin
Paul Conrad23-Jan-08 12:50
professionalPaul Conrad23-Jan-08 12:50 
GeneralRe: anyone has some information about step motor driver circuit. Pin
Adnan Merter23-Jan-08 13:05
Adnan Merter23-Jan-08 13:05 
GeneralRe: anyone has some information about step motor driver circuit. Pin
User 171649223-Jan-08 13:26
professionalUser 171649223-Jan-08 13:26 
QuestionWhat does Quad Core Mean? Is That 4 Processors? Pin
Gandalf_TheWhite21-Jan-08 19:40
professionalGandalf_TheWhite21-Jan-08 19:40 
AnswerRe: What does Quad Core Mean? Is That 4 Processors? Pin
dighn22-Jan-08 10:56
dighn22-Jan-08 10:56 
AnswerRe: What does Quad Core Mean? Is That 4 Processors? Pin
Cmania23-Jan-08 0:52
Cmania23-Jan-08 0:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.