Below are the causes of concurrency in kernel code,
- Hardware Interrupts – the currently running thread will interrupt at any time (virtually) by asyncronous interrupts in the system.
- SMP (Symmetric multi-processor system) – "n" number of threads can run truly simultaneously on "n" number of CPU's on the same kernel code/data.
- A task in the kernel can be sleep-able, this enable to invokes the scheduler, which schedules another thread to execute.
- Kernel preemption is present – that means one thread can preempt another, from 2.6 kernel on wards,