0
rated 0 times
[
0]
[
0]
/ answers: 1 / hits: 1084
/ 2 Years ago, thu, november 25, 2021, 12:06:12
I want to know how linux kernel used in Ubuntu manages concurrent access to shared data?
More From » sync
I want to know how linux kernel used in Ubuntu manages concurrent access to shared data?
Before version 2.6, Linux was a nonpreemptive kernel. Now, it is fully preemptive, so a task can be preempted when it is running in the kernel.
The Linux kernel provides spinlocks and semaphores for locking in the kernel. On SMP machines the fundamental locking mechanism is a spinlock, and the kernel is designed so that the spinlock is held only for short durations.
This is not appropriate for single-processor machines. In single-processor machines, the kernel disables kernel preemption; and rather than releasing the spinlock, it eneables kernel preemption.