A more systematic approach is the second one: utilizing Symmetric Multi-Processor kernel, which was invented by Montavista. In the SMP kernel, critical regions are already coded and the kernel parts except the critical regions are fully preemptable for SMP. Montavista modifies spinlocks in the SMP kernel into preemtable locks, applying the SMP technology to preemption improvement in real-time processing.