Posts

Showing posts with the label Operating System Modes

Operating System Modes - What, Differences, Necessity, Switch

Every Operating system supports two modes of operation for it to work properly. User Mode Kernel Mode X86 Hardware provide four protection rings for these modes. Ring 0 is used for Kernel mode, Ring 3 is used for User mode Differences Kernel Mode User Mode Can Access any memory location, hardware resources No direct access to memory and hardware resources Crash will halt the system Crash will stop the program that has bug, system will continue Reserved for lowest-level functions such as memory allocation, file system handling, process handling etc Most programs such as text editor, media player, browser etc Necessity of two modes: User program can wipe out the OS by overwriting with user data If something crashes will halts the whole computer How do we change from one Mode to other User Mode to Kernel Mode Using system call such as open, fopen etc, whic...