Thaum twg siv mutex_lock_interruptible?

Cov txheej txheem:

Thaum twg siv mutex_lock_interruptible?
Thaum twg siv mutex_lock_interruptible?

Video: Thaum twg siv mutex_lock_interruptible?

Video: Thaum twg siv mutex_lock_interruptible?
Video: Plab Plab Ntswg..(Pluav Pluav Ntswg) Maiv Twm New Song 2023-2024 2024, Hlis ntuj nqeg
Anonim

Siv mutex_lock_interruptible muaj nuj nqi kom tso cai rau koj tus neeg tsav tsheb cuam tshuam los ntawm ib qho teeb meem. Qhov no txhais tau tias koj qhov kev hu xov tooj yuav tsum tau sau kom nws tuaj yeem rov pib dua. (Keem saib ERESTARTSYS.)

Kuv puas tuaj yeem kaw qhov spinlock hauv ib lub CPU thiab qhib nws dua lwm CPU?

Siv spinlocks ntawm ib leeg-ntxhais / ib leeg-CPU system ua rau feem ntau tsis muaj kev nkag siab, txij li ntev npaum li qhov kev xaiv tsa spinlock thaiv cov tub ntxhais CPU nkaus xwb, tsis muaj lwm cov xov tuaj yeem khiav thiab vim tsis muaj lwm cov xov tuaj yeem khiav, lub xauv yuav tsis xauv ib yam.

Kuv puas tuaj yeem hu Kmalloc Gfp_kernel thaum tuav lub xauv?

Koj tsis tuaj yeem, txawm li cas los xij, ua txhua yam uas yuav pw tsaug zog thaum tuav lub xauv. Piv txwv li, tsis txhob hu rau ib qho haujlwm uas kov cov neeg siv lub cim xeeb, kmalloc nrog tus chij GFP_KERNEL, ib qho haujlwm semaphore lossis ib qho ntawm lub sijhawm ua haujlwm thaum tuav lub spinlock. … Semaphores hauv Linux yog pw tsaug zog kaw.

Spinlock_t yog dab tsi?

int spin_trylock(spinlock_t lock) Xauv lub spinlock yog tias nws tseem tsis tau xauv. Yog tias tsis tuaj yeem tau txais lub xauv nws tawm nrog qhov yuam kev thiab tsis tig lub xauv. spin_lock_irq: spin_lock_irq(spinlock_t lock)

Kernel mutex yog dab tsi?

Nyob rau hauv Linux ntsiav, mutexes xa mus rau ib qho kev kaw qhov tseem ceeb uas tswj hwm kev sib koom ua ke ntawm lub cim xeeb sib koom, thiab tsis yog rau lub ntsiab lus dav dav hais txog 'kev sib cais' pom hauv academia los yog cov phau ntawv theoretical zoo sib xws.

Pom zoo: