1. 程式人生 > >unix檔案系統模擬-作業系統課程設計

unix檔案系統模擬-作業系統課程設計

本週進行作業系統課程設計,在很多的題目中選了個unix檔案系統模擬,主要就是操作結構與檔案。

為了方便,檔案系統結構如下:

Super block   --  Block bitmap  -- Inode bitmap  -- Inode table -- Block zone

其中:

Super block: 儲存基本資訊

Block bitmap:塊分配情況

Inode bitmap:索引節點分配情況

Inode table: Indoe 節點存放區

Block zone:存放資料區

效果如下:

總的說來,做的還是挺簡單的,只是實現了基本的功能.而塊的分配沒有怎麼完成,linux系統中一般是通過多級索引的方式為inode分配塊.

剛開始我的想法是:inode的塊(512B)只寫510B,留下2B用於記錄下一塊的塊號,我覺得應該可行,但覺得繁,就沒有寫下去.所以就沒有多餘的

塊分配操作.知識INode對應一個Block....,太懶了.還有一個缺點,檔案指標移動太頻繁了,而且都是絕對定位移動(好算,呵呵)

程式碼如下:

/*核心思想:一切皆是檔案
如果是目錄:Block中儲存的是目錄下檔案和目錄的fcb
如果是檔案:Block中儲存的是檔案的內容
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <malloc.h>
#include <signal.h>

#define BLOCKSIZE 512
#define BLOCKNUM  512
#define INODENUM  30
#define FILENAME "file.dat"

typedef struct{
	unsigned short blockSize;
	unsigned short blockNum;
	unsigned short inodeNum;
	unsigned short blockFree;
	unsigned short inodeFree;
}SuperBlock;

typedef struct{
	unsigned short inum;
	char fileName[10];
	unsigned short isDir;  // 0-file 1-dir
	unsigned short iparent;
	unsigned short length;    //if file->filesize  if dir->filenum
	unsigned short blockNum;
}Inode,*PtrInode;

//Fcb用於儲存檔案與 目錄資訊,主要用途:將一個目錄下的所有檔案(包括目錄)寫入到該目錄對應的Block中
typedef struct {
    unsigned short inum;
    char fileName[10];
    unsigned short isDir;
}Fcb,*PtrFcb;


typedef struct{
	char userName[10];
	char passWord[10];
}User;


char blockBitmap[BLOCKNUM];
char inodeBitmap[INODENUM];

SuperBlock superBlock;
User curUser=(User){"root","root"};

unsigned short currentDir; //current inodenum
FILE *fp;
const unsigned short superBlockSize=sizeof(superBlock);
const unsigned short blockBitmapSize=sizeof(blockBitmap);
const unsigned short inodeBitmapSize=sizeof(inodeBitmap);
const unsigned short inodeSize=sizeof(Inode);
const unsigned short fcbSize=sizeof(Fcb);
char		*argv[5];
int argc;


void createFileSystem()
/*建立*/
{
	long len;
	PtrInode fileInode;
	if ((fp=fopen(FILENAME,"wb+"))==NULL)
	{
		printf("open file %s error...\n",FILENAME);
		exit(1);
	}

    //init bitmap
	for(len=0;len<BLOCKNUM;len++)
        blockBitmap[len]=0;

    for(len=0;len<INODENUM;len++)
        inodeBitmap[len]=0;

     //memset

	for (len=0;len<(superBlockSize+blockBitmapSize+inodeBitmapSize+inodeSize*INODENUM+BLOCKSIZE*BLOCKNUM);len++)
	{
		fputc(0,fp);
	}
	rewind(fp);

	//init superBlock
	superBlock.blockNum=BLOCKNUM;
	superBlock.blockSize=BLOCKSIZE;
	superBlock.inodeNum=INODENUM;
	superBlock.blockFree=BLOCKNUM-1;
	superBlock.inodeFree=INODENUM-1;

	fwrite(&superBlock,superBlockSize,1,fp);

	//create root
	fileInode=(PtrInode)malloc(inodeSize);
	fileInode->inum=0;
	strcpy(fileInode->fileName,"/");
	fileInode->isDir=1;
	fileInode->iparent=0;
	fileInode->length=0;
	fileInode->blockNum=0;

	//write / info to file
	inodeBitmap[0]=1;
	blockBitmap[0]=1;
	fseek(fp,superBlockSize,SEEK_SET);
	fwrite(blockBitmap,blockBitmapSize,1,fp);
	fseek(fp,superBlockSize+blockBitmapSize,SEEK_SET);
	fwrite(inodeBitmap,inodeBitmapSize,1,fp);
	fseek(fp,superBlockSize+blockBitmapSize+inodeBitmapSize,SEEK_SET);
	fwrite(fileInode,inodeSize,1,fp);
	fflush(fp);

	//point to currentDir
	currentDir=0;

}

void openFileSystem()
/*如果FILENAME可讀,則代表之前已有資訊,並讀取相應資料    如果不可讀,則建立檔案系統 */
{

	if((fp=fopen(FILENAME,"rb"))==NULL)
	{
		createFileSystem();
	}
	else
	{
	    if ((fp=fopen(FILENAME,"rb+"))==NULL)
        {
            printf("open file %s error...\n",FILENAME);
            exit(1);
        }
	    rewind(fp);
        //read superBlock from file
        fread(&superBlock,superBlockSize,1,fp);

        //read bitmap from file
        fread(blockBitmap,blockBitmapSize,1,fp);
        fread(inodeBitmap,inodeBitmapSize,1,fp);

        //init current dir
        currentDir=0;

	}

}


void createFile(char *name,int flag) //flag=0 ->create file   =1 ->directory
{
	int i,nowBlockNum,nowInodeNUm;
	PtrInode fileInode=(PtrInode)malloc(inodeSize);
	PtrInode parentInode=(PtrInode)malloc(inodeSize);
	PtrFcb fcb=(PtrFcb)malloc(fcbSize);

	//the available blockNumber
	for(i=0;i<BLOCKNUM;i++)
	{
		if(blockBitmap[i]==0)
		{
			nowBlockNum=i;
			break;
		}

	}

	//the available inodeNumber
	for(i=0;i<INODENUM;i++)
		{
			if(inodeBitmap[i]==0)
			{
				nowInodeNUm=i;
				break;
			}

		}

	//init fileINode struct
	fileInode->blockNum=nowBlockNum;
	strcpy(fileInode->fileName,name);
	fileInode->inum=nowInodeNUm;
	fileInode->iparent=currentDir;
	if(flag==0)
	{
		fileInode->isDir=0;
	}
	else
	{
		fileInode->isDir=1;
	}
	fileInode->length=0;

	//write fileInfo to file
	fseek(fp,superBlockSize+blockBitmapSize+inodeBitmapSize+inodeSize*nowInodeNUm,SEEK_SET);
	fwrite(fileInode,inodeSize,1,fp);

	//update superBlock and bitmap
	superBlock.blockFree-=1;
	superBlock.inodeFree-=1;
	blockBitmap[nowBlockNum]=1;
	inodeBitmap[nowInodeNUm]=1;

	//init fcb info
	strcpy(fcb->fileName,fileInode->fileName);
	fcb->inum=fileInode->inum;
	fcb->isDir=fileInode->isDir;

	//update to file ...

	//update parent dir block info
	fseek(fp,superBlockSize+blockBitmapSize+inodeBitmapSize+currentDir*inodeSize,SEEK_SET);
	fread(parentInode,inodeSize,1,fp);
	fseek(fp,superBlockSize+blockBitmapSize+inodeBitmapSize+INODENUM*inodeSize+parentInode->blockNum*BLOCKSIZE+parentInode->length*fcbSize,SEEK_SET);
	fwrite(fcb,fcbSize,1,fp);

	//update parent dir inode info
	parentInode->length+=1;
	fseek(fp,superBlockSize+blockBitmapSize+inodeBitmapSize+currentDir*inodeSize,SEEK_SET);
	fwrite(parentInode,inodeSize,1,fp);

	// free resource
	free(fileInode);
	free(parentInode);
	free(fcb);
}



void list()
{
	int i;
	PtrFcb fcb=(PtrFcb)malloc(fcbSize);
	PtrInode parentInode=(PtrInode)malloc(inodeSize);

	//read parent inode info from file
	fseek(fp,superBlockSize+blockBitmapSize+inodeBitmapSize+currentDir*inodeSize,SEEK_SET);
	fread(parentInode,inodeSize,1,fp);

	//point to parent dir block
	fseek(fp,superBlockSize+blockBitmapSize+inodeBitmapSize+inodeSize*INODENUM+parentInode->blockNum*BLOCKSIZE,SEEK_SET);

	//list info
	for(i=0;i<parentInode->length;i++)
	{
		fread(fcb,fcbSize,1,fp);
		printf("Filename: %-10s",fcb->fileName);
		printf("Inode number: %-2d    ",fcb->inum);
		if(fcb->isDir==1)
		{
		printf("Directory\n");
		}
		else
		{
			printf("Regular file\n");
		}
	}

	//free resource
	free(fcb);
	free(parentInode);
}


int findInodeNum(char *name,int flag)  //flag=0 ->find file flag=1 -> find dir
{
	int i,fileInodeNum;
	PtrInode parentInode=(PtrInode)malloc(inodeSize);
	PtrFcb fcb=(PtrFcb)malloc(fcbSize);

	//read current inode info from file
	fseek(fp,superBlockSize+blockBitmapSize+inodeBitmapSize+currentDir*inodeSize,SEEK_SET);
	fread(parentInode,inodeSize,1,fp);

	//read the fcb in the current dir block
	fseek(fp,superBlockSize+blockBitmapSize+inodeBitmapSize+inodeSize*INODENUM+parentInode->blockNum*BLOCKSIZE,SEEK_SET);

	for(i=0;i<parentInode->length;i++)
	{
		fread(fcb,fcbSize,1,fp);
		if(flag==0)
		{
			if((fcb->isDir==0)&&(strcmp(name,fcb->fileName)==0))
					{
						fileInodeNum=fcb->inum;
						break;
					}

		}
		else
		{
			if((fcb->isDir==1)&&(strcmp(name,fcb->fileName)==0))
					{
						fileInodeNum=fcb->inum;
						break;
					}

		}
	}

	if(i==parentInode->length)
			fileInodeNum=-1;

	free(fcb);
	free(parentInode);
	return fileInodeNum;
}

void cd(char *name)
{
	int fileInodeNum;
	PtrInode fileInode=(PtrInode)malloc(inodeSize);
	if(strcmp(name,"..")!=0)
	{
		fileInodeNum=findInodeNum(name,1);
		if(fileInodeNum==-1)
			printf("This is no %s directory...\n",name);
		else
		{
			currentDir=fileInodeNum;
		}
	}
	else
	{
		fseek(fp,superBlockSize+blockBitmapSize+inodeBitmapSize+currentDir*inodeSize,SEEK_SET);
		fread(fileInode,inodeSize,1,fp);
		currentDir=fileInode->iparent;

	}
	free(fileInode);
}

void cdParent()
{
	PtrInode fileInode=(PtrInode)malloc(inodeSize);
	fseek(fp,superBlockSize+blockBitmapSize+inodeBitmapSize+currentDir*inodeSize,SEEK_SET);
	fread(fileInode,inodeSize,1,fp);
	currentDir=fileInode->iparent;

	free(fileInode);
}

void write(char *name)
{
	int fileInodeNum,i=0;
	char c;
	PtrInode fileInode=(PtrInode)malloc(inodeSize);
	if((fileInodeNum=findInodeNum(name,1))!=-1)
	{
		printf("This is a directory,not a file...\n");
		return;
	}

	fileInodeNum=findInodeNum(name,0);
	if(fileInodeNum==-1)
		printf("This is no %s file...\n",name);
	else
	{
		//get inode->blocknum
		fseek(fp,superBlockSize+blockBitmapSize+inodeBitmapSize+fileInodeNum*inodeSize,SEEK_SET);
		fread(fileInode,inodeSize,1,fp);
		//point to the block site
		fseek(fp,superBlockSize+blockBitmapSize+inodeBitmapSize+INODENUM*inodeSize+fileInode->blockNum*BLOCKSIZE,SEEK_SET);
		printf("please input file content(stop by #):\n");
		while((c=getchar())!='#')
		{
			fputc(c,fp);
			i++;
		}

		//update inode->length
		fseek(fp,superBlockSize+blockBitmapSize+inodeBitmapSize+fileInodeNum*inodeSize,SEEK_SET);
		fread(fileInode,inodeSize,1,fp);
		fileInode->length=i-1;
		fseek(fp,-inodeSize,SEEK_CUR);
		fwrite(fileInode,inodeSize,1,fp);
	}

	free(fileInode);

}

void read(char *name)
{
	int fileInodeNum;
	char c;
	PtrInode fileInode=(PtrInode)malloc(inodeSize);
	if((fileInodeNum=findInodeNum(name,1))!=-1)
	{
			printf("This is a directory,not a file...\n");
			return;
	}
	fileInodeNum=findInodeNum(name,0);
	if(fileInodeNum==-1)
		printf("This is no %s file...\n",name);
	else
	{
		//get inode->blocknum
		fseek(fp,superBlockSize+blockBitmapSize+inodeBitmapSize+fileInodeNum*inodeSize,SEEK_SET);
		fread(fileInode,inodeSize,1,fp);
		//point to the block site
		fseek(fp,superBlockSize+blockBitmapSize+inodeBitmapSize+INODENUM*inodeSize+fileInode->blockNum*BLOCKSIZE,SEEK_SET);

		//read content
		if(fileInode->length!=0)
		{
			while((c=fgetc(fp))!=EOF)
			{
				putchar(c);
			}
			printf("\n");
		}

	}

	free(fileInode);
}


void delete(char *name) 
/*delete 一個檔案,需要修改SuperBlock,Blockbitmap,Inodebitmap,並更新父節點長度,刪除父節點Block中儲存的該檔案fcb*/ 
{
	int fileInodeNum,i;
	PtrInode fileInode=(PtrInode)malloc(inodeSize);
	PtrInode parentInode=(PtrInode)malloc(inodeSize);
	Fcb fcb[20];
	if(((fileInodeNum=findInodeNum(name,0))==-1)&&((fileInodeNum=findInodeNum(name,1))==-1))
	{
		printf("This is no %s...\n",name);
	}
	else
	{
		if((fileInodeNum=findInodeNum(name,0))==-1)
		{
			fileInodeNum=findInodeNum(name,1);
		}

		fseek(fp,superBlockSize+blockBitmapSize+inodeBitmapSize+fileInodeNum*inodeSize,SEEK_SET);
		fread(fileInode,inodeSize,1,fp);

		fseek(fp,superBlockSize+blockBitmapSize+inodeBitmapSize+fileInode->iparent*inodeSize,SEEK_SET);
		fread(parentInode,inodeSize,1,fp);


		//update parent info
		fseek(fp,superBlockSize+blockBitmapSize+inodeBitmapSize+INODENUM*inodeSize+parentInode->blockNum*BLOCKSIZE,SEEK_SET);
		for(i=0;i<parentInode->length;i++)
		{
			fread(&fcb[i],fcbSize,1,fp);
				//fcb[i]=tmp;
		}

		fseek(fp,superBlockSize+blockBitmapSize+inodeBitmapSize+INODENUM*inodeSize+parentInode->blockNum*BLOCKSIZE,SEEK_SET);
		for(i=0;i<BLOCKSIZE;i++)
				fputc(0,fp);

		fseek(fp,superBlockSize+blockBitmapSize+inodeBitmapSize+INODENUM*inodeSize+parentInode->blockNum*BLOCKSIZE,SEEK_SET);
		for(i=0;i<parentInode->length;i++)
		{
			if((strcmp(fcb[i].fileName,name))!=0)
			{
					fwrite(&fcb[i],fcbSize,1,fp);
			}
		}

		parentInode->length-=1;
		fseek(fp,superBlockSize+blockBitmapSize+inodeBitmapSize+fileInode->iparent*inodeSize,SEEK_SET);
		fwrite(parentInode,inodeSize,1,fp);
		//update bitmap
		inodeBitmap[fileInodeNum]=0;
		blockBitmap[fileInode->blockNum]=0;

		//update superblock
		superBlock.blockFree+=1;
		superBlock.inodeFree+=1;
	}

	free(fileInode);
	free(parentInode);

}

void updateResource()
{
	rewind(fp);
	fwrite(&superBlock,superBlockSize,1,fp);
	fwrite(blockBitmap,blockBitmapSize,1,fp);
	fwrite(inodeBitmap,inodeBitmapSize,1,fp);
	fclose(fp);
}

void pathSet()
{
	PtrInode curInode=(PtrInode)malloc(inodeSize);
	fseek(fp,superBlockSize+blockBitmapSize+inodeBitmapSize+currentDir*inodeSize,SEEK_SET);
	fread(curInode,inodeSize,1,fp);
	printf("%
[email protected]
:%s#",curUser.userName,curInode->fileName); free(curInode); } void systemInfo() { printf("Sum of block number:%d\n",superBlock.blockNum); printf("Each block size:%d\n",superBlock.blockSize); printf("Free of block number:%d\n",superBlock.blockFree); printf("Sum of inode number:%d\n",superBlock.inodeNum); printf("Free of inode number:%d\n",superBlock.inodeFree); } void help() { printf("command: \n\ help --- show help menu \n\ sysinfo --- show system base information \n\ cls --- clear the screen \n\ cd --- change directory \n\ mkdir --- make directory \n\ touch --- create a new file \n\ cat --- read a file \n\ write --- write something to a file \n\ logout --- exit user \n\ rm --- delete a directory or a file \n\ exit --- exit this system\n"); } int analyse(char *str) { int i; char temp[20]; char *ptr_char; char *syscmd[]={"help","ls","cd","mkdir","touch","cat","write","rm","logout","exit","sysinfo","cls"}; argc = 0; for(i = 0, ptr_char = str; *ptr_char != '\0'; ptr_char++) { if(*ptr_char != ' ') { while(*ptr_char != ' ' && (*ptr_char != '\0')) temp[i++] = *ptr_char++; argv[argc] = (char *)malloc(i+1); strncpy(argv[argc], temp, i); argv[argc][i] = '\0'; argc++; i = 0; if(*ptr_char == '\0') break; } } if(argc != 0) { for(i = 0; (i < 12) && strcmp(argv[0], syscmd[i]); i++); return i; } else return 12; return 0; } void login() { char userName[10]; char passWord[10]; while(1) { printf("login:"); gets(userName); system("stty -echo"); printf("passwd:"); gets(passWord); system("stty echo"); printf("\n"); if(strcmp(userName,curUser.userName)==0&&strcmp(passWord,curUser.passWord)==0) break; } } void stopHandle(int sig) { printf("\nPlease wait...,update resource\n"); updateResource(); exit(0); } void command(void) { char cmd[20]; do { pathSet(); gets(cmd); switch(analyse(cmd)) { case 0: help(); break; case 1: list(); break; case 2: cd(argv[1]); break; case 3: createFile(argv[1],1); break; case 4: createFile(argv[1],0); break; case 5: read(argv[1]); break; case 6: write(argv[1]); break; case 7: delete(argv[1]); break; case 8: updateResource(); login(); openFileSystem(); command(); break; case 9: updateResource(); exit(0); break; case 10: systemInfo(); break; case 11: system("clear"); break; default: break; } }while(1); } int main(int argc,char **argv){ signal(SIGINT,stopHandle); login(); openFileSystem(); command(); return 0; }

相關推薦

unix檔案系統模擬作業系統課程設計

本週進行作業系統課程設計,在很多的題目中選了個unix檔案系統模擬,主要就是操作結構與檔案。 為了方便,檔案系統結構如下: Super block   --  Block bitmap  -- Inode bitmap  -- Inode table -- Block zo

作業系統課程設計 —— 模擬磁碟檔案系統實現 (Java)

這是我前段時間做了一個作業系統課程設計作業,使用java實現了命令列輸入對虛擬檔案進行管理。 下面是課程設計要求: 題目五  模擬磁碟檔案系統實現  一、課程設計目的  瞭解磁碟檔案系統的結構、功能和實現。並可練習合作完成系統的團隊精神和提高 程式設計能力。  二、小組人

杭州電子科技大學作業系統課程設計:簡單檔案系統的實現

emmmm想寫一個作業系統的課程設計說明,因為自己寫的時候也遇到了好多問題,外加感覺對實驗指導書的說明有些疑問,覺得寫出來可以給別人看看。但是感覺寫出來的東西……沒什麼好看的。 因為這個系統還是有點複雜,但是自己又沒有太多的時間和能力把這個複雜的系統說清楚

作業系統課程設計(一):linux核心編譯及新增系統呼叫

1.實驗目的 通過實驗,熟悉Linux作業系統的使用,掌握構建與啟動Linux核心的方法;掌握使用者程式如何利用系統呼叫與作業系統核心實現通訊的方法,加深對系統呼叫機制的理解;進一步掌握如何向作業系統核心增加新的系統呼叫的方法,以擴充套件作業系統的功能。 2.實

作業系統課程設計--磁碟排程演算法的模擬實現及對比

本來已經做好了個課程設計是銀行家演算法的,不過由於借給同學抄,被老師發現了,要重做...就選了磁碟高度演算法的題目。 實驗要求及提示 1 、首先假設磁碟磁軌數為 1500 ,磁頭初始停止於 0 磁軌。 2 、用隨機數生成函式產生“磁軌號”序列(即磁碟請求的位置),共產生

作業系統課程設計——頁式虛擬儲存系統設計

語言:C# 工具:VS2017 程式碼: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawi

簡單的檔案系統模擬C/C++(作業系統

一、目的與要求 目的 檔案系統是作業系統的一個重要組成部分,也是與使用者關係極為密切的部分。學生應獨立的用高階語言編寫和除錯一個簡單的檔案系統,模擬檔案管理的工作過程,從而對各種檔案操作命令的實質內容和執行過程有比較深入的瞭解,掌握它們的實施方法,加深對

關於 inode 瞭解 UNIX 檔案系統如何管理檔案

轉載:https://www.ibm.com/developerworks/cn/aix/library/au-speakingunix14/ 對話 UNIX 關於 inode 瞭解 UNIX 檔案系統如何管理檔案 Adam Cormany 2008 年 8 月 11 日釋出 i

作業系統課程設計(三):Linux程序管理

一、設計內容 實現一個模擬shell:編寫三個不同的程式:cmd1.c, cmd2.c, cmd3.c,每個程式輸出一句話,分別編譯成可執行檔案cmd1, cmd2, cmd3。然後再編寫一個程式,模擬shell程式的功能,能根據使用者輸入的字串(表示相應的命

關於 inode 瞭解 UNIX 檔案系統如何管理檔案

對話 UNIX 關於 inode 瞭解 UNIX 檔案系統如何管理檔案 Adam Cormany 2008 年 8 月 11 日釋出 inode 是 UNIX 作業系統中的一種資料結構,它包含了與檔案系統中各個檔案相關的一些重要資訊。在 UNIX 中建立檔案系

作業系統課程設計 Pintos 1 ALarm Clock 問題

問題描述: 實現linux中的thread.sleep()函式,其功能是讓呼叫他的執行緒睡眠一段時間(ticks),然後喚醒。 pintos 本身的sleep函式 void timer_sleep(int 64_t ticks){ Int 64_t start

檔案系統模擬實現java版

作業系統課程設計的內容: 編寫程式模擬一個簡單的檔案系統,具體實驗內容如下: (1)實現多級目錄結構,而非二級目錄結構。 (2)實現檔案和目錄的建立、刪除、重新命名和讀寫許可權控制功能。 (3)實現顯示檔案內容和更改檔案內容的功能。 (4)建立檔案或目錄時,採用動態申請的方式

作業系統課程設計完成了

終於弄好了課程設計,不過不是自己做的 二:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> 設計要求: 編寫一程式,可以建立若干個虛擬程序,並對若干個虛擬程序進

學生成績管理系統(資料結構課程設計

學生成績管理問題  問題描述:建立兩個學生成績資訊表1、2,以檔案的形式分別進行儲存命名為1.txt和2.txt,然後實現將兩個檔案合併成一個新的檔案3.txt。 新檔案中有補考的學生查詢到,儲存到另一個檔案4.txt中。     基本要求:    

Hadoop分散式檔案系統:HDFS架構和設計(3)

HDFS被設計成能夠在一個大叢集中跨機器可靠地儲存超大檔案。它將每個檔案儲存成一系列的資料塊,除了最後一個,所有的資料塊都是同樣大小的。為了容錯,檔案的所有資料塊都會有副本。每個檔案的資料塊大小和副本系數都是可配置的。應用程式可以指定某個檔案的副本數目。副本系數可以在檔案建立的時候指定,也可以在之後改變。

基於SpringMVC和Spring學生綜合考評系統應用,javaweb課程設計

**基於SpringMVC和Spring學生綜合考評系統應用,javaweb課程設計** 基於SpringMVC和Spring學生綜合考評系統應用mysql資料庫建立語句 基於SpringMVC和Spring學生綜合考評系統應用oracle資料庫建立語句 基於Spring

作業系統課程設計感受

歷時兩週的課程設計結束了,我把所有的感受都記錄在這裡。 課程設計剛開始的幾天,我處在乙型流感和病毒性皰疹的折磨之中,這時候,躺在病床上無法下手敲程式碼,不過因禍得福,我靜下心來做計劃,使用軟體工程中學到的設計方法一點一點的設計程式,那個時候我把所有的想法都記在了課程設計的一

Linux/Unix檔案系統索引節點淺析

索引節點,其英文為 Inode,是 Index Node 的縮寫。索引節點是整個 Linux 檔案系統的基礎。儲存於檔案系統上的任何檔案都可以用索引節點來表示。舉一個例子來說,假設有一個老圖書館裡面有一本登記簿,上面記錄著館內的書名及存放 位置,比如在哪一間的第幾排存放著哪

自己編寫UNIX檔案系統

近日有人求助,要寫一個UNIX檔案系統作為暑假作業。這種事情基本是學作業系統的必須要做的或者是做過的,畢竟檔案系統是作業系統課程的一個重要組成部分。要實現這個UNIX檔案系統,很多人就扎進了UNIX V6的的系統原始碼,以及《萊昂氏UNIX原始碼分析》和《返璞歸真:UNI

unix檔案系統

/ 根目錄bin  包含二進位制的可執行檔案boot 啟動系統的檔案dev、devices 裝置檔案export 遠端檔案系統home 使用者和其他賬戶的主目錄kernel  核心檔案lib 共享的庫檔案mnt 用於安裝其他的臨時檔案系統proc 包含所有標誌為檔案的程序,通