Multitasking: Cov Txheej Txheej Txheej Txheej Txhaum thiab Kev Ntsuas Kev Tsim Nyog

Raws li ib qhov kev khiav hauj lwm multitasking, Linux txhawb qhov kev ua tiav ntawm ntau tus txheej txheem-qhov tseem ceeb, cov kev pab cuam los yog cov lus txib los yog cov hauj lwm zoo sib xws-tom qab thaum koj tseem ua hauj lwm hauv cov kev xav paub ntxiv.

Foreground Sijhawm

Tus txheej txheem foreground yog txhua yam hais kom ua los yog hauj lwm uas koj khiav ncaj qha thiab tos kom tiav. Qee qhov foreground qhia tau hais tias qee yam ntawm cov neeg siv kev sib tham uas txhawb cov neeg siv kev sib txuas lus, uas yog lwm tus neeg ua hauj lwm thiab "khov" lub computer thaum nws ua tiav qhov haujlwm.

Los ntawm lub plhaub, ib qho txheej txheem foreground pib los ntawm kev sau ib lo lus txib ntawm qhov kom sai. Piv txwv, kom pom cov lus yooj yim ntawm cov ntaub ntawv hauv cov directory hauv qab, sau:

$ ls

Koj yuav pom cov npe ntawm cov ntaub ntawv. Thaum uas lub koos pij tawj tau npaj thiab luam tawm qhov sau, koj tsis tuaj yeem ua lwm yam los ntawm kev hais kom ua tam sim ntawd.

Kev Soj Ntsuam Tom Qab

Tsis zoo li cov txheej txheem foreground, lub plhaub tsis tas yuav tos rau qhov txheej txheem keeb kwm yav dhau los ua ntej nws tuaj yeem khiav tau ntau txoj hau kev. Nyob rau hauv cov kev txwv ntawm cov cim xeeb muaj, koj tuaj yeem nkag mus ntau cov lus txib tom qab ib zaug. Kom khiav lus txib raws li txheej txheem keeb kwm yav dhau, sau cov lus txib thiab ntxiv ib qhov chaw thiab muaj kev cuam tshuam rau qhov kawg ntawm qhov kev hais kom ua. Piv txwv li:

$ command1 &

Thaum koj muab ib lo lus txib nrog tus txiav txim siab ampersand, lub plhaub yuav ua txoj haujlwm, tabsis tsis txhob ua rau koj tos qhov kev hais kom ua tiav, koj yuav rov mus rau lub plhaub, thiab koj mam li pom lub plhaub tam sim ntawd (% rau C Plhaub, thiab $ rau Bourne Plhaub thiab Korn Plhaub) rov qab tuaj. Txij ntawm no mus, koj tuaj yeem nkag mus rau lwm qhov kev hais kom ua rau txheej txheem foreground lossis background. Cov hauj lwm yav dhau los yog khiav ntawm qhov tseem ceeb tshaj plaws rau cov hauj lwm puav pheej.

Koj yuav pom ib cov lus ntawm qhov kev tshuaj ntsuam thaum lub txheej txheem tom qab tiav lawm.

Hloov Ntawm Cov Txheej Txheem

Yog tias txheej txheem foreground yog siv sij hawm ntau dhau lawm, nres nws los ntawm nias CTRL + Z. Ib txoj hauj lwm tsis ua hauj lwm tseem tab sis nws txoj kev tiav yog kev ncua. Rov qab pib txoj hauj lwm, tab sis nyob hauv keeb kwm yav dhau, hom bg xa cov hauj lwm uas tsis ua hauj lwm tom qab tiav.

Yog xav rov qab pib qhov kev ncua hauv kev ua haujlwm, hom fg thiab qhov txheej txheem yuav siv sij hawm dhau los ntawm kev sib koom tes.

Pom ib daim ntawv teev cov txheej txheem txwv tsis pub ua haujlwm, siv cov haujlwm ua haujlwm, los yog siv cov lus txib saum toj kawg nkaus los qhia cov npe ntawm CPU-intensive cov kev pab kom koj thiaj li tsis tuaj yeem losyog nres lawv kom muaj kev pab cuam dawb.

Plhaub thiab GUI

Multitasking ua haujlwm txawv nyob ntawm seb koj nyob nraum ua haujlwm ntawm lub plhaub lossis graphical user interface . Linux los ntawm lub plhaub txhawb zog ib qho kev ua haujlwm kev khiav haujlwm hauv ib qhov kev sib tw virtual. Txawm li cas los xij, los ntawm cov tswv yim siv ntawm tus neeg siv, lub paj zoo ib puag ncig (piv txwv li, Linux nrog lub desktop, tsis yog los ntawm lub plhaub ntawv raws li ntawv) txhawb ntau lub qhov rais uas muaj txiaj ntsim zoo ua ntau yam kev sib luag ntawm kev ua haujlwm. Hauv kev xyaum, Linux tom qab lub scenes adjusts qhov muaj feem xyuam ntawm cov txheej txheem hauv ib daim ntawv qhia GUI los txhawb kev ruaj ntseg system thiab txhawb cov neeg siv ua tiav.