3

Is there anyone that can tell me why, on a preemptive kernel, PAE would not work? This question is an exam question, however I haven't got a clue why it would not work.

Caleb
  • 69,278
  • 18
  • 196
  • 226
Lucas Kauffman
  • 1,243
  • 2
  • 12
  • 22

1 Answers1

4

The clue likely lies here, from O'Reilly's Understanding the Linux Kernel:

"Some real-time operating systems feature preemptive kernels, which means that a process running in Kernel Mode can be interrupted after any instruction, just as it can in User Mode. The Linux kernel is not preemptive, which means that a process can be preempted only while running in User Mode; nonpreemptive kernel design is much simpler, since most synchronization problems involving the kernel data structures are easily avoided (see the section "Nonpreemptability of Processes in Kernel Mode" in Chapter 11, Kernel Synchronization)."

I'm betting it's difficult to keep page tables in proper order when user processes can interrupt kernel processes.

LawrenceC
  • 10,884
  • 4
  • 33
  • 45
  • 1
    That's quite an old book, predating preemptivity in the Linux kernel by several years. – Gilles 'SO- stop being evil' Jun 20 '11 at 21:44
  • Can you elaborate on why it would be difficult to keep the page tables in the proper order because I don't see the link with physical address translation :p? – Lucas Kauffman Jun 21 '11 at 11:19
  • Wait is it more like this : preempting is in user mode, PAE is in kernel mode. If there is preempting how will the OS be able to keep all the page changes correctly ? And if it wants to do that, it will have to do A LOT of switching between kernel and user mode. Therefor it is not feasible to use PAE on a preemtive kernel ? – Lucas Kauffman Jun 21 '11 at 11:40