Lub cim xeeb mapped file hauv OS yog dab tsi?
Lub cim xeeb mapped file hauv OS yog dab tsi?

Video: Lub cim xeeb mapped file hauv OS yog dab tsi?

Video: Lub cim xeeb mapped file hauv OS yog dab tsi?
Video: Web Development with Python! Embedding a Plotly Graph within a Website 2024, Kaum ib hlis
Anonim

A nco mapped file yog ib tug feature rau tag nrho cov niaj hnub kev khiav hauj lwm qhov system . Nws xav tau kev sib koom tes ntawm cov nco tus thawj tswj hwm thiab I/O subsystem. Qhov tseeb, koj tuaj yeem qhia qhov OS uas ib txhia ntaub ntawv yog lub khw rov qab rau ib feem ntawm cov txheej txheem nco . Yuav kom nkag siab qhov ntawd, peb yuav tsum nkag siab txog virtual nco.

Ib yam li ntawd ib tug yuav nug, dab tsi yog lub cim xeeb mapped cov ntaub ntawv thiab yuav siv li cas?

A nco - daim ntawv qhia muaj cov ntsiab lus ntawm a ntaub ntawv hauv virtual nco . Qhov no daim ntawv qhia nruab nrab a ntaub ntawv thiab nco qhov chaw enables ib daim ntawv thov, nrog rau ntau yam txheej txheem, hloov cov ntaub ntawv los ntawm kev nyeem ntawv thiab sau ncaj qha rau lub nco.

Kuj Paub, dab tsi yog lub cim xeeb mapped cov ntaub ntawv thiab dab tsi yog qhov zoo? Cov txiaj ntsig . Cov txiaj ntsig ntawm nco daim ntawv qhia a ntaub ntawv yog nce I / O kev ua tau zoo, tshwj xeeb tshaj yog thaum siv loj cov ntaub ntawv . Rau me me cov ntaub ntawv , nco - mapped cov ntaub ntawv tuaj yeem ua rau khib nyiab ntawm qhov chaw slack li nco maps yeej ib txwm ua raws li nplooj ntawv loj, uas feem ntau yog 4 KiB.

Ib yam li ntawd, koj txhais li cas los ntawm daim ntawv qhia cov ntaub ntawv rau hauv nco?

Mapping cov ntaub ntawv rau hauv Memory . Daim ntawv qhia yog tus txheej txheem ntawm daim ntawv qhia disk sectors ntawm a ua ntaub ntawv rau hauv lub virtual nco qhov chaw ntawm tus txheej txheem. Raws li koj nyeem cov ntaub ntawv los ntawm daim ntawv qhia pointer, cov nplooj ntawv kernel hauv cov ntaub ntawv tsim nyog thiab xa rov qab rau nws rau koj app.

Koj txhais li cas los ntawm kev qhia tsis qhia npe?

Anonymous daim ntawv qhia maps thaj tsam ntawm tus txheej txheem lub cim xeeb virtual tsis thim rov qab los ntawm ib qho ntaub ntawv. Cov ntsiab lus yog pib rau xoom. Nyob rau hauv no hwm ib daim ntawv qhia tsis qhia npe zoo ib yam li malloc, thiab yog siv hauv qee qhov malloc(3) kev siv rau qee qhov kev faib.

Pom zoo: