Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the User/Supervisor bit in the page table entry mean?

I am trying to understand whether:

  1. the User/Supervisor bit is used to distinguish pages of kernel memory, from those of the user process
  2. the User/Supervisor bit changes when execution moves to the kernel while executing a system call
  3. Or perhaps none of them.

Can someone clarify?

like image 882
piggyback Avatar asked Oct 31 '22 04:10

piggyback


1 Answers

On an Intel virtual memory system, the user/supervisor bit set to 1 for a certain page means "this page is accessible by a process executed in user mode (in contrast to supervisor mode)", see here.
In which mode a process is executed is determined by the supervisor bit in the CPUs status register. A 1 in the supervisor bit means execution in supervisor mode, see here. The supervisor bit in the status register changes, when execution moves to the kernel.
So both of your assumptions are true, but they relate to 2 different bits.

like image 88
Reinhard Männer Avatar answered Nov 10 '22 15:11

Reinhard Männer