手机版

操作系统实验报告模板(13)

时间:2025-04-29   来源:未知    
字号:

这是操作系统课程中的四次实验最终报告,内包括进程通信实验,进程同步互斥实验,文件系统模拟实验和Linux shell操作。里面的程序都是我运行过的。

printf("%s 文件夹./n",dir->fcb[i].fname); } }

printf("\n该目录下共有 %d 个文本文件, %d 个文件夹/n/n",FileCount,DirCount);

printf("--------------------------------------------------------\n\n"); return 1; }

/*---------在当前目录下删除文件-----------*/

int delfile(char *name) {

int i,temp,j;

//确保当前目录下有该文件,并且记录下它的FCB下标

struct dirFile *dir; //当前目录的指针

if(current==2)

dir=&(osPoint->root); else

dir=(struct dirFile *)(osPoint->data [current-3]);

for(i=1;i<BlockFcbCount;i++) //查找该

文件 {

if(dir->fcb[i].type==GENERAL && strcmp(dir->fcb[i].fname,name)==0) { break; } }

if(i==BlockFcbCount) {

printf("当前目录下不存在该文件!\n"); return 0; } int k;

for(k=0;k<OPEN_MAX;k++) {

if((openlist->f [k].type = GENERAL)&&

(strcmp(openlist->f [k].fname,name)==0)) {

if(openlist->f[k].fatherBlockNum == current) { break; }

操作系统实验报告模板(13).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
×
二维码
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)