Operating System - Dual Mode Flashcards
User Mode
User program executes in user mode
Certain areas of memory are protected from user access
Certain instructions may not be executed
Kernel Mode
Monitor executes in Kernel mode
Privileged instructions may be executed
Protected areas of memory may be accessed
System Call - Kernel Mode
When we make use of a system call we go into the Kernel Mode
The actual execution of a system calls occurs on the kernel side.
What is a System call
A mechanism for programs to request services or resources
i.e file operation, memory management, process control from the operating system’s kernel
Kernel mode bit
0
User mode bit
1
Privileged/ Kernel Mode instructions
Instructions which can only be executed in the Kernel mode
Why do we need dual mode?
- Stops user program attempting to execute an illegal instruction or to access the memory of other uses
What happens if a user program attempts to execute an illegal instruction or attempts to access the memory of other users
- OS must terminate the program
- OS gives error message
- Produces memory dump file