3

When a page fault occurs the MMU raises and exception (interrupt). The OS stops the current processes and addresses this raised interrupt.

1) Does this mean that (for 68K architecture where there are 7 interrupt lines with 7th being un-maskable) the interrupt generated by the MMU is at level 7?

2) Also, what if there a really important process going on (that does not require the virtual addressed word's data) when the interrupt is raised? What does the OS do?

rrazd
  • 1,741
  • 2
  • 32
  • 47
  • As for the second question, what you mean by such important process? The interrupt (PF) is followed by page swapping by the OS if the memory was swapped out, otherwise it's usually a bug and therefore it's natural to rather kill the process than let him do any more harm (the behaviour may be undefined). Or you mean important = realtime? If the process cannot afford being interrupted by page faults, it should mark the necessary pages as unswappable and then no PF can occur at all (otherwise than due to a bug). – Radim Vansa Jul 01 '11 at 18:26

1 Answers1

3

An exception is not necessarily an interrupt. Interrupts are exceptions, but there are exceptions which are not interrupts.

  1. The page fault exception is an exception, but not an interrupt.

  2. Non-interrupt exceptions are handled always. The page fault exception is a synchronous exception, when it occurs it's because the current code raised it, so the OS should handle it in the appropriate way (which may include panicking because there has been a page fault in a section of code where it was not expected).

ninjalj
  • 42,493
  • 9
  • 106
  • 148