Skip to main content.
Navigation:
DENX
>
Training2
>
LddConcurrencyAndRaceConditions
Translations:
Edit
|
Attach
|
Raw
|
Ref-By
|
Printable
|
More
Training2
Sections of this site:
DENX Home
|
DULG
|
ELDK-5
|
Know
|
Training
|
U-Boot
|
U-Bootdoc
Topics
Training2 Home
Changes
Index
Search
Go
List of pages in Training2
Search
%SECTION0{name=LddConcurrencyAndRaceConditions}% Concurrency and Race Conditions *Terms* * _Concurrency (dt.: Nebenläufigkeit):_ two or more threads run at the same time and interact * _race condition (dt.: Wettlaufsituation):_ inconsistent results due to uncontrolled access to shared data * _deadlock (dt.: Blockierung):_ two or more processes are indefinetly waiting for each other to free access to a resource * _critical path (dt.: kritischer Weg):_ codesegment which accesses a shared resource * _mutual exclusion (dt. wechselseitiger Ausschluss):_ techniques used to protect critical paths against race conditions *Concurrency in the Linux kernel* * in old non-preemptive kernels (before 2.5): * interrupts * 2.5 and newer: * kernel preemption * SMP (other CPU) * interrupts * delayed code execution (workqueues, tasklets, timers) *=> we need to protect our critical paths!* *Advice:* * lock-free possible? * ordering: always obtain multiple locks in the same order (avoids deadlocks) * start with coarse locking and refine * document which functions need to be called with which locks held
5.7.3. The ioctl system call
1. Denx Training Topics
5.7.4.1. Atomic operations
Prev
Home
Next