2

The Linux kernel is non-preemptive, but I just read that there could be context-switches in different control paths. Doesn't that contradict the non-preemptive nature on the Linux kernel?

EpsilonVector
  • 3,973
  • 7
  • 38
  • 62
  • 2
    http://www.informit.com/articles/article.aspx?p=101760&seqNum=3 It says that since 2.6 context switches are preemptive. – vava May 23 '10 at 13:02

2 Answers2

2

No, it does not contradict this, because the latest Linux kernels are pre-emptive.

WhirlWind
  • 13,974
  • 3
  • 42
  • 42
1

There were / are several different preemption models used by the Linux kernel, which included the old "non-preemptable" model - which means, in general, that kernel code cannot be preempted (I mean when not calling schedule(), sleep_on() etc)

There are also several other degrees of preemptability. Look at the kernel documentation for more information.

MarkR
  • 62,604
  • 14
  • 116
  • 151