mutex - Atomicity guaranteed on "lock" methods in Linux? -
We know that the following kernel methods in Linux are allowed to apply different locking mechanisms on shared data. But, does Linux guarantee its atomicity in its own way? With the exception of general and reader-author spin lock methods, who can not sleep, will not it be tuberculosis if there is a thread of execution previously, whereas it has been partially executed in other ways described below?
Spin Lock Methods
spin_lock (); Spin_lock_irq (); Spin_lock_irqsave (); Spin_unlock (); Spin_unlock_irq (); Spin_unlock_irqrestore (); Spin_lock_init (); Spin_trylock (); Spin_is_locked ();
Reader-author spin lock methods
read_lock (); Read_lock_irq (); Read_lock_irqsave (); Read_unlock (); Read_unlock_irq (); Read_unlock_ irqrestore (); Write_lock (); Write_lock_irq (); Write_lock_irqsave (); Write_unlock (); Write_unlock_irq (); Write_unlock_irqrestore (); Write_trylock (); Rwlock_init ();
Semaphore methods
sema_init (); Init_MUTEX (); Init_MUTEX_LOCKED (); Down_interruptible (); bottom (); Down_trylock (); Up ();
Reader-author semaphore methods
init_rwsem (); Down_read (); Up_read (); Down_write (); Up_write (); Down_read_trylock (); Down_write_trylock (); Downgrade_write ();
Mute X methods
mutex_lock (); Mutex_unlock (); Mutex_trylock (); Mutex_is_locked ();
Convertible Convertible Methods
init_completion (); Wait_for_completion (); complete();
If these tasks were not atoms in relation to the lock, then they would not work at all . And the last time I saw, my Linux worked.
Most of these tasks actually disable promotions while doing their own content.
Comments
Post a Comment