freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

操作系統(tǒng)課程設(shè)計(jì)1-其他專業(yè)-資料下載頁

2025-01-19 11:45本頁面

【導(dǎo)讀】步理解操作系統(tǒng)。本文件系統(tǒng)采用兩級(jí)目錄,其中第一級(jí)對(duì)應(yīng)于用戶賬號(hào),第二級(jí)對(duì)應(yīng)于用戶帳號(hào)下的文件。首先應(yīng)確定文件系統(tǒng)的數(shù)據(jù)結(jié)構(gòu):主目錄、子目錄及活動(dòng)文件等。的形式存放于磁盤,這樣便于查找和修改。并以編號(hào)作為物理地址,在。目錄中進(jìn)行登記。#defineMAXCHILD50/*thelargestchild每個(gè)用戶名下最多有50個(gè)文件*/

  

【正文】 for(j=0。jfcount[k]。j++)/*列出已經(jīng)打開的文件 */ { if(ifopen[k][j].ifopen==1)//如果文件是打開的 printf(%15s,ufd[k]ufdfile[j].fname)。 } printf(\nPlease input FileName:)。 gets(fname)。//從鍵盤上讀入所要關(guān)閉的文件 ltrim(rtrim(fname))。 i=ExistF(fname)。//獲取文件編號(hào) if (i=0) { ifopen[k][i].ifopen=0。//關(guān)閉文件 printf(\n \39。%s\39。 closed successfully\n,fname)。 wgetchar=1。 } else//所要關(guān)閉的文件不存在 { printf(\nError. \39。%s\39。 dose not exist.\n,fname)。 wgetchar=1。 } } } void ReadF() /*Read File*/ { int i,k,n=0。 char fname[MAXNAME]。 char str[255],str1[255],c。 if (strcmp(strupr(ltrim(rtrim(dirname))),)==0) { printf(\ convert to ufd dir before read.\n)。 wgetchar=1。 return。 } printf(\nCaution:Open file first\n)。 printf(Opened File(s) List:\n)。 k=ExistD(dirname)。 for(i=0。ifcount[k]。i++) { 操作系統(tǒng)課程設(shè)計(jì)報(bào)告 22 if (ifopen[k][i].ifopen==1) if ((ifopen[k][i].openmode==0) ||(ifopen[k][i].openmode==2)) { printf(%15s,ufd[k]ufdfile[i].fname)。 n++。 } if((n%4==0)amp。amp。(n!=0)) printf(\n)。 } printf(\n%d files openned.\n,n)。 if (n==0) wgetchar=1。 if(n!=0) { printf(\nPlease input FileName:)。 gets(fname)。 ltrim(rtrim(fname))。 i=ExistF(fname)。 if(i=0) { if(ifopen[k][i].ifopen==1) { if((ifopen[k][i].openmode==0) ||(ifopen[k][i].openmode==2)) { itoa(ufd[k]ufdfile[i].fpaddr,str,10)。 strcpy(str1,file)。 strcat(str1,str)。 strcpy(str,c:\\osfile\\file\\)。 strcat(str,str1)。 strcat(str,.txt)。 fp_file=fopen(str,rb)。 fseek(fp_file,0,0)。 printf(\nThe text is:\n\n)。 printf( )。 while(fscanf(fp_file,%c,amp。c)!=EOF) if (c==39。\n39。) printf(\n )。 else printf(%c,c)。 printf(\n\n%d Length.\n,ufd[k]ufdfile[i].flength)。 fclose(fp_file)。 wgetchar=1。 } else { printf(\nError.\39。%s\39。 has been opened with WRITE ONLY mode. It isn\39。t read.\n,fname)。 操作系統(tǒng)課程設(shè)計(jì)報(bào)告 23 wgetchar=1。 } } else { printf(\nError.\39。%s\39。 is in closing status. Please open it before read\n,fname)。 wgetchar=1。 } } else { printf(\nError. \39。%s\39。 does not exist.\n,fname)。 wgetchar=1。 } } } void WriteF() /*Write File*/ { int i,k,n=0。 int length。 char fname[MAXNAME],values[1000]。 char str[255],str1[255],c。 if (strcmp(strupr(ltrim(rtrim(dirname))),)==0) //只能寫自己目錄下的文件 { printf(\ convert to ufd dir before write.\n)。 wgetchar=1。 return。 } printf(\nCaution:Open file first\n)。 printf(Opened File(s) List:\n)。 k=ExistD(dirname)。//獲取目錄編號(hào) for(i=0。ifcount[k]。i++)/*列出可以寫的文件 */ { if(ifopen[k][i].ifopen==1)//如果文件是打開的 { printf(%15s,ufd[k]ufdfile[i].fname)。 n++。 } if((n%4==0)amp。amp。(n!=0)) printf(\n)。 } printf(\n%d files openned.\n,n)。 操作系統(tǒng)課程設(shè)計(jì)報(bào)告 24 if (n==0) wgetchar=1。//沒有打開的文件 if(n!=0) { printf(\nPlease input FileName:)。 gets(fname)。//從鍵盤獲取所要寫的文件 ltrim(rtrim(fname))。 i=ExistF(fname)。//獲取文件編號(hào) if(i=0) { if(ifopen[k][i].ifopen==1)//如果文件是打開的 { if((ifopen[k][i].openmode==1) ||(ifopen[k][i].openmode==2))//文件是只寫,或者是可讀可寫的 { itoa(ufd[k]ufdfile[i].fpaddr,str,10)。//獲取文件對(duì)應(yīng)的物理地址 strcpy(str1,file)。 strcat(str1,str)。 strcpy(str,c:\\osfile\\file\\)。 strcat(str,str1)。 strcat(str,.txt)。 fp_file=fopen(str,ab)。//以二進(jìn)制只寫的形式打開,每次將內(nèi)容添加到文件末尾接著上一次內(nèi)容 length=WriteF1()。 ufd[k]ufdfile[i].flength=ufd[k]ufdfile[i].flength+length。//計(jì)算總長度 printf(\n\n%d Length.\n,ufd[k]ufdfile[i].flength)。 printf(\n\nYou have write file successfully!!)。 fclose(fp_file)。 wgetchar=0。 } else if(ifopen[k][i].openmode==0)//文件是只讀的 { printf(\nError.\39。%s\39。 has been opened with READ ONLY mode. It isn\39。t write.\n,fname)。 wgetchar=1。 } else//文件是保護(hù)的 { printf(\nError.\39。%s\39。 has been opened with PROTECT mode. It isn\39。t write.\n,fname)。 wgetchar=1。 } } else //文件是關(guān)閉的 操作系統(tǒng)課程設(shè)計(jì)報(bào)告 25 { printf(\nError.\39。%s\39。 is in closing status. Please open it before write\n,fname)。 wgetchar=1。 } } else //所指定的文件不存在 { printf(\nError. \39。%s\39。 does not exist.\n,fname)。 wgetchar=1。 } } } void QuitF() /*Quit FileSystem*/ { int i,j。 char str[50]。 SetPANo(1)。 if (fp_mfd!=NULL) fclose(fp_mfd)。 if (fp_ufd!=NULL) fclose(fp_ufd)。 if (fp_file!=NULL) fclose(fp_file)。 for(j=0。jucount。j++) { strcpy(str,c:\\osfile\\)。 strcat(str,ufd[j]ufdname)。 ltrim(rtrim(str))。 strcat(str,.txt)。 fp_ufd=fopen(str,wb)。 fclose(fp_ufd)。 fp_ufd=fopen(str,ab)。 for(i=0。ifcount[j]。i++) fwrite(amp。ufd[j]ufdfile[i],sizeof(OSFILE),1,fp_ufd)。 fclose(fp_ufd)。 } } 【 測(cè)試結(jié)果 】 : 操作系統(tǒng)課程設(shè)計(jì)報(bào)告 26 ,寫文件,打開文件,關(guān)閉文件: : 操作系統(tǒng)課程設(shè)計(jì)報(bào)告 27 【心得體會(huì)】 兩周的課程設(shè)計(jì)讓我懂得了很多之前并不了解的知識(shí),對(duì)自己的各個(gè)方面的能力的提高也有著很多的幫助。 UNIX 系統(tǒng)中的文件系統(tǒng)是最讓人們感興趣的,也是最成功的一部分。功能強(qiáng)大而且很靈活。在具體的實(shí)現(xiàn)技術(shù)上,也有著很多獨(dú)到之處。 此次的課程設(shè)計(jì) 的難度較以前又加大了,尤其需要很強(qiáng)的邏輯能力。對(duì)我而言,難度不小。開始時(shí)毫無頭緒,程序毫無進(jìn)展。但通過幾天反復(fù)的讀代碼,詢問同學(xué),我終于慢慢的明白了,再看幾次程序,已經(jīng)知道他的思路和邏輯了。從而完成這次程序的設(shè)計(jì)問題。 在設(shè)計(jì)過程中,在代碼的優(yōu)化的效率方面還是經(jīng)歷了幾番波折。這些問題還是歸咎于自己基本功不扎實(shí),實(shí)際訓(xùn)練的比較少。從而對(duì)如何提高程序執(zhí)行效率的解決辦法掌握的不好。 這次設(shè)計(jì),嚴(yán)重暴露了我的基本功問題,編程能力有待提高。學(xué)習(xí)的多,而訓(xùn)練的少。直接導(dǎo)致實(shí)際編程時(shí)毫無頭緒。什么事都是熟 能生巧,在今后的學(xué)習(xí)生活中,自己要更多的進(jìn)行程序的讀寫和實(shí)際在計(jì)算機(jī)上的編寫。夯實(shí)基礎(chǔ),了解更多變成方面的查找錯(cuò)誤,解決錯(cuò)誤的能力。 【 參考文獻(xiàn) 】 計(jì)算機(jī)操作系統(tǒng)教程 (第三版 ). 張堯?qū)W 史美林 張高 計(jì)算機(jī)操作系統(tǒng) ,西安電子科技大學(xué)出版社,方敏主編 ,
點(diǎn)擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計(jì)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1