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

正文內(nèi)容

操作系統(tǒng)課設(shè)報(bào)告(參考版)

2025-03-26 08:34本頁(yè)面
  

【正文】 for(i = 1。 return 1。 } current = dirfcb[0].fatherBlockNum 。 /*回到父目錄*/ if(strcmp(sonfname,..)==0){ if(current==2){ printf(你現(xiàn)已經(jīng)在根目錄下!\n)。(osPointroot)。}/*進(jìn)入當(dāng)前目錄下的子目錄*/int changePath(char *sonfname){ struct dirFile *dir。 //標(biāo)記該目錄項(xiàng)為空文件 printf(在當(dāng)前目錄下刪除文件成功!\n)。 //清除原文本文件的內(nèi)容 dirfcb[temp].initialize()。 //fat1,fat2表標(biāo)記為空白 char *p=osPointdata[j 3]。 j = dirfcb [temp].currentBlockNum 。 } } } if(k!=OPEN_MAX){ close(name)。 } else{ printf(該文件未在當(dāng)前目錄下!\n)。amp。kOPEN_MAX。 } int k。 } } if(i == BlockFcbCount){ printf(當(dāng)前目錄下不存在該文件!\n)。amp。i BlockFcbCount。 else dir=(struct dirFile *)(osPointdata [current3])。 //當(dāng)前目錄的指針 if(current == 2) dir=amp。}/*在當(dāng)前目錄下刪除文件*/int delfile(char *name){ int i,temp,j。 } } printf(\n該目錄下共有 %d 個(gè)文本文件, %d 個(gè)文件夾\n\n,FileCount,DirCount)。 } if(dirfcb[i].type==DIRECTORY){ //查找目錄文件 DirCount++。i++) { if(dirfcb[i].type==GENERAL){ //查找普通文件 FileCount++。 for(i=1。(osPointroot)。 //搜索當(dāng)前目錄 struct dirFile *dir。 return 1。 memset(p,4,BlockSize)。 dirfcb[emptyNum].size =0。 dirfcb[emptyNum].fatherBlockNum=current。 /*接下來(lái)進(jìn)行分配*///填寫該分派新的盤塊的參數(shù) strcpy(dirfcb[emptyNum].fname,name)。 } iFAT=i。 } if(i==BlockCount){ printf(磁盤已滿!\n)。iBlockCount。 return 0。 return 0。amp。 isFound = 1。amp。iBlockFcbCount。 else dir=(struct dirFile *)(osPointdata [current3])。 //當(dāng)前目錄的指針 if(current==2) dir=amp。//temp, int emptyNum = 0,isFound = 0。 return 1。 dirfcb[temp].initialize()。 //fat清空 char *p=osPointdata[j3]。 return 0。iBlockFcbCount。 //當(dāng)前子目錄的指針 sonDir=(struct dirFile *)(osPointdata [ j 3])。 } j = dirfcb[temp].currentBlockNum。 if(i==BlockFcbCount){ printf(當(dāng)前目錄下不存在該子目錄!\n)。 strcmp(dirfcb[i].fname,sonfname)==0){ break。i++){ //查找該目錄文件 if(dirfcb[i].type==DIRECTORY amp。 for(i=1。(osPointroot)。//確保當(dāng)前目錄下有該文件,并記錄下該FCB下標(biāo) struct dirFile *dir。 return 1。 //定位到子目錄盤塊號(hào) dirinit (current,iFAT,sonfname)。 dirfcb[temp].currentBlockNum=iFAT。 dirfcb[temp].type=DIRECTORY。 /*接下來(lái)進(jìn)行分配*/ osPointFAT1[iFAT]=osPointFAT2[iFAT] = 2。 return 0。i++) { if(osPointFAT1[i] == 0) break。 for(i = 3。 return 0。 i++){//查找空白fcb序號(hào) if(dirfcb[i].type==Zero) break。 } } for(i = 1。 strcmp(dirfcb[i].fname,sonfname)==0 ){ printf(該文件夾下已經(jīng)有同名的文件夾存在了!\n)。i++){ if(dirfcb[i].type==DIRECTORY amp。 /*為了避免該目錄下同名文件夾*/ for(i = 1。(osPointroot)。 struct dirFile *dir。 return 1。 fclose(fp)。 /*保存到磁盤上myfiles*/ fp = fopen(FilePath,w+)。//打開文件列表初始化 delete openlist。 currentPath=C:\\。int read(char *file)。int open(char *file)。int write(char *name)。int delfile(char *name)。int create(char *name)。int mkdir(char *sonfname)。 //文件名標(biāo)識(shí)struct OPENLIST* openlist。 //輸入指令struct DISK *osPoint。 //當(dāng)前路徑int current=2。 //磁盤文件地址char * BaseAddr。//數(shù)據(jù)區(qū) }}。 //FAT作備份 (2,2,C:\\)。 //FAT2 FAT1[0]=FAT1[1]=FAT1[2]=2。 void format(){ memset(FAT1,0,BlockCount)。 //FAT2 struct dirFile root。struct DISK/**********************************************************************/{ int FAT1[BlockCount]。 //標(biāo)記為子項(xiàng) fcb[i].type=Zero。iBlockFcbCount。 fcb[0].type=DIRECTORY。 //本身的FCB fcb[0].fatherBlockNum=_FatherBlockNum。struct dirFile/*目錄文件結(jié)構(gòu)*/{ struct FCB fcb[BlockFcbCount]。//為分配打開 f[i].type=GENERAL。iOPEN_MAX。 //FCB拷貝 OPENLIST() { files=0。 // 統(tǒng)計(jì)當(dāng)前打開文件數(shù)目 struct OPENLIST //用戶文件打開表{ int files。 //磁盤大小const int BlockFcbCount = BlockSize/sizeof(FCB)。 //能打開最多的文件數(shù)const int BlockCount = 128。/*常量設(shè)置*/const int BlockSize = 512。 }}。 size =0。 //當(dāng)前的盤塊 void initialize() { strcpy(fname,\0)。 //文件大小 int fatherBlockNum。 //文件名 char type。3 模擬算法的實(shí)現(xiàn)開始初始化目錄表FAT輸入命令分析命令建立打開關(guān)閉讀 寫 刪除 退出結(jié)束 簡(jiǎn)單文件系統(tǒng)流程圖實(shí)驗(yàn)代碼如下:include include include stringinclude iostreamusing namespace std。l read:用于讀文件。l close:用于關(guān)閉文件。l create:用于創(chuàng)建目錄。l ls:用于顯示目錄。(5) 要求提供以下有關(guān)的操作:l format:對(duì)文件存儲(chǔ)器進(jìn)行格式化,即按照文件系統(tǒng)的結(jié)構(gòu)對(duì)虛擬磁盤空間進(jìn)行布局,并在其上創(chuàng)建目錄以及用于管理文件存儲(chǔ)空間等的數(shù)據(jù)結(jié)構(gòu)。(4) 文件目錄結(jié)構(gòu)采用多級(jí)目錄結(jié)構(gòu)。(3) 空閑磁盤空間的管理可選擇位示圖或其它方法。在退出文件系統(tǒng)的使用時(shí),應(yīng)將虛擬文件系統(tǒng)保存到磁盤中,以便下次再將它恢復(fù)到內(nèi)存的虛擬磁盤空間中。}int belong_orderId(int id){ return id%ORDER_N。 return random。 }}//生成隨機(jī)數(shù)int random_order(int start,int end){ int random。 od++。 pg[i].ord[j].belong=i。jORDER_N。iPAGE_N。 od=0。 mpoint=0。iBLOCK_N。 }//初始化內(nèi)存void initMemory(memory *m){ int i。i++) sst[i]=1。 for(i=0。 //棧底指針}stack。 int top。}memory。定義內(nèi)存結(jié)構(gòu)體typedef struct memory{ int block[BLOCK_N]。 int workplace。 }order。 int belong。 //缺頁(yè)計(jì)數(shù)器int count_order。 count_order++。 //修改棧中頁(yè)的順序 sst[i]=pg。istop1。i++) if(sst[i]==pg) middle=i。 //缺頁(yè)數(shù)加1 } else{ for(i=sbottom。 print(*m)。 sst[i]=pg。istop1。 //修改頁(yè)狀態(tài) pag[sst[sbottom]].workplace=1。 //棧頂指針加1 print(*m)。 //指向下一個(gè)內(nèi)存塊 sst[stop]=pg。 //頁(yè)存入內(nèi)存塊 pag[pg].workplace=mpoint。 //計(jì)算所在頁(yè)的id int middle,i。 //指令計(jì)數(shù)器加1 }} LRU算法void lru(memory *m,int order_id,page pag[],stack *s){ int pg=belong_page(order_id)。 //缺頁(yè)數(shù)加1 } pag[pg].ord[id].state=1。 //指向下一個(gè)內(nèi)存塊 print(*m)。 //修改指令所在頁(yè)狀態(tài) mblock[mpoint]=pg。 //輸出內(nèi)存塊狀態(tài) } else{ //內(nèi)存塊已滿 pag[mblock[mpoint]].workplace=1。 mpoint=(mpoint+1)%BLOCK_N。 //計(jì)算所在頁(yè)中的id if(pag[pg].ord[id].state==0){ //
點(diǎn)擊復(fù)制文檔內(nèi)容
范文總結(jié)相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1