Lub luag haujlwm ntawm ntu tseem ceeb hauv cov txheej txheem synchronization yog dab tsi?
Lub luag haujlwm ntawm ntu tseem ceeb hauv cov txheej txheem synchronization yog dab tsi?

Video: Lub luag haujlwm ntawm ntu tseem ceeb hauv cov txheej txheem synchronization yog dab tsi?

Video: Lub luag haujlwm ntawm ntu tseem ceeb hauv cov txheej txheem synchronization yog dab tsi?
Video: Yog Li Ntawd Qhov No Yog Qhov uas tus Tswv Rov Qab Los Li Cas (Ntsiab Lus Tseem Ceeb) 2024, Hlis ntuj nqeg
Anonim

Ib txoj kev nrov heev rau txheej txheem synchronization yog qhov kev siv ntawm cov ntu tseem ceeb , uas yog ib ntu ntawm cov lej uas tuaj yeem nkag tau los ntawm tsuas yog ib lub teeb liab txheej txheem ntawm ib qho piv txwv hauv lub sijhawm. Cov ntu tseem ceeb yog ib feem ntawm code qhov twg txheej txheem kev sib koom cov ntaub ntawv yog tswj los ntawm kev siv semaphores.

Hauv qhov no, dab tsi yog qhov tseem ceeb ntawm cov txheej txheem?

A Nqe lus tseem ceeb yog ib feem ntawm qhov kev pab cuam uas nkag mus rau cov peev txheej sib koom. Tsuas yog thaum a txheej txheem yog nyob rau hauv nws Nqe lus tseem ceeb nws puas tuaj yeem nyob hauv txoj haujlwm los cuam tshuam lwm tus txheej txheem . Peb tuaj yeem zam kev haiv neeg los ntawm kev ua kom tsis muaj ob txheej txheem nkag lawv Nqe lus tseem ceeb tib lub sijhawm.

Ib sab saum toj no, peb qhov yuav tsum tau ua yog dab tsi ntawm kev daws teeb meem rau nqe lus tseem ceeb? Ib qho kev daws teeb meem rau qhov teeb meem tseem ceeb yuav tsum txaus siab peb txoj cai : Mutual Exclusion: Yog hais tias ib tug txheej txheem yog executing nyob rau hauv nws ntu tseem ceeb , ces tsis muaj lwm cov txheej txheem raug tso cai rau ua nyob rau hauv lub ntu tseem ceeb.

Tsis tas li ntawd, qhov teeb meem tseem ceeb yog dab tsi nws siv li cas?

Qhov teeb meem tseem ceeb A Nqe lus tseem ceeb yog ib txoj cai ntu uas nkag mus rau qhov sib koom sib txawv thiab yuav tsum tau ua raws li kev ua atomic. Nws txhais tau hais tias nyob rau hauv ib pab pawg ntawm kev koom tes txheej txheem, ntawm ib lub sij hawm, tsuas yog ib tug txheej txheem yuav tsum tau ua nws. ntu tseem ceeb.

Dab tsi yog ntu tseem ceeb thiab kev sib cais tawm?

Hauv computer science, kev cais tawm yog ib qho cuab yeej ntawm kev tswj hwm kev sib raug zoo, uas yog tsim los rau lub hom phiaj ntawm kev tiv thaiv haiv neeg; nws yog qhov yuav tsum tau hais tias ib tug xov ntawm kev tua yeej tsis nkag mus rau nws ntu tseem ceeb nyob rau tib lub sij hawm uas lwm concurrent thread of execution nkag mus rau nws tus kheej ntu tseem ceeb.

Pom zoo: