What is difference between User pages and Supervisor pages in Paging

287 Views Asked by At

I understand how to differentiate if the page is user page or supervisory page using the bit, but what is the difference between these pages and how is it related to the user mode or supervisory mode ?

1

There are 1 best solutions below

0
On

Typically an OS has trusted code (e.g. the kernel) which might be called "supervisor code" and "potentially malicious, less trusted" code (e.g. normal processes) which might be called "user code".

Often paging is used to protect trusted code and its data from the "potentially malicious, less trusted" code by allowing pages to be marked as "supervisor only", so that if "potentially malicious, less trusted" code attempts to access something that was marked as "supervisor only" it causes the access to be denied and triggers exception ("page fault") instead.

In other words, the "supervisor" bit (in page table entries, etc) determines if user code can access the contents of the page.