Reputation: 621
I am currently learning about kernel mode and user mode, and looks like each tutorial is using different terminology, and I am not sure if they are talking about the same thing.
Do these terms mean the same thing?:
kernel mode - system mode - privileged mode - supervisor mode - secure mode - unrestricted mode
And do these terms mean the same thing?:
ordinary mode - user mode - restricted mode
Upvotes: 1
Views: 991
Reputation: 21607
Do these terms mean the same thing?: kernel mode - system mode - privileged mode - supervisor mode - secure mode - unrestricted mode
What you are describing is system specific. The number of processor modes and their names varies among processors.
Most processors have multiple privilege levels (or modes) in which they execute (4 is common). Certain instructions can only be executed in certain privilege levels and memory access can be restricted by privilege levels.
The names of those modes depends entirely on the system and they often use conflicting names.
A well-designed operating system will use all four modes for increased protections. Poorly designed operating systems typically only use two modes.
The VMS operating system is one that uses four privilege modes.
Som processors call Kernel mode Supervisor mode.
Thus, the question of whether those terms are synonyms depends entirely upon the processor and operating system.
Upvotes: 0
Reputation: 15229
They all mean more or less the same thing and may be used as synonyms in informal settings, but they do differ on certain levels. As it is the case with many words in the English language.
From Modern Operating Systems 4th Edition by Andrew S. Tanenbaum, p. 2-3:
Most computers have two modes of operations: kernel mode and user mode. The operating system, the most fundamental piece of software, runs in kernel mode (also called supervisor mode). In this mode, it has complete access to all hardware and can execute any instruction the machine is capable of executing. The rest of the software runs in user mode, in which only a subset of the machine instructions is available.
That's a general definition of the two groups of terms you enumerated. I'll go through the terms and I'll try to emphasize the quirks of each one.
Kernel mode is entered when the kernel is running. It is the exact opposite of user mode, which user programs run in.
System mode, privileged mode, and supervisor mode seem to be ARM terminology for different processor modes. For their exact meaning, you should read about them specifically. The quotation above outlines supervisor mode as a synonym of kernel mode too, but it also has a its own meaning in an ARM context. I think you may also casually refer to System Management Mode on x86 as "system mode," although that's imprecise. I've also seen "privileged mode" being used for anything higher than ring 3 in Protected Mode on x86.
Secure mode is apparently another type of ARM process modes. It's ARM-specific and I've never heard it in another context.
Unrestricted mode refers to a mode, where there are no restrictions; every instruction, all hardware is reachable (look at the quote). Restricted mode is the opposite.
Ordinary mode is foreign to me. Maybe an informal term for user mode.
As you see, it's pretty knotty. Different architectures use different terms, there is no general consensus, people use them differently and wrongly... it's a big hassle. Once you've read a number of books and papers about processor architectures and system programming, you'll get the hang of it, I figure, just a matter of experience.
Upvotes: 1