Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 1082  / 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

 Answers
4

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.


[#35645] Thursday, November 25, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jectedrin

Total Points: 491
Total Questions: 105
Total Answers: 111

Location: Netherlands
Member since Mon, Jun 7, 2021
3 Years ago
;