2023年上海大学操作系统实验报告合集

2023年上海大学操作系统实验报告合集

ID:83406789

大小:5.72 MB

页数:71页

时间:2023-07-02

上传者:灯火阑珊2019
2023年上海大学操作系统实验报告合集_第1页
2023年上海大学操作系统实验报告合集_第2页
2023年上海大学操作系统实验报告合集_第3页
2023年上海大学操作系统实验报告合集_第4页
2023年上海大学操作系统实验报告合集_第5页
2023年上海大学操作系统实验报告合集_第6页
2023年上海大学操作系统实验报告合集_第7页
2023年上海大学操作系统实验报告合集_第8页
2023年上海大学操作系统实验报告合集_第9页
2023年上海大学操作系统实验报告合集_第10页
资源描述:

《2023年上海大学操作系统实验报告合集》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

ᑖ________________ᜧSHANGHAIUNIVERSITY▾ᢈ14122602!"

1#$%⚪Ḅ14122602᛻MierosoftVisuaIStudioḄ&'ᨬ)⌕Ḅᭆ-.%/&012'᪶4Ḅ)⌕ᑁ6஺89:;<=ᙢᵨI@ABCDᑏF0G%HIᩎḄ&01K஺01LMNO⌱QᡈSTU஺V᝞,IᩎYZLF[ᐜᦪL^஺89M_`ab&01Fᔜd01LḄᳮf஺ᑁ61ஹU%HᨵnH&TḄ&01K஺iH&ᵫ%H&kᑴᙽ(PCB)⊤p஺&kᑴᙽqrsᒹuvwxy:&ஹ&[ᐜᦪஹ&◤⌕|⃩Ḅ~ஹᓰᵨCPUḄ~&Ḅ᝱^,Mᢥ01LḄᑤ஺2ஹ01Ksᒹu23dḄ01L/|⃩~MNO⌱%d/ᑭbᔜdLḄᑖ᪆஺3ஹsᡈᡭᓺᔜ&᝱FᦪḄᓄ/b&Ḅ01஺1ஹ8KM⌱ᵨ[ᐜᦪLᡈIᩎYZLaH&&T01஺iH&ᜐᙠ|⃩R(run)ஹ£¤W(wait)F¥¦F(finish)§d᝱.%/¨ᎷUª«᝱¬'£¤᝱W஺®bf¯,K&Ḅ|⃩~~ᱏᓫ²஺&kᑴᙽ³᪀᝞v&kᑴᙽ³᪀᝞v:

2PCB&᪗¹ᦪºᢣ┐[ᐜᦪ/YZ~ᱏᦪᓰᵨCPU~ᱏᦪ&ᡠ◤~ᱏᦪ&᝱&kᑴᙽº³᪀᝞v:ᐸÁRUN%ÄÅ|⃩&ᢣ┐ÆHEAD%&£¤ºº✌ᢣ┐ÆTAID%&£¤ººÎᢣ┐஺2ஹL᪾Ñ(1)[ᐜᦪL஺&£¤ºᢥ[ᐜᦪᜧÔÕ@ᑮ×᣸ᑡ,º✌&%Ú☢ᢗᐭ|⃩஺i%H~ᱏ/|⃩&ᡠ◤|⃩Ḅ~ᱏᦪÞ1,ßàáâ|⃩®%H~ᱏ/[ᐜᦪãÞ3,ᳮᵫ'å&Ꮇ᝞ᙠ%H~ᱏÁ¥¦®/[ᐜAsÄÞæ%A஺çḼéT&F£¤ºº✌&Ḅ[ᐜᦪ/Ꮇ᝞ê'éT&@ᡈὅì/£íéT&îï&T/ᔲᑣ/01£¤ºº✌&ᢗᐭ|⃩஺ò|⃩&óᢥᐸ[ᐜᦪᜧÔôᐭ£¤º/ᦋáöìsḄ&᝱/÷øᡠᨵ&¬|⃩¥ᔜSḄ~ᱏᦪ஺(2)IᩎYZL஺&£¤ºᢥᔜ&&ᐭḄᐜùúK᣸ᑡ/&iûᓰᵨf¯ḄYZ

3~ᢥᐸ)⌕▲1ýᐭ&kᑴᙽÁḄYZ~ᱏᦪ¹þ⚗(ᐜᦪḄᐜᦪ⚗)஺ᱏ,⃩ᓰᵨḄᱏᦪ!1,ᯠ#$%ᓰᵨḄᱏᦪ&ᔲ()Ḅ*+ᱏᦪ,-.,/01ᑮ3*+-456⃩᣸ᑮ89:;<-=>:✌ᓰᵨ-@ᦋBCDḄE᝱-GHᡠᨵKLᔜNḄᱏ஺(3)O᪾Q⃩:PriorityR:

4typetheAIgorithr»ZZTURNTIME434000647RWWUNNINGPROCESS/AITINGQUEUE23453412RIORITV/ZTURNTIME0000PUTIME7474LLTIMEwRwwTATUSRUNNINGPROCESS/AITINGQUEUE:[DRIORITVZ/TURNTIMEPUTIMEILLTIMETATUSD11:PUTIME11LLTIME56TfiTUSWURID1234PRIORIT¥//TURNTIME1011-1CPUTIME11101ftLLTIME53673STATUSWWBWRUNNINGPROCESS3/AITINGQUEUE1425[DPRIORITY//TURNTIMEDPUTIMEALLTIMESTATUSRUNNINGPROCESS1SITINGQUEUE4253ID12345PRIORITY//TURNTIMEDPUTIMEnLLTIMESTATUSBSKBsasscsEEBaassncaasRUNNINGPROCESS4SITINGQUEUE2513D1234^lORITVZ/TURNTIME20-2-2-1:PUTIME21211ILLTIME4STATUSURUNNINGPROCESS2WAITINGQUEUE5413

5PRIORIT¥//TURNTIME-14-10CPUTIMEILLUMESTATUSRUNNINGPROCESSWAITINGQUEUEIDPRIORIT?//TUfiNTIME-17-10CPUTIMEALLTIMESTATUSRUNNINGPROCESS3WAITINGQUEUE41345ID14T7T7T0PRIORITV//TURNTIME6764CPUTIME0010ALLTIMEFFRFSTATUSIDPRIORITV//TURNTIMECPUTIMEALLTIMESTATUSRUNNINGPROCESSNULLl/AITINGQUEUERoundRobinR:IPleasetypetheAIgorithmRPRIORITV/ZTURNTIMECPUTIMEALLI1MESTATUSRUNNINGPROCESS1WAITINGQUEUE2345PRIORITV//TURNTIHE21CPUTIME0ALLTIME2STATUSRRUNNINGPROCESS1WAITINGQUEUE23451PRIORITV//TURNTIME2CPUTIME2ALLTIME1STATUSURUNNINGPROCESS2WAITINGQUEUE3451IDPRIORITV//TURNTIMECPUTIMEfiLLTIMESTATUSRUNNINGPROCESSWAITINGQUEUE

6D12345^lORITV/XTURNTIME23241PUTIME32235ILLTIME00003STATUSFFFFRIUNNINGPROCESS5MITINGQUEUED12345^lORITV/XTURNTIME23241:PUTIME32236ILLTIME00002STATUSFFFFRIUNNINGPROCESS5SITINGQUEUED12345^lORITVZ/TURNTIME23241:PUTIME32237ILLTIME00001TfiTUSFFFFRIUNNINGPROCESS5MITINGQUEUED12345^lORITV/XTURNTIME23241:PUTIME32238ILLTIME00000TfiTUSFFFFFRUNNINGPROCESSNULLKITINGQUEUE%ṹ஻#include#include#include#includeconstIongn=5;structpcbtype®஺஻)ᑴᙽ᪀(longid,priority,runtime,tota1time;®charstatus>//RW,F->⃩012034t}PCB[n+l];

7longlink[n+1];//6⊤᪀010ngRUN,HEAD,TAIL;஻⌱9:;®longChooseAlgo()(Uchars[l28];printf(HPleasetypetheAlgorithm(Priority\\RoundRobin)V");gets(s);if(s[0]=='P'||s[O]=='p')஺return1;return0;0)//<=ᓄ஺voidinit()°{஺I஺ngi;ofor(i=1;i<=n;i++)°(PCB[i].id=i;PCB[i].priority=rand()%4+l;®PCB[i].runtime=0;PCB[i].totaltime=rand()%8+1;oPCB[i].status?'W';))

8஻@ABC•voidshowit()(longi;

9");஺printf("%-25s","ID");•for(i=l;i<=n;i++)printf("%4ld",PCB[i].id);printf("

10%-25s","PRIORIT///TURNTIME")W»for(i=l;i<=n;i++)printf("%4Id",PCB[i].priority);printf("

11%-25s","CPUTIME");•for(i=1;i<=n;i++)printf("%4Id",PCB[i].runtime);printf("

12%-25s","ALLTIME");•for(i=l;i<=n;i++)printf("%4ld",PCB[i].tota1time);•printf("

13%-25s","STATUS");for(i=1;i<=n;i++)printf("%4c",PCB[i].status);°printf(

14—————————————————————————————————————————————————————

15")W஺if(RUN!=-1)printf("RUNNIN&PROCESSV%ld

16",RUN);elseprintf("RUNNINGPROCESSVNULLXn");printf("WAITINGQUEUE:");•for(i=HEAD;i!=-1;i=1ink[i])printf("%Id",i);

17orintf("

18

19");P)//Eᐜᦪ:;voidmain_priority()°(Iongi,j,k;1ongsort[n+l];oinit();஺//IJ126®for(i=1;i<=n;i++)°{sort[i]=iW}for(i=l;i<=n;i++)஺஻᪷MEᐜᦪfiEN(°for(j=n;j>i;j--)஺{®if(PCB[sort[j]].priori+y>PCB[sort[j-1]J.priority)஺(k=sort[j];sort[j]=sor+[j-1];sort[j-1]=k;)0)0)HEAD?sort[1];

20®for(i=1;i

21)e1se(•if(HEAD!=-1&&PCB[RUN].priorityPCB[RUN].priority)k=link[k];஺if(k==TAIL)(-link[k]=RUN;஺//]ᐭ6_`a»TAIL=RUN;஺link[RUN]=-1;஺஺°°RUN=HEAD;oHEAD=link[HEAD];PCB[RUN],status='R';)•else(•link[RUN]=link[k];஻]ᐭ6X»Iink[k]=RUN;஺RUN=HEADW஺஻6✌b=⃩

22஺HEAD=1ink[HEAD];஺PCB[RUN].status='R';°)0)}0)showit();)//cd:;ovoidmain__round_robinQ°{஺1ongi;஺init();஺஻IJ126oHEAD=lWfor(i=1;i

23»PCB[RUN].statusV'RHEAD=link[HEAD];//⃩✌while(RUN!=-1)(஺showit();•PCB[RUN].totaItime—;஺PCB[RUN].runtime++;•if(PCB[RUN].totaltime==0)//⃩34(஺PCB[RUN].status='F஺஺RUN=HEAD;•if(HEAD!=-l).HEAD=link[HEAD];஺PCB[RUN].status='R';0}•else(»if(HEAD!=-1&&PCB[RUN].runtime%PCB[RUN].priority==0)஻cdefᑮ(PCB[RUN].status='W';஻]ᐭ6_•link[TAIL]=RUN;dink[RUN]=-l;•TAIL=RUN;

24஺RUN?HEAD;஻6✌b=⃩oHEAD=link[HEAD];PCB[RUN].status='R)0)஺hUshowit();6)஻jkᦪintmain஺஺lIongalgo;஺srand(time(NULL));®algo=ChooseAIgo();oif(a1go==1)(஺main_priority();//Eᐜᦪ;஺heIse(main_round_robin஺;//nᩎcd;)printf("SYSTEMFINISHEb

25");஺return0;0)pq:

26XᑏZṹḄ\!]^ᙢ``abRḄcdeᵨᜐ-gRḄ`!hḄijklm`ᑏZṹḄno஺pqRrstuvwxyz{?⚪r┝tuvwx14122602᛻LinuxUbuntuḄ1ஹ~Ḅ┝qRs-᦮tu஺,┝6&rstuᱯ&ᜧtu■Ḅ஺4Ḅᵨ¡ᑏe=¢tu£᝱ᑖ¥¦§Ḅ¨ᩎª«O-¬┝®Ḅᩩ°-±²ᵨ〉´ḄR-ᨵᦔḄ■┝Ḅ¶஺Xw·-\G¬ᙢ`┝Ḅ-¸¹º»■┝Ḅ¨ᩎ¼-!hᳮ¾ᚪÀÁᣴḄÃÄ஺2ஹÆÇÈ1Éqn±¶ᐳÌmtu¦§Ḅtu஺Σ᝱ᙢᵭЦ§eÑÒ¦§஺tuᢥᔜḄᵭУ᝱ᙢᑖ¥¦§஺È2Étu4nÔÕᔜᵭÐeÑÒ¦§Ö×tu£᝱ᑖ¥¦§Ḅ-Øᵨᡝ¬eᑖ᪆஺È3Étu4n⌱Ý&ᔲ²ᵨ■┝Rᡈ⌱ᵨßb■RÈ᝞ᨵábRÉ஺ᙠã²ᵨ■R¬┝6Ḅ¶஺ᙠᵨ■┝R-`ᙠi᪵ᵭÐᩩ°å-■

27┝Ḅ஺ᑁ1ஹ⚪~çÕè²ᵨéêR■┝Ḅ¶஺Ꮇᨵ챶ᐳÌᓝtu஺ᙠìᵭÐḄtu¦§îeãï10-´ᯠãkð¶┝-ᵫᔜᵭÐḄ¦§ònóô஺ᙠᨵᵭÐḄtu¦§ᦪï10-ᯠ¶┝஺4´᣸◀öyb÷ø஺O²ᵨùúᐭᔜḄᵭЦ§Oᑡ஺Ꮇ᝞ýᔜᑖ¥¦§-8kð¶┝-ök8&ã²ᵨ■┝RḄ÷ø஺Ꮇ᝞-ᢥ᯿ÇḄÆᑣᔜᑖ■┝Ḅ஺ᵨ஺!᝞#“%&'(”Ḅ*ᓽ,-./.,1234ᐸ6*ᔣ8,9:';(⚔஺!*=>?@Ḅ஺ᡠBḄCDE1F஺2ஹCṹ#includeusingnamespacestd;#inc1udeintRes[15]Iintn,m;structProcess{intHad[15]IintMax[15];intNeed[15];booIIsEnd;}Processes[l5]IintcurProcess;intReq[15];ProcesstmpProcesses[15];boolIsEnd(){boo1R=true;

28for(inti=0;iProcesses[curProcess].Need[i]){®«®Lega1=faIseIgbreak;

29°|for(inti=0;iRes[i]){஺oLega1=fa1se;஺break;0)஺}inttmp[15];for(inti=0;i

304sFindfa1se;wintcurRe1=-1;ofor(inti=0;itmp[i]){gsIsFF=fa1se;33oobreak;6)O000}e®IsFind=IsFFI®if(IsFind==true){ooooocurRel=i;ooooobreak;008}0)°}if(IsFind){for(inti=O;i

31}whi1e(!IstmpEnd()&&IsFind==true);for(inti=O;i>Res[i];for(inti=0;i>Processesfi].Had[j]>>Processes[i].Max[j];))intoption=-1;cin»optionIif(option==0){do)

3200for(inti0;ifor(inti=0;i>Req[i];}ooLega1=fa1se;oBanker();®if(Lega1){oProcesses[curProcess].IsEnd=true;sfor(inti=O;i

333ஹPQ⃩STINPUTUOPTION=0CLAIMOFPROCESS1IS:123-1-10CLAIMOFPROCESS2ISU2311-20CLAIMOFPROCESS3ISU125-1-20MAXCLAIMOFPROCESS1IS:6MAXCLAIMOFPROCESS2ISU7MAXCLAIMOFPROCESS3IS:8THESYSTEMALLOCTIONPROCESSISASFOLLOWS:PROCESSCLAIMALLOCATIONREMAINDER(1)1஺11஺9RESOURCEISALLOCATEDTOPROCESS1(2)227஺2஺RESOURCEISALLOCATEDTOPROCESS2(3>3116RESOURCEISALLOCATEDTOPROCESS3(4)12஺34RESOURCEISALLOCATEDTOPROCESS1(5)2஺3஺2஺4IFALL0CATED,DEADLOCKMAYOCCUR(6)<>1o24஺3஺THEREMAINDERISLESSTHANPROCESS2CLAIMS(7)3஺010஺0஺PROCESS3HASFINISHED,RETURNITSRESOURSETHEWHOLEWORKISCOMPLETED

34ૄ*******************************************VWXYZ[\]^_`ab⚪⚓ᳮ14122602᛻MicrosoftVisuaIStudioḄcdᩭᵫgᜧijkᡂᵯnoLSIpqrᜧijkᡂᵯnVLSIpᢈtḄuvwxᘤḄz{1|᡽ᜧD~ᜧ஺vᵨwxᘤḄz{qᡂᑮḄ▲ᑴ஺ᡠwxᘤḄᦔ᳛YZ[\ẆḄ⌕⚪஺wxᢈtᵨᩭ᡽ᜧᑁwz{Ḅ!⌕*஺¡ᙢᵨ£¤¥¦ᑏ¨©ªᵨḄwxᑖ«¬W©wxᳮḄjP¯ᔜ!ᑖ᪆=>±²ᐸឋ´µ¶·¸¹¯ºḄ»஺ᑁ=>¼^ᙢjwxᳮ⚜ᐜᡂ©ᜧ¿Àᔠ^▭ÃÄḄᢣÆᙢᙬÈ஺ᯠÊj᪵!ᢣÆPᑡḄ᡻ᩭWqᑖ᪆ᔜ!ḄÎÏÐ᳛஺^_ᵨ⚓Òᑖwxᳮ*ᫀ«2Ô᪆W1#⚓☢Ö×ÃÄḄÎÏÐ᳛ᩭ=>ᔜ!Ḅµ¶஺Ø᜜Eὃ⇋ᑮᦋÝ⚓☢ᜧFq^▭wxᘤz{¯WSTḄÞß·ᑣáḄஹᔠ〉Ḅ⚓☢ãäq^wz{åæç஺^_ᢥéêᑣᡂᢣÆPᑡḄ:o1p50%ḄᢣÆìP᡻Ḅ஺

35(2)25%ḄᢣÆᙳᒴᦣñᙠ/ᙢᙬóᑖ஺(3)25%ḄᢣÆᙳᒴᦣñᙠÊᙢᙬóᑖ஺⌱ᵨᨬöÖ×(OPT)qᨬcᨬ÷vᵨ⚓☢Ö×(LRU)W⚓☢Ð᳛஺øÒᎷwz{32K,⚓☢ãä1K:8K,^wz{4⚓:32⚓஺(1)ᨬöÖ×(OPT)!ûüḄᵨᩭZ⊝{ᐸ6µ¶Ḅ᪷çᙠ^▭[\ÿḄᵫᐜ⍝ᢣḄᡠᨵᙢᙬ஺ᵫ⚜ᡂᡠᨵḄᢣᙢᙬᦑ!"ᨬ$%᳛஺'!(Ḅ)ᑣ+,-.⚓⊤1234ᡈ+ᨬ634ḄḄ⚓஺789:;⚓⊤Ḅ⚓⌲=>?@ᢣ34Ḅᡠᨵ⚓AB᝞?@ᢣ1ᙠ34'⚓ᑣEF⚓,-1ᯠHI"?@ᢣᨬ634Ḅ⚓☢,-஺Kᨬ$,-!(⌕MNABOḄP!QR஺(2)ᨬTᨬUVᵨ⚓,-!((LRU)7+XYZ[VᵨḄ\(ᨵᔜY1^Ḅ_\ᫀ7abᵨḄ+1cd᦮⚓⊤fḄ\(ᓽh+,-⚓⊤ff✌Ḅ⚓jEk34Ḅ⚓lᐭfn஺Ꮇ᝞pqdᵨ⚓ᙠ⚓⊤ᑁᑣE2sd᦮ᑮfn஺7᪵8vwxᨬTVᵨḄ⚓h+ᜐᙠ☠Tfn{ᑖj1[VᵨḄ⚓8}ᑮf✌,⌲=,-ᙠ⚓⊤BᜧQd᦮⚓⊤fḄ+1Ḅ஺ᑏ#inc1ude#inc1ude#include#include#inc1ude

36#inelude#include#inelude#inc1udeusingnamespacestd;intadress[32];஻ᐰᦪᙢᙬintp;஻ᐰpᐳᨵᙢᙬvoidinit(){஻<=ᓄkᦪ0intt;°srand(time(0));஻ᢣNᑡp=12+rand()%32;cout<<”ᙢᙬ¢ᦪP="«p«endl;ocout«”ḄᙢᙬNᑡ

37”ofor(inti=0j=0;i

38");)cout<

39)voidOPT(intn){//FIFO:;,nMḄ¦ointe,q?p,m=n-1;intflag;ointflag1;intqueye=0;intleafIink[32];memset(leaflink,0,sizeof(leaflink));for(intx=0;x

40“);o஺break;s)}஺if(flag??OKintk=0;for(intj=O;j

41k++;1eaf1ink[m]=adress[e];if(e>=mXqueye++;)if(f1ag==1){inttemp[10]={0};for(inti=0;i<=m;i++){for(inta=e+l;atemp[i]){min=temp[i];index?i;})int1=1eaflink[index];leaflink[index]=1eaflink[0];

42leaflink[O]=l;}for(intj=O;j

43e=x;®®for(i=0;i

44",x,i,x,adress[x]);ebreak;d0}if(f1ag==0){intk=0;஺஺for(intj=O;j

45°°flagl++;}஺leaflink[3]=adress[e];஺printf(“°±¨©a,ᦋleaflink[%d]=%d

46H,mjeaf1ink[3]);}o°for(intj=0;j

47LRU(i);cout<5leaflink[1]=3leaflink[2]=5leaflink[31=9leaflink[1]=5leaflink[2]=9leaflink[31=lleaflinkCl]=9leaflinkt21=1leaflink[3]=8C=5,Irutl]=adress[5]=9,£lag=1°±¨©a0ᦋleaflink13J=9LeaflinkC0]=5leaflinktlJ=1leaflinkC21=8leaflink[3]»9=6,lru[0]=adress[6]=5lag=1Á±¨©a0ᦋleaflink[3௃=5eaflink[0]=lleaflinkLI]=8leaflink[23=9leaflinkL3]=5eaflink[0]=8leaflink[1]=9leaflink12J=5leaflink[3J=2=8,Hl]=adress[8J=9,flag=1Á±¨©a0ᦋleaflink[3]=9

48°±¨©a0ᦋIea£link[3]=5leaflink[0]=lleaflinktl]=8leaflinkC2]=9leaflink[33=5leaflink[0]=8leaflink[13=9leaflinkC2]=5leaflink[33=2ᨵ¨©X=8,Irull]=adress[8]=9,flag=1°±¨©a,ᦋleaflink13]=9leaflink[0]=8leaflinktl]=5leaflink£2]=2leaflink[3]=9ᨵ¨©X=9,lru[2]=adress[9]=2,flag=1°±¨©a0ᦋleaflink஺]=2leaflink[0]=8leaflinktl3=5leaflinkC2]=9leaflink[33=2ᨵ¨©X=10,Irutl]=adressL10]=5lag=1°±¨©a0ᦋleaflink131=5leaflink[0]=8leaflink[1J=9lea£link[2]=2leaflinkC3]=5leaflink[0]=9leaflinkCl]=2leaflink[2]=5leaflink[33=1leaflink[0]=2leaflink[l]=5leaflinkt2]=lleaflink[3]=8leaflink[0]=5leaflinkCl3=1leaflink[2]=8leaflink[3]=6ᨵ¨©X=14,lru[2]=adress[14J=8,flag=1°±¨©a0ᦋleaflink13]=8leaflink[0]=5leaflinkCl3=1leaflink[2]=6leaflink[3]=8°ᣚÄÅÆ?,M=4eLRUḄ¬X᳛®40zleaflink[0]=3leaflink[13=5leaflink[2]=1leaflinkC3]=9lea£link[4]=0ᨵ¨©X=6,Irutl]=adress[6]=50Çag=1°±¨©a0ᦋleaflink14J=5leaflink[0]=3leaflinktl]=1leaflinkC2J=9leaflink[3]=5lea£link[4]=0leaflink[0]=lleaflinkCl]=9leaflink[2]=5leaflink[3]=0lea£linkt4]=2ᨵ¨©X=8,Iru[1]=adress[8]=90Çag=1°±¨©a0ᦋleaflink14J=9leaflink[0]=lleaflinktl]=5leaflink[2]=0leaflink[3]=9leaflinkC4]=0leaflink[0]=5leaflinkCl]=0leaflink[2]=9leaflink[3]=0leaflinkC4]=2ᨵ¨©X=10,lru[0]=adress[10]=5,flag=1°±¨©a0ᦋleaflinkভ=5leaflink[0]=0leaflink[l]=9leaflink[2]=0leaflinkt3]=5leaflink[4]=2leaflink[0]=9leaflinktl]=0leaflink[2]=5leaflinkC3]=2leaflinkt4]=lleaflink[0]=0leaflinkLl]=5leaflink[2]=2leaflink[3]=1leaflink[43=8leaflink=5leaflinkCl1=2leaflink[2leaflink[33=8leaflinkL4]=6ᨵ¨©X=14,li*ii[3]=adress[14]=8,flag=1°±¨©a0ᦋleaflink141=8leaflink[0]=5leaflinkCl]=2leaflink[2]=1leaflink[3]=8leaflink[4]=0°⚶ᣚÉÊJ஺,M=5eLRUḄ¬X᳛®33.3333Zᨬ¸¹º:

49ᓭᵫᶢᑡa[0]=9a[13=8aC2]=8a[3]=2aC4]=3[5]=6a[6]=4a[?]=8aC8]=3a[9]=7a[10J=2atll]=9ᐭ⌱!(0ᨬ$,-LᨬTᨬUVᵨ0leaflink[0J=0leaflink[1]=0leaflinkC2]=9leaflink[0]=0leaflink[l]=9leaflinkC23=8ᨵ^leaflink[0]=0leaflinktl]=9leaflink[2]=8leaflink=9leaflink[1J=8leaflink[21=2leaflink[0]=8leaflinktl]=2leaflink[2]=3leaflink[0]=2leaflinkCl]=3leaflink[21=6leaflink=3leaflink[1]=6leaflink[23=4leaflink[0]=6lea£link[l]=4leaflink[2]=8leaflink[0]=4leaflink[13=8leaflink[2]=3leaflink[0]=8leaflinktl]=3leaflinkt2]=7leaflink[0]=3lea£link[l]=7leaflink[2]=2leaflink[0]=7leaflink[13=2leaflink[2]=9|M=3QFIFOḄ%᳛25%leaflink[0J=0leaflink[1J=0leaflinkC2]=0leaflink[3]=9leaflink[0]=0leaflinktl]=0leaflink[2]=9leaflinkC3]=8ᨵ^leaflink=0leaflink[U=0leaflinkC2]=9leaflink[3]=8leaflink[01=0leaflinktl]=9leaflink[2]=8leaflink£3]=2leaflink[0]=9leaflink[1]=8leaflink121=2leaflink[3]=3leaflink=8leaflinktl]=2leaflink[2]=3leaflinkt3]=6leaflink[0]=2leaflink[1]=3leaflink[2]=6leaflink[3]=4leaflink[0]=3leaflinkll]=6leaflinkC2]=4leaflinkC3]=8ᨵ^leaflink[0]=3leaflinktl3=6leaflink[2]=4leaflink[3]=8leaflink[0]=6leaflinktl]=4leaflink[2]=8leaflink[3]=7leaflink[0]=4leaflink[l]=8leaflink[2]=7leaflink[33=2leaflink[0]=8leaflinkLl3=7leaflink[2]=2leaflinkC3]=9M=4QFIFOḄ%᳛33.3333Zpq7sᡃbᵨ⚓ᑖ¡¢£ᳮ\ᫀ¥¦⚓ᑖ¡¢£ᳮḄ§=!(ᨬ$,-!(¨ᨬTᨬUVᵨ⚓,-!(ᨵ©ªX«Ḅ¬?Ḅ®ᝈ:°Ạ஺²!³´µ¶·¸¹º»Ë⚪ᦻÍvᳮ:14122602

50᛻MicrosoftVisualStudioḄ¼Ḽ¾¿ÀÁÂḄ᩽ᜧÄO9:!³ÅḄÀÁ>ÆÇÄÈÉᑮ¾¿ÊḄᔜ=\☢஺ËFᦻÍ£ᳮ+´µ¶·ḄX=᩽Î⌕ḄÏᡂ{ᑖ஺ÐÑÒᙢᵨÓÔÕÖᑏ¨d×X=ØᩎḄᦻͶ·ÚÛᦻÍ£ᳮḄܵ஺Ýj¦ᔜYᦻÍ´µ%ḄÞᑁߨ᡻_ᨵABªX«ḄáâãḄ_\(,äåᳮæᚪèéᣴḄë஺ᑁi.9:(1)▭X=n=ᵨᡝḄᦻͶ·ó=ᵨᡝᨬôw¡m=ᦻÍ஺(2)▲ᑴᵨᡝᙠXsP⃩úvᡭü1=ᦻÍ஺(3)¶·ÐvþÿᡭᐭḄḄឋ┯⌕┯஺(4)ᦻ᝞᡻!ᐕ#$ஹᐕ#ᑏ'஺ᙠ)*ᡭ+ᦻ,᪷./*ᡭ+Ḅ01,3*45ᓽ7ᨵ94஺(5)ᦻḄ;<=>?ᨵ@ABᩩDcreatKᦻ஺deleteᑤ◀ᦻ஺openᡭ+ᦻ஺closeᐵUᦻ஺read$ᦻ஺writeᑏᦻ஺2.XD(1)Z[\ᵨ94ᦻ^_,ᓽ`aᦻ^_(MFD)eᵨᡝᦻ^_(UFD)஺hὅ?ᒹkᦻa(ᓽᵨᡝ)lmnḄ^_oᢣ┐;sὅ?tu)vᦻaᓰᨵḄᦻ^_,

51ᓽᦻxṹᦻz{|lmn}~Ḅ'஺᜜ᡭ+ᦻ`⃩ᦻ^_(AFD),ᙠᦻᡭ+,?ᐭᡭ+ᦻ/*ᡭ+ṹe$ᑏᢣ┐'஺3.᪾(1)ᦻ^_Ḅᵨ`ᩎḄឋᨵ\ᵨHash'ᨵᦔ஺(2)ᦻᩎᵨ`¡ṹ¢?£ᐕ#$ஹᐕ#ᑏe⃩᡻!᝞@ᡠD111ᐕ#ᑏᐕ#$ᐕ#᡻!᝞¢?0,ᑣ§ᐕ#஺Îṹ#inelude#include#inelude#inc1ude#inc1ude#include#inc1udeusingnamespacestd;s¨uctUFD{intfname;int1en;intprocode[3];}ufd[10];

52structMFD{intuser;UFDp[5];}mfd[10];intmain(){intx,n=10f1agl=ljlag2=1,flag3=1;zif(flaglXfor(inti=0;i<10;i++){ufd[i].fname=i;intt=100+rand()%900;ufd[i].1en=t;for(intj=O;j<3;j++)ufd[i].procode[j]=rand()%2;)srand((unsigned)time(NULL));boolf[10];for(inti=0;i<10;i++Xmfd[i].user=i;memset(f,0,sizeoff);for(intj=0;j<5;j++Xintt;do

53t=rand()%10;while(f[t]);mfd[i].p[j]=ufd[t];)))while(n--&&fIag2){cout«"inputuserD"<>x;if(x=10){cout<

54case1:if(flag3){cout<<"¶ᐭÏ⌕ÑÒḄᦻÍḄÓ:H«endl;cin»mfd[x].p[O].fname;cout<<“¶ᐭÏ⌕ÑÒḄᦻÍḄÔ"«endl;cin>>mfd[x].p[O]Jen;cout<<“¶ᐭÏ⌕ÑÒḄᦻÍḄᩗ▲:"<>mfd[x].p[index].fname;cout¶ᐭÏ⌕ÑÒḄᦻÍḄÔ:“<

55for(intj=0;j<5©j++)cout<>t;for(inti=0;i<5;i++){if(mfd[x].p[i].fname==tXindex=i;mfd[x].p[i].fname=0;mfd[x].p[i].len=OOO;memset(mfd[x].p[i].procode,0,sizeof(mfd[x].p[i].procode));))for(intj=0;j<5;j++)cout«mfd[x].p[j].fname<<""«mfd[x].p[j].1en«""<

56break;case3:cout«"¶ᐭ⌕ᡭbḄᦻÍD“<>fi1e;for(inti=0;i<5;i++){if(mfd[x].p[i].fname==fi1e){if(mfd[x].p[i],procode[2]==0)cout<<"ÏÚᨵᩗ▲"«endl;elsecout«"ÛÜᡭb"<

57break;case5:flag=O;flag1=0;break;case6Dcout<<“¶ᐭ⌕ÝḄᦻÍ:ndl;intfilei;cin»fiIe1;for(inti=0;i<5;i++){if(mfd[x].p[i].fname==filelXif(mfd[x].p[i].procode[1]==0)cout«“ÏÚᨵᩗ▲*endl;elsecout<<“ÛÜÝ"<

58if(mfd[x].p[i].fname==file2Xif(mfd[x].p[i].procode[0]==0)cout<<"ÏÚᨵᩗ▲0

59

60inputthecommandàᐭ⌕ÝḄᦻáâÚᨵᩗ▲inputthecommandàᐭ⌕ÝḄᦻáãÜÝinputthecommandᘤå⌕ᑏḄᦻáæÚᨵᩗ▲inputthecommandçå⌕ᑏḄᦻáèÜᑏinputthecommand459910017918110014110063920101100111goodbye^pq/*ª«⌕¬®`¯@ᦻᦻ¬ᡃn±,²³ᨬµ¶¬ᨬ·Ḅ¸¹ᓽº¬§»¼½Ḅ¾n¶7|¿ÀÁÂ;<ᦻᩭÄźᙢÇÈ;</*ªÉᡃ`Êᑮ`ᦻḄᑁÍÎÏᯠÑѬ¿ÀC++®ḄÒÓ¬ÉᡃÔḄÕᳮᨵ`×ØḄᳮʶ¬ᡃnÙÚḄᑁÛḄ¯vÜÝ஺Þ¼½;<ߪàáâ

61é⚪LinuxᦻÍḄ1.ãä;<åᦻᑖçḄᭆé஺2.`ÊLinuxᦻêᳮᦻḄë/Źeᱯí஺3.î»ᵨLinuxᦻḄï☢eZ[ï☢Ḅë/⌕⚞஺ᑁI.ᵨshellòóLinuxᦻçô஺LinuxḄᦻçôõlDö¿ᦻ÷¯øஹ^_ᦻdஹùúᜓᦻ÷cஹᙽᜓᦻ÷býþ²ᦻஹᝅᦻsஹᦻI⍝ᦻp஺2.ᵨsheIILinuxᦻḄ᪀஺-OX(stud067(?localhoststud0671$cd/lib▲j(stud067(?localhostlibl$Is-1Snoreᵨ14128Irwxrwxrwx1rootroot142008-03-20cpp->../usr/bin/cppdrwxi-xr-x2rootroot40962008—03—20eumsdrwxi*-xr-x2rootroot40962008-03-20i686drwxi-xr-x2rootroot40962008-03-20iptablesdi*wxr-xr-x6rootroot40962008-03-20kbd-rwxr-xr-x1rootroot1030442003-03-14ld-2.3.2.soIrwxrwxrwx1rootroot112008-03-20ld-linux.so.2->ld-2.3.2.soIrwxrwxi'wx1rootroot112008-03-20libacl.so->libacl.so.lIrwxrwxrwx1rootroot152008-03-20libacl.so.1—>libacl.so.1.0.3-rw-r—r——1rootroot192482003-01-29libacl.so.1.0.3-i»wxi-xi'-x1rootroot143962003-03-14libanl-2.3.2.soIrwxrwxrwx1rootroot152008-03-20libanl.so.l->libanl-2.3.2.soIrwxrwxrwx1rootroot122008-03-20libattr.so->libattr.so.FIrwxrwxi'wx1rootroot162008-03-20libattr.so.1->libattr.so.1.0.1-rw-r-r-1rootroot71482003-01-29libattr.so.1.0.1-rwxr-xr-x1rootroot64002003-03-14libBrokenLocale-2.3.2.so1rootroot242008-03-20libBrokenLocale.so.1->1

62S3ëelnetces203.shu.edu.cn-□>[stud06701ocalhoststud067]$cd/etc[stud067(?localhostetc]$Is-1Imoreìᵨ2108-i*w-rr1rootroot152282003-01-25a2ps.cfg-rw-i*r-1rootroot25622003-01-25a2ps-site.cfg-rw-r-r-1rootroot462008-03-20adjtimedrwxr-xr-x2rootroot40962008-03-20aep-rw-r-T-—2rootroot6882003-02-04aep.conf-r1rootroot7032003-02-04aeplog.confdrwxr-xr-x4rootroot40962008-03-20alchemist-rw-i*-r-1rootroot13432003-02-25aliases—-j*---—---1smmspsnmsp122883ᨴ20719aliases.dbdrwxr-xr-x2rootroot40962008-03-20alternatiues-r1rootroot3172003-01-25anacrontab1*W1rootroot12003-01-25at.deny—rw-i*-i*-1rootroot2122003-01-28auto.master---r1rootroot5752003-01-28auto.nisc—rw-rr1rootroot14972002-08-30bashreIrwxrwxrwx1rootroot212008-03-20bg5ps.conf->bg5ps.conf.zh_TW.Big5Irwxrwxvwx1rootroot232008-03-20b^Sps.conf.zh_CN->bg5Ps.conf.zh_CN.GB2312-rw-i*r1rootroot3922003-01-25bg5Ps.conf.zh_CN.GB2312Irwxrwxrwx1rootroot212008-03-20bgSps.conf.zh_TW->bg5Ps.conf.zh_TW.Big5îïðñò:I1Telnetces203.shu.edu.cn_□XCstud067(?localhoststud0671$cd/bin▲(stud0670localhostbin]$Is-1'moreìᵨ4848-rwxr-xi*-x1rootroot26442003-02-25arch-rwxi*-xi*-x1rootroot924442003-02-06ash-rwxr-xr-x1rootroot4929682003-02-06ash.staticIrwxrwxrwx1rootroot42008-03-20awk->gavik-i*wxi*-xi*-x1rootroot108482003-02-19basename-rwxi*-xi-x1rootroot6260282003-02-11bashIrwxrwxrwx1rootroot42008-03-20bash2->bashIrwxrwxrwx1rootroot32008-03-20bsh->ash-rwxr-xi-x1rootroot143642003-02-19cat-rwxr-xr-x1rootroot180762003-02-19chgrp-rwxi*-xi*-x1rootroot180762003-02-19chnod-rwxr-xr-x1rootroot197722003-02-19chown-i*wxr-xi*-x1rootroot477322003-02-19cp-rwxr-xi*-x1rootroot519562003-02-15cpioIrwxrwxrwx1rootroot42008-03-20esh->tesh-rwxr-xr-x1rootroot198682003-02-19cut-rwxr-xi*-x1rootroot386202003-02-19date-rwxi*-xr-x1rootroot307722003-02-19dd-rwxr-xi*-x1rootroot285962003-02-19df-rwxi*-xi*-x1rootroot40642003-02-25dmesgIrwxrwxrwx1rootroot82008-03-20dnsdomainname->hostname-rwxr-xr-x1rootroot25162003-03-13doexecîïðñò▼

63S3_□X[stud067(?localhoststud06?!$cd/hone[stud067(?localhosthome]$Is-1imoreìᵨ46010drwx3IxnIxn409601017:42Ixn1drwx3stud014stud014409621016:04stu014drwx16stud001stud001819222616:33stud001drwxrwxrwx5stud002stud002409621619:19stud002drwx20stud003stud003409612616:43stud003drwx5stud004stud00440962608:41stud004drwxr-x——x3stud005stud005409622617:51stud005drwxrwxrwx4stud006stud006409622611:30stud006drwx9stud007stud007409622412:21stud007drwx10stud008stud008409621009:06stud008drwx4stud009stud009409622520:28stud009drwx7stud010stud010409621619:21stud010drwx------5stud011studOll409621013:10studBlldrwx10stud012stud012409622518:54stud012drwxrwxrwx8stud013stud013409622518:54stud013drwx4stud014stud014409631012:57stud014drwx6stud015stud01540963215:10stud015drwx3stud016stud01640962210:28stud016drwx10stud017stud017409622712:2?stud017drwx3stud018stud018409621010:46stud018drwx6stud019stud019409621712:34stud0191drwx4stud020stud02040963013:34stud020^ᩞᙽ:W"#.3.ᵨᑖ&'()ᦻᦻ஺*+Is-iIᡠ-Ḅinodeஹ.ᦪ0123Ḅ4&஺ó[stud067(?localhoststud067]$cat>£1ADAisXuLijian.Cstud067(?localhoststud06?!$In£1£2[stud0670localhoststud0671$In-sflf3[stud067(?localhoststud06?!$cat£2ADAisXuLijian.[stud067(?localhoststud067]$catf3ADAisXuLijian.[stud067(?localhoststud067]§rmfl(stud067@localhoststud067!$catf2ADAisXuLijian.[stud067(?localhoststud067]$catf3catf3Úᨵô¢ᦻáᡈö[stud067(?localhoststud06?!$cat>£1ADAisXuLijian.Cstud067(?localhoststud067]$rm£2Cstud067(?localhoststud067]$cat£3ADAisXuLijian.[stud067(?localhoststud067]$♦5ὃ⚪"'()ᦻ'(ᦻᨵ9:4&;<")=ᢣ*+?@⁚BᩭDEḄ=஺ᙠLinuxGHIJᦻKᢣᔣMN?@⁚BOPᙠḄ஺NQRS=TO)=஺)=ḄUᵨOᐕWNJᦻXᨵIJᨵᦔ⌶[K,R᪵ᵨᡝT_`'()=ᑮb⌕ᦻH`■e“gᑤ”Ḅjk஺ᐸmn᝞pᡠqHᵫstuvḄ?@⁚BᨵNJ`pḄ=஺wᑤ◀NJ=yz

64{|?@⁚B}~ᐸḄ=HwᨵvᨬNJ=ᑤ◀HᦻḄᦪᙽḄ=஺TO,ᦻᑤ◀.)=ttuḄ--S=H==஺ᦻᨵBsWindowsḄᣩ஺pOᱯᦻḄNS஺ᙠ=GHᦻpONJᦻᦻHᐸGᒹḄᨵNᦻḄ¡¢£¤஺᝞p¥¦ᡠ-"touchf1§'NJflḄᦻInflf2§¨NJf2Ḅ)=1n-sflf3§'NJf3Ḅ=©ªᎷ᝞ᑤ◀f3,¬flஹf2{|®Ꮇ᝞ᑤ◀f2,¬flஹf3{|HᎷ᝞ᑤ◀fl,¯:ᵫsf2uᵨfl,ᡠ`yz{|f2⁚BḄHcat§'Ḅᦻ°ᯠPᙠ;³O©ªf3ᵫsO=H´µf3ᜫᦔ஺Ꮇ᝞ᑤ◀flஹf2,¯:cat§'Ḅᦻᑤ◀஺4.·¸UnixᡈLinuxºUᦻ£¤i⁚BḄᭆ¼஺½¾01¿ᢣÀᦻḄinode£¤஺ÁÂpþ8ḄᑁÅÆᐭp3.cH½È᡻E஺[stud0670localhoststud0671$gcc-op3.op3.c.[stud067(?localhoststud06?!$.Zp3.oflFilesfll>Ondeuice8S-inodenumber=11618432)Type0100000Permission006643>0uerid568Groupid5684>Nunberofhardlinks5>Size176>LastaccessMonMar21835482009LastmodifyinodeMonMar218354820097>Datablocks4096.8[stud067(?localhoststud0671$5.ÊᩭNJËᨵÌḄ¦஺Íᦋ᱄D¾§'ÐD¾Ḅ¾ÑHᵨÒ-¾ÑÓஹᦪÓᙢᙬḄÖH×ÐD¾ØÙ᱄D¾ḄᡠᨵÚÛ஺Êᵨ᱄D¾§'ÐD¾HÐD¾Üᵨᐸ¾ÑḄÖDNÝÞ×᡻Eᐸ¾Ñª,¾ÑÓßàḄáᓄ஺ÁÂpþ10Ò-¾ÑஹᦪÓᙢᙬḄ¾ÑḄᑁÅÆᐭP4.cஹp5.cH½È᡻E஺

65Cstud067(?localhoststud067]$gcc-op4.op4.c[stud067@localhoststud067]$.Zp4.oetext80483fbedata8049548endx6_icricp___11__d___JIOZ*mA6.½ᑏNJäåᦻḄ¾Ñ஺æÀ:A.`wçᡭéNJÛᦻᦻB.`wçᡭéNJÛᦻᦻC.`wçᡭéḄᦻᦻD.ÁêJÛᦻᑁÅ·ᑴᑮḄᦻE.ÁḄᦻᦋᢣÀḄìឋF.Ò-ḄᦻÁÂpþ11ḄᑁÅÆᐭP6.cH½È᡻E஺pqᙠ¦GzîᨵÂpḄᭆ¼HÂpïḄzðñḄ,òó}ôõöp÷øÚᧇ஺¬sLinuxGᦻḄ)ᳮóûOüýH¬s¦ᑁÅᳮËDNÝNÝ,UnixḄᑁ᪶᪀ḄOÿᵨ,ḄᢈᡃᩭᐵḄᯖ.▬öøÎNÀ//p3.c#include#include#include#include

66#incIude#include#include#include#defineTIME_STRING_LEN50char*time2String(time_ttm,char*buf){structtm*local;local=loca1time(&tm);strftime(buf,TIME_STRING_LEN,"%c"JocaI);returnbuf}intShowFilelnfo(char*fi1e){structstatbufchartimeBuf[TIME_STRING_LEN];if(Istat(file,&buf)){perror(nIstat()error")return1;)printf("

67File%s

68",fiIe);printf("l)Ondevice(major/minor):%d%dJnodenumber:%ld

69”major(buf.st_dev),minor(buf.st_dev),buf.st_ino);printf("2)Type:%07o\tPermission:%05o

70",buf.st_mode&S_IFMT,buf.st_mode&(SùFMT));printf(n3)0verid%d\tGroupid:%d\t

714)Numberofhardlinks%d

72",

73buf.st_uid,buf.st_gid,buf.st_nlink);printf("5)Size:%1d\t

746)Lastaccess:%s",buf.st_size,time2String(buf.st_atime,timeBuf))printf("

75Lastmodifyinode%s

76

77"time2String(buf.st_atime,tim/eBuf));printf(H7)Datablocks:%d,%d\t

78",buf.st_blksize,buf.st_blocks);return0;)intmain(intargc,char*argv[]){inti,ret;for(i=1;il)printf(H

79");)returnret;)//p4.c#inc1udeexternintetext,edataend;zmain()(printf("etext:%6x\tedata%6x\tend:%6

80",&etext,&edata,&end);஻P5.c

81#inc1ude#include#include#inc1ude#include#defineSHW_ADR(ID,I)printf("Theid%s\tisatadr:%8x

82H;externintetext,edata,endchar*cptr="He1IoWorld.

83”charbuffer1[25];main(){voidshowit(char*);jnti=0printf("Adretext%8x\tAdredata:%8xAdrend%8x

84

85n,&etext,&edata,&end);SHW_ADR(Hmain"main)zSHW_ADR("showit",showit);SHW_ADR("cptr",cptr);SHW_ADR("bufferl"bufferl)zSHW_ADR(Mi",i);strcpy(bufferl/'Ademonstration

86")write(l,bufferl,str1en(buffer1)+1)for(;i

87{char*buffer2;SHW_ADR("buffer2",buffeফif((buffer2=(char*)ma1Ioc((unsigned)(strlen(p)+l)))!=NULL){strcpy(buffer2,p);printf(M%s",buffer2);free(buffer2))else{printf("Allocationerror.

88");exit(1);)}//p6.c#inc1ude#includeintmain(intargc,char*argv[]){chars[1024];FILE*fp;if((fp=fopen(argv[1],"r"))!=(FILE*)0){while((fgets(s,1024,fp))!=(char*)0)puts(s);)else{fprintf(stderr,"fileopenerror.

89");exit(l);

90)exit(0);}#$%&'()*+,-./ú⚪FATᦻÍ:14122602᛻win95ûü¾Ḅ0)*ᑖ᪆Ḅ345678FATᦻ:)*Ḅ;<=᪀?ᦻ:Ḅ@AB஺DEFᳮ8'()*ᦻ:HᳮḄIJK஺,ᑁM1.783NOPḄFATᦻ:)*=᪀஺2.QRᦻ:ᑖS⊤ḄUVW஺3.QRᦻ:XY⊤Zᦻ:XY=᪀஺4.78ᵨUVW᧜\Ḅᦻ:WB@A=᪀஺5.ᑖ᪆XYᦻ:Ḅ;ᡂ஺⁚1.DᐭDEBUG_᛻aᐭFATᦻ:)*=᪀஺

91᡻cdeL00021fg:0VijᘤZ,lmᡧoV00pqḄᐳ21Hsᡧotᐭᑁ@uᙠDS0000wxqḄᙢᙬZ஺2.{|1.44MOPZFAT12ᦻ:)*=᪀஺᡻cde:D0000}~᡻cDde128s⁚ᦻ:)*=᪀஺FATᦻ:)*=᪀᝞lmᡧoVB(x*FATFAT2*1FDWoOK.AS«12KI13HᐸZBootFATᦻ:ᑖS⊤FDTᦻ:XY⊤1.44MOPlmᡧVᱥᳮᡧoḄᐵ)lmᡧV0#——0⍝0☢1ᡧlmᡧV1H11H——0⍝0☢218ᡧlmᡧV12H-23H——0⍝1☢1ᡧ18ᡧlmᡧV24H-35H——1⍝0☢1ᡧ18ᡧ

92ctC:\VI!iD01S\syste»32\cBd.exe-debug-|q|x|-L00021—D000052140F0000EB3E9040414D4453-4B4E540002010100>RAMDSKNT..........140F001002E00000SBF00900-1200020000000000…0..........................140F00200000005400002900-C0A288S2414D4449RAMDI140F0030534B4E8E20204641-543132202020Fl7DSENTFAT12.>140F0040FA33C955DIBCFC7B-1607BD?800C57600x140F0050IE56161FBF220589-7E00894E02Bl0BFCN140F0060F3A40666BD00?CC6-45FE0F8B46188845140F0070F9FB38247C04CD-13723C8A461098F7..8£$-D0E140F008066160346IC1356IE-03461113DI505289f..F..U..F...PR.140F009046FC8956FEB82000-8B76FEF7E68B5E0BF..U..140F00A003C348F7F30146FC-114E2D5A58BB0007.ZX...140F00B08BFBBl01E8940072-47380B7419Bl0B56...............rG8-t...U140F00C08B763EF3A65E744A-4E747D03F983C?15.v>..^tJNt.............140F00D03BFB72E5EBD72BC9-B8D88487463E3CD8r>.F><140F00E07599BE807DAC9803-F0ACEEC074173CFFu..t.<140F00F07409B40EBB0700CD-10EBBE83?DEBE5tOPᨵ☢☢80s⍝s⍝18sᡧosᡧo512s⁚ᡠOPḄM2*80*18*512=1474560,1474560/1024/1024ᜧw1.44M஺3.ᑖ᪆ᦻ:ᑖS⊤=᪀78ᵨUW᧜\Ḅᦻ:ḄWB@A=᪀஺᡻cdeD200c\C:\¥INDOfS\systeB32\cB(l.exe-debug140F0EA00000000000000000—0000000000000000................|140F0EB00000000000000000-0000000000000000140F0EC00000000000000000-0000000000000000a.140F0ED00000000000000000-0000000000000000.a140F0EE00000000000000000-0000000000000000140F0EF00000000000000000—0000000000000000..«..-............................-D200140F0200F0FFFF85F6FF0560-0007800009A0000B*140F0210C0000DE0000F0001-1120011340011560...........................(?.140F02200117800119A0011B-C001IDE001IF0002140F02302120022340022560-0227800229A0022B?..%''ு.+140F0240C0022DE0022F0003-3120033340033560..1.3P.5ஹ140F02500337800339A0033B-C0033DE0033F0004.7..9....=..?140F02604120044340044560-0447800449A0044B.K140F0270C0044DE0044F0005-5120055340055560..M..0..Q.se.-D2600140F2600E530000000FFFFFF-FFFFFF0F0010FFFF.0...........................140F2610FFFFFFFFFFFFFFFF-FFFF0000FFFFFFFFaa140F2620E5520061006D0044-0069000F00107300•R.a.m.D.1..■•■s.140F26306B004E0054003100-2E00000035002E00k.N.T.1...........5.Ba140F2640E5414D4449537E31-3020201000278550.AMDIS~10',P140F26505D405D4000008650-5D40020000040000.a140F26604230000000FFFFFF-FFFFFF0F0010FFFFB0...........................140F2670FFFFFFFFFFFFFFFF-FFFF0000FFFFFFFF..............Jὃ☢¡¢✌UVw003Ḅᦻ:ᐳ¤¥¦sᡧo?ᑖ¨ᙠ©ªsᱥᳮᡧo?«:✌UVw003Ḅᦻ:ᐳ¤¥2sᡧoᑖ¨ᙠ0⍝0☢2ஹ3ᡧ஺

934.{|1.44MOPZᦻ:XY⊤FDT¥ᦻ:XY=᪀᡻cdeL00021fg:lmᡧo0HpqḄᐳ21HsᱥᳮᡧoaᐭDS:OOOOHxqḄᑁ@஺᡻cde:D2600fg:02600HᙢᙬpqḄFDTᦻ:⊤஺c\C:\-I!iD0-S\syste-32\c(i.exe-debug02140F02302120022340022560-0227800229A0352B140F0240C0022DE0022F0003-3120033340030060..1.30.5*140F02500337800339A0033B-C0033DE0033F04049.140F02604120044348044560-044?800449A0554BA.C(?.E'.G..I..K140F02?0C0044DE0044F0005-51200553400560-SP.U'-D2600140F2600E530000000FFFFFF-FFFFFF0F0010FFFF140F2610FFFFFFFFFFFFFFFF-FFFF0s00FFFFFFFF140F2620E5520061006D0044-00690஺0F001073■i>■>■s>140F26306B004E0054003100-2ESS0஺0035002E00k.N.T.l..........5...140F2640E5414D4449537E31-302Ḅ20100஺278550.AMDIS^IB.'.P140F26505D405D4000008650-5D40020000040000wip..-Pie.............140F26604230000000FFFFFF-FFFFFF0F0010FFFFB0................................140F2670FFFFFFFFFFFFFFFF-FFFF0000FFFFFFFF-L80000218-D8000140F80002E20202020202020-2020201000062351....ttQ140F80105D405D4000002451-5D40020000000000](?](?..............140F80202E2E202020202020-202஺201000062351.....#Q140F80305D405D4000002451-5D40000000000000](?](?..............140F80404441544120202020-5441472000062351DATATAG..#Q140F80505D405D40S஺00B283-522B030078000000...R+..x...140F80604441544131202020-4341422018062351DATAlCAB..ttQ140F80705D405D400000B283-522B040040700200...R+..(?p..Jὃজ$%1.44MḄOP᪷XYᨬM¯°ᦻ:±«1.44MBOPḄᦻ:XY⊤FDTᐳ14sᡧosᦻ:ḄXY²³⚗ᓰᵨ3s⁚ᵨ(XYḄEsᡧo¶512⁚·ᨬ¸¹aᐭ512/32=16sᦻ:஺º»1.44MBOPḄ᪷XYᨬ¼ᦻ:ᡈ¾XY224s஺ঝÀ¡¢Ḅᦻ:ḄXY⚗Z᪗Âᦻ:Ḅ✌UVᙠÃᜐ±Âᦻ:ÅÆÇឋ±«:✌UVᙠÉ2cḄ1A~1B⁚ᜐ✌UVw002,Âᦻ:ÇÊ᫏ᦻ:஺ÌḄᦻ:✌UVᙠÉ6cḄ1A-1B⁚ᜐ✌UVw091,ÇÊ᫏ᦻ:஺ঞÌ☢Ḅ¡¢É12cXY⚗⊤ÎḄÅÆ⚗X±«:É1~2XY⚗⊤Îᔁ᪗஺5.{|I.44MOPZᦻ:XY⊤ḄÐᦻ:ÑXY=᪀

94Jὃ:জÌ☢¡¢Ḅ2\3cÅÆXY⚗?«:ÐÑḄÉE⚗ÒᨬÓE⚗஺ঝÔᨵEsᦻ:ÑᐳÐ34sÕ⌕ᓰ°XY⚗±«×sXY⚗ØsÐXY⚗?EsÙXY⚗஺6.ÚÛjÜÝজ{||ÞOPḄFDToßᑮÑwBAKḄᦻ:XY஺Âᦻ:ÅÆáâḄᦻã±ᦻ:uᙠPḄ©säå±ᓰᵨ¦s@Aᓫä?ç5ᐸᑁMRR஺Âᦻ:wBAK.txtÇÊ᫏ᦻ:஺QRᐸ✌UVw002,7ᦪéo21Hlmᡧo஺᡻c:L00021D2600QRᑁM᡻cL80000218C:\¥INDO¥S\systeB32\cBd.exe-DEBUG-L00021-D260042414B2532220500542Uj107-bFC*813F32600592A592A0-006c2A020w11000"_K0BAKTXT.u.x13F326100000000_M0-w00000HR000--00S200CS-0V*¥*..IxV*.............13F326200000000S-0-0c000C-000C-M003S5C0CD013F3263000000003_M0-M0s0000S000SS003SSS0S0013F32640-M--3330000000S0C00000C000000SC00C013F3265000000003I09I00000SC0000003CS^00S^013F326600000000S0S0c000S000009C30C3013F32670M_-sDJ-L8000Filenotfound-L80000218-D800044c4F20584c492047441E13F3800048450^0*CS*00C0000000C^*wC*CS^*000HELLO.......................13F3801021000C05D0I000S000000009C3-DCDCS500013F3802000000DSC00000000009C^DCD000013F38030000003S900000000009C9^9CSC0013F38040000003S000G0000000D03C903CD00013F3805000000DC000J00000000SDS-09CC00013F3806000000^9C300000000003CI^^wSSS300013F3807000003S5D053^ঝßᑮᦻ:123.TXTḄ@Aäå஺ç5ᦻ:ḄÉêëᦻ:ḄÉ512⁚pqḄ128s⁚ᦋᑏᡂ“HappyNewYear!”஺îᑏïðᦻ:஺ñᵨòBᡭpᦻ:QRᦔõ஺'(_⁚L00021

95D2600L80000228D8000D8200F8200“HappynewYear!W800002283.5OP(A:)ᦻঢᦈ®ᐹ9QP஺⌨▼1,ᦻᜳ▼ᙢᙬBAKtxt123.txtᦻ"ᦻᜳ#ᦻ2ᦻ᫏ᦻ2ᦻ᫏1KB1KBJ$%&'(ᦻᜳBB6)*'ᦻᜳ+,ᑮ▼Web.ᐳ01ᦻ-L00021ᐸ567-D260010L3F3260042414B2020202020-545854201176F778BAKTXT-v.xᡃḄᵯ?13F32610592A592A00006C78-592A020000000000V*V*..1x7*.............13F32620E5B065FA5E200087-652C670F00D2876s..e.ö..e,g....eᡃḄᦻ᫏13F3263063682E0074007800-740000000000FFFFch..t.x.t...............ᐳ0ᦻ᫏13F32640E5C2BDA8CEC47E31-5458542000A2SB79.............~1TXT..[y13F32650592A592A00005C79-592A000010000000V*V*..\yY*.............@ABCL3F326603132332020202020-54585420C2A25B79123TXT[y13F32670592A592A00008479-592A0300030000V*?*...yV*.............-L80000228-D800089:;13F380004142434445464748-494A4B4C4D4E4F50ABCDEFGHIJKLMNOPL3F380105152535455565758-595A414243444546QRSTUUWXVZABCDEF13F380204748494A4B4C4D4E-4F50515253545556GHIJKLMNOPQRSTUU13F380305758595A41424344-45464748494A4B4CWXVZABCDEFGHIJKL13F380404D4E4F5051525354-55565758595A4142MNOPQRSTUUWXVZAB13F38050434445464748494A-4B4C4D4E4F505152CDEFGHIJKLMNOPQRt3F38060535455565758595A-4142434445464748STUUWXVZABCDEFGH13F38070494A4B4C4D4E4F50-5152535455565758IJKLMNOPQRSTUUWXDEFGH÷øù,ᡃúi⁚Ḅ=ûᨵ7DEFḄüýú.i⁚ḄþVஹᦻ:ᜧÿஹᦻஹᦻஹᦻᑁᨵḄ,ᙠLINUXḄᙠᨬ◤⌕!!"#$%&'&Ḅᑁ(Ḅ⍡*ឋᨵ,ᜧᙠᨬ./01*ᡭ.ᦻḄ345ᙠ66"#$78%9:;Ḅ஺7ᑁ=ᑖ?@AᜓCᳮ

96$.GḄHLinuxCᳮAᜓḄIJK஺L.MᜓNOAᜓCᳮIPᳮQ.ᑁᵨ1s734TUAᜓᦻḄVJK$Is-1/dev$Is/dev|wc>data.out(XAᜓᦻYZ[C⍝〈ᑮwc34_`AᜓᦻYḄaᦪcdeᔣg〈ᑮᦻdata.outh,_`Aᜓᦻiᦪ஺)$catdata.out(klc)[stud067@localhoststud067]$Is/deu|uc>data.out[stud067@localhoststud067]$catdata.out7519751947276vxuyXII>>iIUIIiicur*4xu->uuixu.xua.x.(stud067(?localhoststud0671$gcc-op?.op7.c(stud067(?localhoststud067]$.Zp7.oflfldeu=85[stud067Olocalhoststud067]$m.▬o(pṹ)#include#include#incIude#include#include#include#include#includeintmain(intargc,char*argvr){inti;

97structstatbuf;for(i=l;i

98M);)exit(0);t_`uvwxyz{

99DEI⚪KHᑴ&'MNḄSheIIRSHTUVWH14122602DE]᛻RedHatEnterpriseIinux6DEKḄH|ᔠᡠ&(ឋvwJKḄᳮHDEᑁmHLinuxḄshelI,$i34Hᘤ஺᪗Mᐭᐭ34a᡻a஺H$i345$iNᩖ34,¡᝞£¤C⍝ஹᐭ¥deᔣஹ8¦᡻a஺§¨$ᐳᑖªᓝiᙽiᙽI%$iᦪ஺ᔜᙽ¯°᝞sHead.h$´µe¶@ᦪ·᪀Ḅe¶¹Main,c[§¹Init.c/ᓄᙽ,£¤¾i/ᓄ,$i¿Àshe11ÂḄ/ᓄinit-once(),Å$iÆ⃩È$ᩩ348Ḅ/ᓄinit_command()¹Getcomln.cÍᑮÎÏᐭ34¹Get_simcom.cᐭḄ34ÐaÑÒᑖ᪆X34ᑖHªÔᩎ34ÍᑮÔᩎ34Ḅᦪ¹Get_word.cÍᑮ$i᪗ØÙ¹Runj_com.c᡻a$ᩩÔᩎ34¹Run_com.c᡻aᐭḄ34¹Get_simarg.c$ᩩÔᩎ34ÐaÑÒᑖ᪆,ÍᑮÔᩎ34ḄYÝ@Þᦪ¹Cheek.cáâãÙäᔲᓛçinput1n□ᦪhinputlnptrᢣᔣḄãÙä@checkᦪḄÞᦪãÙäᔲᓛç஺ᜮᦻe¶$´ᙠᔜiᙽìᵨḄᦪ·᪀஺᡻aÂ[§main./ᙠᐸhᐭஹHÆ⃩ᵨᡝᐭḄ34஺34HḄI[§᝞ïᐸðᦪᵨᩭ

100$´òó¯°஺DEnoH1.Init_once()ᙠôô./ḄÂ᎛᡻a/ᓄö÷.2.Init_command()/ᓄᐭ34ḄÏ☢Ḅ⌶úY@'xü'3.Getsimcom()H᪆g"ᩭḄãÙä.4.Run_command()᡻aᐭḄ345.Main()ýᵨᔜiᦪ.¤þ▲ᐭ.DE]⁚H^includettincludettincludeitincludettincludettincludettincludettincludettincludettdefinenorma10"defineout_redirect1ttdefinein_redirect2ttdefinehaue_pipe3voidget_input(char*)voidexplain_input(char*buf,int*argcount,chararg1ist[100][256])voiddo_cmd(intargcount,chararg1ist[100][256])intfind_command(char*command)intmain(intargc,char**argu)inti:intargcount=0chararg1ist[10஺][256]

101char**arg=NULLchar*buf=NULLbuf=(char*)ma1loc(Z56)if(buf==NULL)

1020)==0i!strcmp(buf,Mlogout

1030)==0)breakfor(i=0i<100i++)wXarglist[i][0]=,X0,)argcount=0_explain_input(buf,Sargcount,arg1ist)do_cmd(argcount,arglist)if(buf?=NULL)

104printf(^commandistoolong£i

105M)exit(-1)}buf[len]=len++buf[len]='ஹ0',□idexplain_input(char*buf,int*argcount,chararg1istL180JLZ56J)char*Pchar*qintnumberwhile(1)p>number+1)arglist[*argcount][number]=*argcount=*argcount♦1pqoiddo_cmd(intargcount,chararg1ist[100]EZ56])intflag=0inthow=0intbackground=0intstatusintiintfdchar*arg[argcount+1]char*argnext[argcount+1]char*file

106pidfor(i=0i

107M)return?}}for(i=0arg[il!=NULLi++){if(strcmp(arg[i],">")==0)1){printf(MwrongcommandEi

108M)qreturn

109if(hou==out_redirect)°)==0)

110M)returnsujitch(hou)

111M,arg[0]);exit(0);}execvp(arg[0],arg);exit(0);}

112breakcase1if(pid==0){if(!(find_command(arg[0])))

113M,arg[0]qexit(0)}fd=open(file,0_RDWRSO_CREAT10_TRUMC,0644)dupZ(fda)execvp(arg[0],arg)exit(0);)breakcase2if(pid==0)

114u)return}elseif(pidZ==0)£if(?(find_command(arg[0])))

115M)if(?(find_command(argnext[0J)))

116)breakdefault:break}if(background==1){printf(°[processidzd]

117M,pid)return}if(uaitpid(pid,&status,0)==-1)printf(MwaitforchiIdprocesserror

118M)}inffind_command(char*command)

119M)while((dirp=readdir(dp))!=NULL)d_name,command)==0)

120_`ablmᦻoஹpᜓஹrsᘤஹuvḄwᳮ஺_`abyz{|}~Ḅ_`ᓄᵨᡝḄC\zuᨵᦔḄwᳮ஺2.abpᙽᓄஹ᪗ᓄZ᝞h¡¢ᙢ¤¥ᙽ¦§v¨Ḅkᙽᓄஹ᪗ᓄZ©}~Ḅᐹ«¬®¯°Cabz᜜²ᩎb´ḄCµf¶◤¸〉zḄᙽº〉Ḅ¦§v¨ᓽ¼஺DEtu⌕º¾¿ᑴshe11,Áᯠ¶fij²ᩎḄCÃÄᯠÅfÆÇÈᩖḄ¿v஺´☢⌕ËÌᐭḄ,Í´☢⌕zuÎ᪆Cᯠ᡻஺ÑÆ⁚Ó⌕ὃ⇋ÇÕÖ×,\ØÅ⌕ÙÚḄÎuvḄwᳮÛÜ,ÝÞµÆißᡃzÎáᘤᨵu´âḄᳮÎ஺

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。
最近更新
更多
大家都在看
近期热门
关闭