i am reading about page faults in demand paging. page faults happen when 1) the memory being is accessed is illegal 2)the page is valid but not present in main memory
i read that with valid-invalid bit you can tell if the memory is not in logical address space,because the corresponding bit will be marked invalid.
the same valid-invalid bit is used to identify the above 2 condition.
my question how does the os know if the memory being accessed is illegal or if the page is valid but not in main memory with just one valid-invalid bit? thank you!