操作系统论文2

合集下载

有关计算机操作系统及应用的参考论文(2)

有关计算机操作系统及应用的参考论文(2)

有关计算机操作系统及应用的参考论文(2)有关计算机操作系统及应用的参考论文篇二《计算机操作系统探讨》摘要:21世纪是信息化时代,计算机的应用将更加广泛,为了更好的使用计算机,应该对操作系统基本了解,因此本文主要对操作系统的概念和发展史进行探讨,并对Windows,UNIX和Linux操作系统做了简单的介绍,使广大读者加深对计算机操作系统的理解。

关键词:计算机操作系统;Windows;UNIX;Linux中图分类号:TP316 文献标识码:A 文章编号:1674-7712 (2014) 04-0000-01当今现代,人们学习、生活等都已经不能离开计算机,计算机由硬件和软件组成,在计算机系统软件中最重要的软件就是操作系统。

操作系统如同指挥官一样,指挥着计算机里的所有部件,并指挥它们按照某个计划协同工作。

计算机系统越复杂,操作系统的作用和地位就越重要。

一、操作系统概述操作系统,负责管理计算机硬件资源和软件资源,并通过这种管理为用户提供服务,成为计算机和用户之间的接口。

操作系统的主要功能是:(1)处理机管理;(2)存储器管理;(3)文件管理;(4)设备管理;(5)用户接口。

基本上所有的操作系统都具有如下的特征:(1)并发性;(2)共享性;(3)虚拟性;(5)不确定性。

二、操作系统发展史操作系统的产生迄今已有70年的时间,最早期的操作系统诞生于20世纪50年代中期,只是简单的单道批处理操作系统;接着演变成了多道程序批处理系统,与此同时,实时操作系统也应运而生;最后伴随着微型机、多处理机和计算机网络的发展,与之相对应的微机OS、多处理机OS和网络OS也随之迅速发展。

(一)串行处理系统世界上最早的计算机诞生之时,并没有操作系统,当时程序员直接和硬件打交道,具体流程是:首先程序员将已经穿孔的纸带(或卡片)装入内存,接着通过控制台或开关启动程序运行,最后当程序全部运行完毕,取出纸带(或卡片)和运算结果。

该系统严重地降低了计算机资源的利用率,形成了所谓的人机矛盾。

Linux操作系统毕业论文(1)

Linux操作系统毕业论文(1)

Linux操作系统毕业论文(1)Linux操作系统毕业论文随着互联网的普及和计算机技术的不断发展,操作系统作为计算机系统的核心组件,起着举足轻重的作用。

Linux作为一种开源的操作系统,其优越的性能和灵活的定制性已经得到了广泛的认可。

本文将探讨Linux操作系统的特点、应用和发展趋势。

一、 Linux操作系统的特点1.开源性:Linux操作系统的源代码完全公开,任何人都可以浏览、修改、复制和分发。

这种开放性不仅激发了广大开发者的热情,同时也为用户提供了更高的安全性保障。

2.多用户支持:Linux操作系统支持多用户模式,能够同时为多个用户提供服务。

每个用户拥有独立的用户帐号和家目录,保证了每个用户之间的数据私密性。

3.多任务支持:Linux操作系统具有非常出色的多任务支持,能够同时执行多个应用程序。

这种特点不仅提高了系统的效率,同时也为用户提供了更好的用户体验。

4.安全性:Linux操作系统拥有严格的访问控制模式,能够对系统资源和用户数据实现精密的管理和控制。

对于病毒和黑客攻击等威胁,Linux操作系统的安全性也较高。

二、 Linux操作系统的应用1.网络服务器:Linux操作系统被广泛用于搭建各种网络服务器,如Web服务器、邮件服务器、FTP服务器等。

这种应用领域不仅适用于企事业单位,而且适用于个人和小型团队。

2.桌面系统:Linux已经成为了一种成熟的桌面操作系统,如Ubuntu、Fedora、Debian等。

这些操作系统拥有丰富的应用程序和界面,可以满足大部分用户的各种需求。

3.嵌入式系统:Linux能够为嵌入式应用领域提供强大的支持,如路由器、IP电话、数字电视机顶盒等。

这些领域对于空间、功耗、安全性等多方面的要求较高,而Linux正是能够满足这些要求的操作系统。

三、 Linux操作系统的发展趋势1.云计算:随着云计算的普及,Linux作为云计算最为流行的操作系统之一,将会受到更广泛的应用。

计算机操作系统论文

计算机操作系统论文

计算机操作系统论文计算机操作系统课程是计算机科学与技术专业的一门基础核心课程。

本课程从操作系统实现资源管理的管理的观点出发,阐述如何对计算机系统中的硬、软件资源进行管理。

下面是店铺给大家推荐的计算机操作系统论文,希望大家喜欢!计算机操作系统论文篇一《计算机操作系统课程教学改革探讨》摘要: 针对计算机操作系统课程在教学过程中学生总觉得抽象、难懂的问题,结合自己的教学经验,在教学内容方面提出了一些改进措施,并给出切实可行的、具体的实施办法。

Abstract: The author made some improvements and gave practical and concrete measures for the problems that students always feel abstract and difficult to understand in the teaching of computer operating system course, combining with his teaching experience in teaching.关键词: 计算机操作系统;教学改革;教学内容;教学方法Key words: computer operating system;teaching reform;teaching content;teaching methods0引言操作系统课程是计算机科学与技术专业的一门基础核心课程。

本课程从操作系统实现资源管理的管理的观点出发,阐述如何对计算机系统中的硬、软件资源进行管理,使计算机系统协调一致地、有效地为用户服务,充分发挥资源的使用效率,提高计算机系统的服务质量。

通过本课程的学习使学生掌握计算机操作系统的控制计算机硬件的基本原理以及设计方法和实现技术。

但该课程教学过程中普遍重点偏向操作系统原理的理论教学,而学生在没有学习该课程前对操作系统的认识只是在使用层面,使得学生在学习的过程中总觉得本课程所学内容与实际所用操作系统的偏差很大。

线程论文(计算机操作系统)

线程论文(计算机操作系统)

线程论文(计算机操作系统) 线程论文(计算机操作系统)1. 引言1.1 背景介绍1.2 研究目的1.3 论文结构2. 线程基础知识2.1 线程概念2.2 线程与进程的区别2.3 线程调度算法2.4 线程同步与互斥2.5 线程通信3. 多线程编程模型3.1 线程库介绍3.2 POSIX线程3.3 Java线程3.4 Windows线程4. 线程创建和销毁4.1 线程创建方法4.1.1 通过操作系统接口创建线程4.1.2 使用线程库创建线程4.2 线程销毁方法4.2.1 线程主动退出4.2.2 线程被动退出5. 线程同步与互斥5.1 互斥锁5.2 读写锁5.3 条件变量5.4 信号量5.5 屏障6. 线程调度6.1 抢占式调度与协同式调度6.2 进程调度策略6.2.1 先来先服务调度算法6.2.2 短作业优先调度算法6.2.3 优先级调度算法6.2.4 时间片轮转调度算法6.2.5 多级反馈队列调度算法7. 线程安全性7.1 线程安全性概述7.2 竞态条件7.3 原子操作7.4 临界区7.5 内存一致性问题8. 线程性能优化8.1 并发编程的性能瓶颈8.2 并发性优化技术8.2.1 减少锁的使用8.2.2 减少线程上下文切换8.2.3 提高数据局部性8.2.4 使用无锁数据结构8.3 常见的线程性能问题和解决方案9. 线程安全的设计与实现9.1 设计线程安全的接口9.2 使用锁进行线程安全的控制9.3 使用无锁数据结构实现线程安全附件:本文档涉及到的附件,请参阅附件部分。

法律名词及注释:1. 互斥锁:一种保护共享资源的机制,只能有一个线程拥有互斥锁,其他线程需要等待锁的释放才能访问该资源。

2. 读写锁:一种特殊的互斥锁,允许多个线程同时访问共享资源,但读操作和写操作不能同时进行。

3. 条件变量:一种线程间通信机制,用于在线程等待某个条件满足时暂停执行。

4. 信号量:一种用于控制多个线程对共享资源的访问的机制,可以用来实现线程同步与互斥。

linux操作系统课程论文

linux操作系统课程论文

Linux操作系统课程论文目录一、1.1什么是linux****************************************21.2Linux与其他操作系统有什么区***********************2二、Linux的安装******************************************3三、Linux的常用命令总结**********************************6四、X window系统总结*************************************9五、Linux常用工具的使用**********************************11六、Linux的NFS的使用***********************************15七、Linux Samba服务的使用*******************************19八、Linux OpenSSH与远程登录工具的使用********************23九、Linux系统管理与配置**********************************24十、Linux的脚本程序设计**********************************29一、什么是linux呢?简单地说,Linux是一套免费使用和自由传播的类Unix操作系统,它主要用于基于Intel x86系列CPU的计算机上。

这个系统是由世界各地的成千上万的程序员设计和实现的。

其目的是建立不受任何商品化软件的版权制约的、全世界都能自由使用的Unix兼容产品。

Linux的出现,最早开始于一位名叫Linus Torvalds 的计算机业余爱好者,当时他是芬兰赫尔辛基大学的学生。

他的目的是想设计一个代替Minix(是由一位名叫Andrew Tannebaum的计算机教授编写的一个操作系统示教程序)的操作系统,这个操作系统可用于386、486或奔腾处理器的个人计算机上,并且具有Unix操作系统的全部功能,因而开始了Linux雏形的设计。

毕业论文 安卓

毕业论文 安卓

毕业论文安卓安卓操作系统在移动设备领域的广泛应用,使得它成为了许多人毕业论文的研究对象。

本文将探讨安卓操作系统的发展历程、特点以及在毕业论文中的应用。

首先,我们来回顾一下安卓操作系统的发展历程。

安卓操作系统最初由安迪·鲁宾(Andy Rubin)等人于2003年创立,并于2005年被谷歌收购。

安卓的设计初衷是为智能手机提供一个开放的、可定制的操作系统。

随着智能手机市场的迅速发展,安卓迅速成为了全球最受欢迎的移动操作系统之一。

安卓操作系统的特点之一是开放性。

相比于其他操作系统,安卓允许用户自由选择应用程序和定制界面。

这种开放性为开发者提供了更大的创作空间,也为用户提供了更多的选择。

在毕业论文中,研究者可以通过分析安卓操作系统的开放性对用户体验、应用市场等方面进行深入研究。

另一个安卓操作系统的特点是多样性。

由于安卓操作系统的开放性,各个手机厂商可以根据自己的需求进行定制和优化。

这导致了市面上存在着各种不同的安卓手机,它们在硬件配置、界面设计等方面存在着差异。

在毕业论文中,研究者可以通过对不同安卓手机的比较研究,探讨其对用户体验和性能的影响。

此外,安卓操作系统还具有强大的生态系统。

谷歌为安卓提供了丰富的应用市场(Google Play)和开发者平台(Android Studio),使得开发者可以更加便捷地开发和发布应用程序。

这为毕业论文提供了研究的材料,例如,研究者可以通过分析应用市场的趋势和用户评论来研究应用程序的质量和用户满意度。

在毕业论文中,研究者可以从多个角度进行安卓操作系统的研究。

例如,他们可以通过用户调查和数据分析来研究安卓操作系统在用户群体中的普及程度和满意度。

另外,他们还可以通过开发安卓应用程序并进行实证研究,探讨安卓操作系统在特定领域中的应用潜力和优化方向。

总结起来,安卓操作系统作为一种广泛应用于移动设备的操作系统,具有开放性、多样性和强大的生态系统。

在毕业论文中,研究者可以通过对安卓操作系统的发展历程、特点以及应用领域的研究,为移动设备领域的发展提供有益的思考和建议。

OS操作系统论文

OS操作系统论文

《计算机操作系统》非MS-Win操作系统综述论文报告摘要手机操作系统一般只应用在高端智能化手机上。

目前,在智能手机市场上,中国市场仍以个人信息管理型手机为主,随着更多厂商的加入,整体市场的竞争已经开始呈现出分散化的态势。

从市场容量、竞争状态和应用状况上来看,整个市场仍处于启动阶段。

目前应用在手机上的操作系统主要有Palm OS、Symbian(塞班)、Windows mobile、Linux、Android(安卓)、iPhone(苹果)OS、Black Berry (黑莓)OS 6.0、Windows Phone 7(自Windows Phone7出现后,Windows Mobile系列正式退出手机系统市场)。

主流的智能手机有Google Android 和苹果的iOS 其次是三星的BaDa、WINDOWS Phone 、PALM 黑莓、(S60 UIQ)、LINUX 和非智能手机的操作系统也算不上真正意义的操作系统S40是诺基亚软件平台它的系统诺基亚并未命名至于三星LG等大多使用自己开发的非主流系统。

智能与非智能手机都支持JAVA ,智能机与非智能机的区别主要看能否基于系统平台的功能扩展,非JAVA应用平台。

还有就是支持多任务。

关键字:手机操作系统;智能;市场Abstract:Mobile phone operating system generally used only in high-end intelligent mobile phone. At present, in the smartphone market, the Chinese market still with personal information management type mobile phone is given priority to, with more and more manufacturers to join, and the overall market competition has begun to present a diversified situation. From market capacity, the competition status and application status of perspective, the market is still at the start stage. At present the application on the mobile Phone operating system mainly has Palm OS, Symbian (Sabina), Windows mobile, Linux, Android (result), iPhone (apple) OS, Black Berry (blackberry) OS 6.0, Windows Phone 7 (from Windows Phone7 appearing, Windows mobile Phone series formally out system market).The mainstream of smart phones have Google Android and apple's iOS followed by Samsung BaDa, WINDOWS Phone, PALM blackberry, (S60 UIQ), LINUX and the smart phone operating system is not the real meaning of the operating system S40 is nokia software platform it system did not named as for nokia Samsung LG mostly used his development of a mainstream system. Intelligence and the smart phones support JAVA, and the difference between the smart phone smart phone platform based on system can basically see the function expansion, the JAVA application platform. There is support multitasking.Key word: mobile phone operating system; Intelligent; market目录摘要 (2)一.智能手机操作系统概况 (5)1.智能手机操作系统的背景与意义: (5)2.智能手机操作系统的技术特点: (7)3.智能手机操作系统的性能: (10)4.智能手机操作系统的市场占有: (12)《报告称中国iOS设备数量达2100万部》 (12)《去年底iOS市场份额升至43% 与Android势均力敌》 (15)5.智能手机操作系统价格: (19)6.智能手机操作系统用户意见: (21)二.多款智能手机操作系统简介 (28)1.WINDOWS PHONE (28)2.ANDROID (31)3.IOS: (40)参考文献: (44)一.智能手机操作系统概况1.智能手机操作系统的背景与意义:随着移动多媒体时代的到来和3G无线通信的兴起,互联网的普及。

linux操作系统(论文)

linux操作系统(论文)

Linux操作系统1. 引言Linux操作系统是一种开源的、免费的操作系统,具有稳定性、高性能和安全性等优点,因此在计算机领域得到广泛应用。

本文将着重介绍Linux操作系统的历史、特点、架构以及在实际应用中的优势。

2. 历史2.1 Unix操作系统的起源Linux操作系统起源于Unix操作系统,Unix操作系统由Ken Thompson和Dennis Ritchie在20世纪70年代初开发。

Unix操作系统成为了多用户、多任务操作系统的鼻祖,为后来的操作系统提供了参考和灵感。

2.2 Linux的开发与诞生Linux操作系统的开发始于1991年,当时Linus Torvalds在芬兰赫尔辛基大学上学时开始对自己的个人计算机编写一个操作系统内核。

他将自己的操作系统命名为Linux,并在全球范围内开放源代码,吸引了大量开发者对其进行改进和贡献。

2.3 Linux的发展与应用随着Linux的不断发展,越来越多的人开始使用和推崇Linux操作系统。

Linux操作系统广泛应用于服务器、嵌入式系统、超级计算机等领域,在互联网时代的推动下,Linux形成了一个强大的生态系统。

3. 特点Linux操作系统具有以下主要特点:3.1 开源和免费Linux操作系统是开源的,用户可以自由获取、使用和修改其源代码。

这使得用户能够根据自己的需求对系统进行定制和优化,同时也使得Linux操作系统成为了一种免费的选择。

3.2 稳定性与可靠性由于开源特性和全球开发者的共同努力,Linux操作系统具有出色的稳定性和可靠性。

相比其他操作系统,Linux在长时间运行和高负载情况下表现更好,稳定性得到了业界的广泛认可。

3.3 高度可定制化Linux操作系统提供了丰富的命令行工具和配置选项,使得用户可以根据自己的需要对系统进行高度定制。

这种可定制性使得Linux操作系统适用于各种不同的场景和应用。

3.4 安全性由于开放源代码和许多安全性功能的内置,Linux操作系统被认为是相对较安全的操作系统之一。

操作系统发展的现状论文

操作系统发展的现状论文

操作系统发展的现状论文操作系统发展的现状操作系统是计算机系统中至关重要的组成部分,它负责管理计算机硬件和软件资源,并提供各种服务。

随着计算机技术的不断发展,操作系统也在不断演进和改进。

本论文将探讨操作系统发展的现状,并分析其趋势和未来发展方向。

一、发展历程操作系统的发展历史可以追溯到上世纪40年代。

早期的操作系统主要是为单台机器设计,随着计算机的发展,多用户和分布式计算成为主流,操作系统也逐渐演变为支持这些需求的形式。

二、目前的状态1. 多任务处理能力现代操作系统具备强大的多任务处理能力,可以同时运行多个程序,并在它们之间进行切换和调度。

这样可以最大程度地提高计算机的利用率,提高工作效率。

2. 图形用户界面图形用户界面(GUI)的出现进一步提升了操作系统的易用性和用户体验。

用户可以通过鼠标点击和拖放操作进行各种操作,而无需记忆复杂的命令和参数。

3. 多用户支持现代操作系统可以支持多用户同时访问计算机系统,每个用户都可以独立地运行程序和操作文件。

这为大型组织和企业提供了便利,提高了工作效率和资源利用率。

4. 虚拟内存管理操作系统通过虚拟内存管理技术,将物理内存与逻辑地址进行映射,使得每个进程都认为自己拥有独立的连续内存空间。

这样可以实现更高效的内存管理和资源利用。

5. 分布式计算随着互联网的普及和发展,分布式计算成为热门领域。

分布式操作系统可以将多台计算机连接起来,通过共享资源和协同处理,实现更强大的计算能力和可靠性。

三、发展趋势1. 虚拟化技术随着云计算和大数据时代的到来,虚拟化技术越来越重要。

操作系统需要支持虚拟机和容器等虚拟化技术,实现资源的灵活调度和管理,提高计算机系统的利用率和可扩展性。

2. 实时性和可靠性实时性和可靠性是一些特定领域(如工业控制、交通系统等)操作系统的重要要求。

将来的操作系统需要更好地支持实时任务的及时响应和可靠性保证。

3. 安全性随着网络攻击的不断增加,操作系统的安全性成为重要的关注点。

操作系统论文

操作系统论文

操作系统概述姓名:代成宁学号:0904013006 班级:09计本三班本学期我们学习了《计算机操作系统》这本书,通过一个学期的学习,使我对操作系统有了一个比较全面的理解,下面是我对操作系统的一些基本理解。

操作系统是统一管理计算机软、硬件资源,合理组织计算机的工作流程,协调系统部件之间,系统与用户之间、用户与用户之间的关系。

下面我对计算机操作系统的发展、特征、分类和功能分别做了简单的概述。

一、操作系统的发展1、手工操作阶段在这个阶段的计算机,主要元器件是电子管,运算速度慢,没有任何软件, 没有操作系统。

用户直接使用机器语言编写程序,上机时完全手工操作,首先准备好的程序纸带装入输入机,然后启动输入机把程序和数据送入计算机,接着通过开关启动程序运行,计算完成后,打印机输出结果。

用户必须是非常专业的技术人员才能实现对计算机的控制。

2、监控程序(早期批处理)阶段由于20世纪50年代中期,计算机的主要元器件由晶体管取代,运行速度有了很大的提高,这时软件也开始迅速发展,出现了早期的操作系统,这就是早期的对用户提交的程序进行管理的监控程序和批处理软件。

3、多道批处理系统阶段随着中、小规模的集成电路在计算机系统中的广泛应用,CPU的运动速度大大提高,为了提高CPU的利用率,引入了多道程序设计技术,并出现了专门支持多道程序的硬件机构,这一时期,为了进一步提高CPU的利用效率,出现了多道批处理系统、分时系统等等,从而产生了更加强大的监管程序,并迅速发展成为计算机科学中的一个重要分支,就是操作系统。

统称为传统操作系统。

4、现代操作系统阶段大规模、超大规模集成电路急速的迅速发展,出现了微处理器,使得计算机的体系结构更加优化,计算机的运行速度进一步提高,而体积却大大减少,面向个人的计算机和便携式计算机出现并普及。

它的最大优点是结构清晰、功能全面、可以适应多种用途的需要并且操作使用方面。

二、操作系统的基本特征1、并发。

并发是指多个事件在同一时间段内发生。

计算机操作系统英文论文

计算机操作系统英文论文

Introduction to the operating system of the new technology Abstract:the Operating System (Operating System, referred to as OS) is an important part of a computer System is an important part of the System software, it is responsible for managing the hardware and software resources of the computer System and the working process of the entire computer coordination between System components, systems and between users and the relationship between the user and the user. With the appearance of new technology of the operating system functions on the rise. Operating system as a standard suite must satisfy the needs of users as much as possible, so the system is expanding, function of increasing, and gradually formed from the development tools to system tools and applications of a platform environment. To meet the needs of users. In this paper, in view of the operating system in the core position in the development of computer and technological change has made an analysis of the function of computer operating system, development and classification of simple analysis and elaborationKey words: computer operating system, development,new technology Operating system is to manage all the computer system hardware resources include software and data resources; Control program is running; Improve the man-machine interface; Provide support for other application software, etc., all the computer system resourcesto maximize the role, to provide users with convenient, efficient, friendly service interface.The operating system is a management computer hardware and software resources program, is also the kernel of the computer system and the cornerstone. Operating system have such as management and configuration memory, decided to system resources supply and demand of priorities, control input and output devices, file system and other basic network operation and management affairs. Operating system is to manage all the computer system hardware resources include software and data resources; Control program is running; Improve the man-machine interface; Provide support for other application software, etc., all the computer system resources to maximize the role, to provide users with convenient, efficient, friendly service interface. Operating system is a huge management control procedures, including roughly five aspects of management functions, processes and processor management, operation management, storage management, equipment management, file management. At present the common operating system on microcomputer DOS, OS / 2, UNIX, XENIX, LINUX, Windows, Netware, etc. But all of the operating system with concurrency, sharing, four basic characteristics of virtual property and uncertainty. At present there are many different kinds of operating system, it is difficultto use a single standard unified classification. Divided according to the application field, can be divided into the desktop operating system, server operating system, the host operating system, embedded operating system.1.The basic introduction of the operating system(1)The features of the operating systemManagement of computer system hardware, software, data and other resources, as far as possible to reduce the work of the artificial allocation of resources and people to the machine's intervention, the computer automatically work efficiency into full play.Coordinate the relationship between and in the process of using various resources, make the computer's resources use reasonable scheduling, both low and high speed devices running with each other.To provide users with use of a computer system environment, easy to use parts of a computer system or function. Operating system, through its own procedures to by all the resources of the computer system provides the function of the abstract, the function of the formation and the equivalent of the operating system, and image, provide users with convenient to use the computer.(2)The development of the operating systemOperating system originally intended to provide a simple sorting ability to work, after updating for auxiliary more complex hardwarefacilities and gradual evolution.Starting from the first batch mode, also come time sharing mechanism, in the era of multiprocessor comes, the operating system also will add a multiprocessor coordination function, even the coordination function of distributed systems. The evolution of the other aspects also like this.On the other hand, on a personal computer, personal computer operating system of the road, following the growth of the big computer is becoming more and more complex in hardware, powerful, and practice in the past only large computer functions that it step by step.Manual operation stage. At this stage of the computer, the main components is tube, speed slow, no software, no operating system. User directly using a machine language program, hands-on completely manual operation, the first will be prepared machine program tape into the input, and then start the machine input the program and data into a computer, and then through the switch to start the program running and computing, after the completion of the printer output. The user must be very professional and technical personnel to achieve control of the computer.Batch processing stage. Due to the mid - 1950 - s, the main components replaced by the transistor computer, running speed hadthe very big enhancement, the software also began to develop rapidly, appeared in the early of the operating system, it is the early users to submit the application software for management and monitoring program of the batch.Multiprogramming system phase. As the medium and small-scale integrated circuit widely application in computer systems, the CPU speed is greatly increased, in order to improve the utilization rate of CPU and multiprogramming technology is introduced, and the special support multiprogramming hardware organization, during this period, in order to further improve the efficiency of CPU utilization, a multichannel batch system, time-sharing system, etc., to produce more powerful regulatory process, and quickly developed into an important branch of computer science, is the operating system. Collectively known as the traditional operating system.Modern operating systems. Large-scale, the rapid development of vlsi rapidly, a microprocessor, optimization of computer architecture, computer speed further improved, and the volume is greatly reduced, for personal computers and portable computer appeared and spread. Its the biggest advantage is clear structure, comprehensive functions, and can meet the needs of the many USES and operation aspects.2. New technology of the operating systemFrom the standpoint of the operating system of the new technology, it mainly includes the operating system structure design of the micro kernel technology and operating system software design of the object-oriented technology.(1) The microkernel operating system technologyA prominent thought in the design of modern operating systems is the operating system of the composition and function of more on a higher level to run (i.e., user mode), and leave a small kernel as far as possible, use it to complete the core of the operating system is the most basic function, according to the technology for micro kernel (Microkernel) technology.The microkernel structure(1) Those most basic, the most essential function of the operatingsystem reserved in the kernel(2)Move most of the functionality of the operating system intothe kernel, and each operating system functions exist in theform of a separate server process, and provide services.(3)In user space outside of the kernel including all operatingsystem, service process also includes the user's applicationprocess. Between these processes is the client/server mode.Micro kernel contains the main ingredient(1) Interrupt and the exception handling mechanism(2)Interprocess communication mechanisms(3)The processor scheduling mechanism(4)The basic mechanism of the service functionThe realization of the microkernelMicro kernel implementation "micro" is a major problem and performance requirements of comprehensive consideration. To do "micro" is the key to implementation mechanism and strategy, the concept of separation. Due to the micro kernel is the most important of news communication between processes and the interrupt processing mechanism, the following briefly describes the realization of both.Interprocess communication mechanismsCommunication service for the client and the server is one of the main functions of the micro kernel, is also the foundation of the kernel implement other services. Whether to send the request and the server reply messages are going through the kernel. Process of news communication is generally through the port (port). A process can have one or more ports, each port is actually a message queue or message buffer, they all have a unique port ID (port) and port authority table, the table is pointed out that this process can be interactive communications and which process. Ports ID and kernel power table maintenance.Interrupt processing mechanismMicro-kernel structure separation mechanism will interrupt and the interrupt processing, namely the interrupt mechanism on micro kernel, and put the interrupt handling in user space corresponding service process. Micro kernel interruption mechanism, is mainly responsible for the following work:(1) When an interrupt occurs to identify interrupt;(2) Put the interrupt signal interrupt data structure mapping tothe relevant process;(3) The interrupt is transformed into a message;(4) Send a message to the user space in the process of port, butthe kernel has nothing to do with any interrupt handling.(5) Interrupt handling is to use threads in a system.The advantages of the microkernel structure(1) Safe and reliableThe microkernel to reduce the complexity of the kernel, reduce the probability of failure, and increases the security of the system.(2) The consistency of the interfaceWhen required by the user process services, all based on message communication mode through the kernel to the server process. Therefore, process faces is a unified consistent processescommunication interface.(3) Scalability of the systemSystem scalability is strong, with the emergence of new hardware and software technology, only a few change to the kernel.(4) FlexibilityOperating system has a good modular structure, can independently modify module and can also be free to add and delete function, so the operating system can be tailored according to user's need.(5) CompatibilityMany systems all hope to be able to run on a variety of different processor platform, the micro kernel structure is relatively easy to implement.(6) Provides support for distributed systemsOperating under the microkernel structure system must adopt client/server mode. This model is suitable for distributed systems, can provide support for distributed systems.The main drawback of microkernelUnder the micro-kernel structure, a system service process need more patterns (between user mode and kernel mode conversion) and process address space of the switch, this increases costs, affected the speed of execution.3 .Object-oriented operating system technologyObject-oriented operating system refers to the operating system based on object model. At present, there have been many operating system used the object-oriented technology, such as Windows NT, etc. Object-oriented has become a new generation of an important symbol of the operating system.The core of object-oriented conceptsIs the basic idea of object-oriented to construct the system as a series of collections of objects. The object refers to a set of data and the data of some basic operation encapsulated together formed by an entity. The core of object-oriented concept includes the following aspects:(1) EncapsulationIn object-oriented encapsulation is the meaning of a data set and the data about the operation of the packaging together, form a dynamic entity, namely object. Encapsulated within the request object code and data to be protected.(2) InheritanceInheritance refers to some object can be inherited some features and characteristics of the object.(3) PolymorphismPolymorphism refers to a name a variety of semantics, or the same interface multiple implementations. Polymorphism inobject-oriented languages is implemented by overloading and virtual functions.(4) The messageNews is the way of mutual requests and mutual cooperation between objects. An object through the message to activate another object. The message typically contains a request object identification and information necessary to complete the work.Object-oriented operating systemIn object-oriented operating system, the object as a concurrent units, all system resources, including documents, process and memory blocks are considered to be an object, such as the operating system resources are all accomplished through the use of object services.The advantages of object-oriented operating system:(1)Can reduce operating system throughout its life period whena change is done to the influence of the system itself.For example, if the hardware has changed, will force the operating system also changes, in this case, as long as change the object representing the hardware resources and the operation of the object of service, and those who use only do not need to change the object code.(2)Operating system access to its resources and manipulation are consistent .Operating system to produce an event object, delete, and reference, and it produces reference, delete, and a process object using the same method, which is implemented by using a handle to the object. Handle to the object, refers to the process to a particular object table in the table.(3)Security measures to simplify the operating system.Because all the objects are the same way, so when someone tries to access an object, security operating system will step in and approved, regardless of what the object is.(4)Sharing resources between object for the process provides a convenient and consistent approach.Object handle is used to handle all types of objects. The operating system can by tracking an object, how many handle is opened to determine whether the object is still in use. When it is no longer used, the operating system can delete the object.ConclusionIn the past few decades of revolutionary changes have taken place in the operating system: technological innovation, the expansionof the user experience on the upgrade, application field and the improvement of function. As in the past few decades, over the next 20 years there will be huge changes in operating system. See we now use the operating system is very perfect. Believe that after the technology of the operating system will still continue to improve, will let you use the more convenient. Believe that the operating system in the future will make our life and work more colorful.。

有关计算机操作系统及应用的论文

有关计算机操作系统及应用的论文

有关计算机操作系统及应用的论文计算机操作系统是计算机中不可缺少的重要组成部分,是计算机的灵魂,没有操作系统,计算机的功能与价值就无法实现下面是店铺为大家整理的有关计算机操作系统及应用的论文,供大家参考。

有关计算机操作系统及应用的论文范文一:计算机操作系统的功能、发展及分类摘要:操作系统是统一管理计算机软件、硬件资源,合理组织计算机的工作流程,随着计算机技术的发展,人们对计算机的人性化、方便简洁提出了更高的要求,减少计算机占用的空间,缩小计算机的体积和重量,使计算机能更加方便地携带成为未来计算机发展的一个重要方向,以及嵌入式硬件技术的不断提高,使得越来越多的嵌入式产品需要嵌入式操作系统的支持。

关键词:计算机操作系统;发展;分类中图书分类号:TP316-4 文献标识码:A 文章编号:1006-8937(2012)32-0077-02操作系统是计算机系统中非常重要的部分。

对操作系统的研究与实现一直是计算机科学中挑战性和实用性完美结合的典范。

不同的计算机环境和不同的应用环境,需要不同的操作系统。

从个人计算机到大型计算机,从办公自动化到电子商务应用环境,从小型企业管理到大型企业的工业自动化控制,都需要有操作系统的支持。

操作系统的职责是管理计算机系统的硬件资源、软件资源,控制计算机的整个工作流程。

一方面,计算机系统结构和硬件技术的发展推动了操作系统的发展,因此而出现了多种形式、能够满足多种应用、资源利用效率不断提高的操作系统;另一方面,操作系统技术的不断发展又使得计算机的处理器、存储器等硬件资源的利用率得到了很大提高,能够不断满足用户方便、高效、快捷应用计算机的需求。

计算机系统由硬件和软件两部分组成。

对于这类操作系统相信用过电脑的人都不会陌生,这是全球最大的软件开发商——Microsoft(微软)公司开发的。

Microsoft公司的Windows系统在操作系统中占有绝对优势。

主流Windows系统都可以用在工作站中,如高Windows NT 4.0、Windows 9x/ME/XP、Windows 2000,以及最新的Windows 2003等。

计算机操作系统课程论文

计算机操作系统课程论文

计算机科学与技术系课程总结专业名称网络工程课程名称计算机操作系统项目名称操作系统与其进程和线程班级 12级网络工程2班学号 **********姓名白丽丽同组人员日期 2014年11月4日操作系统与其进程和线程白丽丽(1204032007)一、概述操作系统(Operating System,OS)是配置在计算机硬件上的第一层软件,是对硬件系统的首次扩充。

其主要作用是管理好这些设备,提高他们的利用率和系统吞吐量,并为用户和应用程序提供一份简单的借口,便于用户使用。

OS是现代计算机系统中最基本和最重要的系统软件,而其他的诸如编译程序、数据库管理系统等系统软件,以及大量的应用软件,都依赖于操作系统的支持,取得它所提供的服务。

事实上OS已成为现代计算机系统、多处理机系统、计算机网络中都必须配置的系统软件。

操作系统是管理计算机系统的全部硬件资源包括软件资源及数据资源;控制程序运行;改善人机界面;为其它应用软件提供支持等,使计算机系统所有资源最大限度地发挥作用,为用户提供方便的、有效的、友善的服务界面。

操作系统是一管理电脑硬件与软件资源的程序,同时也是计算机系统的内核与基石。

操作系统身负诸如管理与配置内存、决定系统资源供需的优先次序、控制输入与输出设备、操作网络与管理文件系统等基本事务。

操作系统是管理计算机系统的全部硬件资源包括软件资源及数据资源;控制程序运行;改善人机界面;为其它应用软件提供支持等,使计算机系统所有资源最大限度地发挥作用,为用户提供方便的、有效的、友善的服务界面。

操作系统是一个庞大的管理控制程序,大致包括5个方面的管理功能:进程与处理机管理、作业管理、存储管理、设备管理、文件管理。

目前微机上常见的操作系统有DOS、OS/2、UNIX、XENIX、LINUX、Windows、Netware等。

但所有的操作系统具有并发性、共享性、虚拟性和不确定性四个基本特征。

目前的操作系统种类繁多,很难用单一标准统一分类。

操作系统毕业论文

操作系统毕业论文

操作系统毕业论文操作系统毕业论文近年来,随着信息技术的飞速发展,操作系统作为计算机科学领域的核心技术之一,也逐渐引起了人们的关注。

作为一名即将毕业的学生,我选择了操作系统作为我的毕业论文主题。

本文将从操作系统的概念、发展历程、重要性以及未来发展方向等方面进行探讨。

首先,我们来了解一下操作系统的概念。

操作系统是计算机系统中的一个软件,它负责管理和控制计算机硬件资源,为用户和应用程序提供一个方便、高效、安全和可靠的工作环境。

操作系统通常包括进程管理、内存管理、文件系统、设备管理和用户接口等模块,通过这些模块的协调与管理,保证计算机系统的正常运行。

接下来,我们回顾一下操作系统的发展历程。

早期的计算机并没有操作系统,用户需要通过编程语言直接操作硬件,这给用户带来了很大的困扰。

随着计算机技术的不断进步,人们意识到需要一个软件来管理和控制计算机硬件资源,于是操作系统应运而生。

最早的操作系统是批处理操作系统,它允许用户一次性提交多个作业,由操作系统按照一定的算法进行调度执行。

随后,分时操作系统和实时操作系统相继出现,使得计算机能够同时为多个用户提供服务,并满足对实时性要求较高的应用场景。

操作系统在现代计算机系统中的重要性不言而喻。

首先,操作系统可以提供良好的用户体验。

通过友好的用户接口和高效的任务调度算法,操作系统可以使用户的操作更加简单、快捷、方便。

其次,操作系统可以有效管理计算机硬件资源。

通过合理的内存管理、进程管理和文件管理等机制,操作系统可以充分利用计算机硬件资源,提高计算机系统的性能。

此外,操作系统还可以保证计算机系统的安全性和可靠性,通过访问控制和错误处理等机制,防止恶意程序和硬件故障对系统造成损害。

未来,操作系统的发展方向仍然具有广阔的前景。

首先,随着人工智能和大数据技术的快速发展,操作系统需要更好地支持这些新兴技术的应用。

例如,操作系统可以通过智能调度算法来优化机器学习任务的执行效率,提高计算资源的利用率。

浅谈Linux操作系统的安全毕业论文

浅谈Linux操作系统的安全毕业论文

毕业设计(论文)题目: 浅谈linux操作系统的安全姓名学号专业系部指导教师目录第一章Linux操作系统概述 (1)1.1 Linux发展历史 (1)1.1.1 Linux的诞生和发展 (2)1.1.2 Linux名称的由来 (2)1.2 Linux的发展要素 (3)1.2.1 UNIX操作系统 (3)1.2.2 Minix操作系统 (4)1.2.3 POSIX 标准 (4)1.3 操作系统类型选择和内核版本的选择 (4)1.3.1 常见的不同公司发行的Linux异同 (5)1.3.2内核版本的选择 (9)1.4 Linux的系统架构 (10)1.4.1 Linux内核的主要模块 (10)1.4.2 Linux的文件结构 (12)1.5 GNU通用公共许可证 (13)第二章Linux与其他操作系统的比较 (15)2.1 Linux与UNIX的异同 (15)2.2 Linux和Windows的区别以及安全性的比较 (16)2.3 Linux与其他操作系统的区别 (18)2.4 Linux与其他系统的总体比较总结 (119)2.5 Linux与Windows根本比较—内核 (21)2.6 Linux的特性 (23)2.7 Linux与其他操作系统的区别 (25)第三章Linux的安全性能分析以及增强 (27)3.1 嵌入式Linux 的特点 (27)3.2 嵌入式Linux 现有安全机制及分析 (29)3.3 嵌入式Linux 安全缺陷 (31)3.4 小结 (33)结束语 (34)参考文献 (37)附录 (38)第一章Linux操作系统概述Linux系统是一个类似UNIX的操作系统,Linux系统是UNIX在微机上的完整实现。

UNIX操作系统是1969年由Ken Thompson 和Dennis Ritchie在美国贝尔实验室开发的一种操作系统。

由于其良好而稳定的性能迅速在计算机中得到广泛的应用,在随后几十年中也有了不断的改进。

计算机操作系统范文

计算机操作系统范文

计算机操作系统范文进程管理是操作系统的重要功能之一、当一个程序被执行时,操作系统会为其创建一个进程,这个进程拥有独立的内存空间,并由操作系统负责调度和管理。

进程管理包括创建和销毁进程、进程间的通信与同步、进程的调度和切换等。

通过进程管理,操作系统能够合理地分配计算机的资源,实现多任务的并发执行。

内存管理是操作系统的另一个重要功能。

计算机的内存资源是有限的,操作系统负责管理这些资源的分配和释放。

内存管理包括内存的分配与回收、内存的保护与共享、内存的虚拟化等。

通过内存管理,操作系统能够高效地利用内存资源,提供良好的运行环境和运行性能。

文件系统管理是操作系统的另一项核心功能。

文件系统管理负责管理计算机的存储介质,并为用户提供对文件的存储和访问功能。

文件系统管理包括文件的创建与删除、文件的读写与修改、文件的共享与保护等。

通过文件系统管理,操作系统能够提供良好的文件管理功能,方便用户进行数据的存储和管理。

设备管理是操作系统的另一个重要功能。

计算机的外部设备包括键盘、鼠标、显示器、打印机等,操作系统负责管理这些设备的访问和控制。

设备管理包括设备的初始化与关闭、设备的分配与回收、设备的驱动与中断处理等。

通过设备管理,操作系统能够提供友好的设备操作接口,方便用户进行设备的使用和管理。

除了以上的主要功能,计算机操作系统还具有其他重要的特性,如安全性、可靠性和可扩展性等。

安全性是指操作系统能够保护计算机的资源和用户的隐私安全。

操作系统通过访问控制、文件权限和密码保护等手段,保证计算机系统的安全性。

可靠性是指操作系统在面对硬件故障或软件错误时能够正常工作。

操作系统通过错误处理和容错机制,提高计算机系统的可靠性。

可扩展性是指操作系统能够根据需要进行升级和扩展。

操作系统通过模块化和插件机制,方便用户对系统进行定制和扩展。

计算机操作系统的发展经历了几个阶段。

最早的操作系统是单道批处理系统,只能处理一个任务,用户需要将任务提交给操作系统进行处理。

论文(linux操作系统与Windows操作系统的区别)

论文(linux操作系统与Windows操作系统的区别)

论文(linux操作系统与Windows操作系统的区别)论文:Linux操作系统与Windows操作系统的区别摘要:本文主要探讨了Linux操作系统与Windows操作系统之间的区别。

通过对比它们在架构、用户界面、用户权限、应用软件兼容性、性能等方面的差异,分析了它们在不同应用场景下的优缺点。

同时,还对两个操作系统的未来发展趋势进行了展望,为读者提供了深入了解和理解这两个操作系统的基础知识。

1、引言本章介绍了本文的研究背景和目的,并概述了Linux操作系统与Windows操作系统在计算机领域的重要性和普及度。

2、架构比较本章比较了Linux操作系统与Windows操作系统的架构,包括内核,文件系统,设备驱动程序等。

还介绍了两个操作系统的架构设计理念以及对系统资源的管理方式。

3、用户界面比较本章详细比较了Linux操作系统和Windows操作系统的用户界面,包括桌面环境、图形用户界面、命令行界面等方面。

探讨了它们在用户友好性、自定义性和易用性方面的差异。

4、用户权限比较本章分析了Linux操作系统与Windows操作系统的用户权限管理机制,包括用户身份验证、文件访问权限、管理员权限等。

对比了两个操作系统在安全性和权限管理方面的差异。

5、应用软件兼容性比较本章讨论了Linux操作系统与Windows操作系统的应用软件兼容性问题。

分析了两个操作系统对主流应用软件的支持情况,并探讨了其差异造成的用户体验和软件选择的影响。

6、性能比较本章比较了Linux操作系统与Windows操作系统在性能方面的差异。

主要探讨了它们在系统启动速度、资源利用率、响应时间等方面的表现,并给出了相应的测试数据和分析结果。

7、未来发展趋势本章对Linux操作系统和Windows操作系统的未来发展趋势进行了展望。

分析了它们在云计算、物联网、等新兴技术应用方面的发展前景,并讨论了它们可能的发展路径和策略。

结论:通过对Linux操作系统与Windows操作系统的全面比较和分析,我们可以看到它们在架构、用户界面、用户权限、应用软件兼容性和性能等方面都存在明显差异。

关于Linux操作系统设计研究毕业论文

关于Linux操作系统设计研究毕业论文

关于Linux操作系统设计研究毕业论文目录中文摘要 (1)ABSTRACT (2)第1章 Linux概述 (3)1.1 Linux操作系统的诞生和发行版 (3)1.1.1 Linux系统的诞生 (3)1.1.2 Linux 发行版 (3)1.2 Linux应用和特性 (4)1.2.1 linux 的应用 (4)1.2.2 linux 的特性 (4)第2章 Tiny210开发板 (6)2.1 Tiny210 简介 (6)2.2 Tiny210硬件配置 (6)2.3 软件支持 (7)第3章移植前准备 (8)3.1软件平台的搭建 (8)3.1.1 虚拟机的安装 (8)3.1.2 Red Hat linux 的安装 (8)3.1.3 软件包和源码包的准备和下载 (8)第4章 Linux 核 (9)第5章 RTC芯片 (10)5.1 RTC芯片简述 (10)5.2I2C总线简介 (10)第6章字符设备驱动相关知识 (11)6.1 模块机制 (11)6.2 字符设备开发基本步骤 (12)6.3 主设备号和次设备号 (12)6.4 实现字符驱动程序 (13)第7章 RTC驱动实现 (16)7.1 设计思路 (16)7.2 RTC程序实现 (16)7.2.1 RTC基本数据结构 (16)7.2.2注册字符设备 (16)7.2.3 定义操作函数 (17)7.2.4 函数声明 (18)7.3 编译生成.ko文件 (18)7.4 实际运行及结果 (18)第8章结论 (20)谢辞 (21)参考文献 (22)附录A RTC驱动程序 (23)附录B Makefile文件 (41)附录C 应用层测试程序 (41)第1章 Linux概述1.1 Linux操作系统的诞生和发行版1.1.1 Linux系统的诞生1981年IBM推出了微型计算机IBM PC。

在它推出的前10年,MS-DOS操作系统主宰了整个计算机操作系统界。

而在当时,计算机硬件的价格在不断下跌,但软件仍处于高位。

Linux操作系统论文(精选8篇) 2021

Linux操作系统论文(精选8篇) 2021

随着网络得不断发展,网络安全是我们应该时刻注意得问题。

Linux系统是类unix得网络操作系统,应用日益广泛,特别是在网络服务器方面,其安全性问题也逐渐突出,受到人们更多得关注。

下面是搜素整理得Linux操作系统论文8篇,供大家借鉴参考。

Linux操作系统论文第一篇:Linux操作系统组成及应用---------------------------------------------------------------------------------------------------------------------感谢使用本套资料,希望本套资料能带给您一些思维上的灵感和帮助,个人建议您可根据实际情况对内容做适当修改和调整,以符合您自己的风格,不太建议完全照抄照搬哦。

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------感谢使用本套资料,希望本套资料能带给您一些思维上得灵感和帮助,个人建议您可根据实际情况对内容做适当修改和调整,以符合您自己得风格,不太建议完全照抄照搬哦。

---------------------------------------------------------------------------------------------------------------------摘要:针对于Linux操作系统来说,需要对于该套系统得功能以及在实际当中得应用做出系统性得分析探讨,从而有效得提升该套系统在各个领域当中得应用,进而使其能够为社会上各个领域得发展做出更大得贡献。

学科教育论文30654 操作系统实践教学研究

学科教育论文30654 操作系统实践教学研究

学科教育论文操作系统实践教学研究操作系统是计算机专业的一门核心基础课,课程内容涉及理论、算法、技术、实现和应用,知识体系繁杂,概念和原理抽象,是一门理论性和实践性都很强的课程。

实验教学是“操作系统”必不可少的的环节,我们不仅要设置实验,而且要重视实验,使其很好的辅助我们的课堂教学。

实践教学的质量直接影响着学生的就业机会和工程实践能力[1]。

但目前,国内操作系统课程设置多偏向于理论学习,课程实验很少。

学生普遍反映,通过该门课程的学习,只能掌握一些抽象理论知识,不能深刻理解操作系统的核心,更不能解决一些实际问题。

中国和国外教学工作的差距主要体现在实践教学环节上,重视实验与实践教育是各国高等教育的发展潮流[2]。

1 实验教学现状及存在问题1.1 教师专业素质缺乏。

很多教师根本没有工程实践经验,对操作系统内核知识可能自己都没弄明白,所以教给学生的知识也就有限了。

1.2 操作系统的后续学习课程,比如:计算机网络、网络操作系统等,都是学生比较感兴趣的,所以学生在学习操作系统初都是非常认真的,主观上都有强烈的想学好该门课程的愿望,但是随着课程的日益深入,由于课程理论较深较抽象,课程特征不断显露,特别是该门课程的实验内容对前导课程(比如:数据结构,程序设计语言,计算机组成原理)的依赖很大,实验中打击了一部分学生学习热情,甚至有一部分学生因前导课程没有学好而放弃了操作系统实验的完成。

1.3 教学内容与实践内容脱节。

传统的操作系统教学中,侧重于操作系统理论知识和基本概念的讲解,同时又没有一个功能强大而逼真的操作系统实验教学环境,从而使理论教学和实践教学脱节。

1.4 开设了实验课的,课程实验只停留在验证性实验和模拟性实验,设计性实验、综合性实验很少或者没有,更谈不上项目设计、工程设计。

部分学校操作系统课时较少,只让学生了解操作系统用户界面、用户接口和操作实现方式,做一些观察性的实验[3];部分学校受师资、教学环境,学会素质与能力等方面的影响,操作系统实验室只是对一些具体的算法进行模拟实验,做一些模拟实验。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

一引言1.1实验的性质、目的和任务1.1.1性质操作系统是计算机专业的核心系统,此课程设计用于模拟操作系统的实现。

操作系统对计算机系统资源实施管理,是所有其他软件与计算机硬件的唯一接口,所有用户在使用计算机时都要得到操作系统提供的服务。

要掌握操作系统的基本概念、基本原理、设计方法和实现技术,具有初步分析实际操作系统的能力,为其今后在相关领域开展工作打下坚实的基础。

1.1.2任务模拟采用多道程序设计方法的单用户操作系统,该操作系统包括四部分内容:文件管理和用户接口、存储管理、设备管理、进程管理。

1.1.3目的通过模拟操作系统原理的实现,加深对操作系统工作原理和操作系统实现方法的理解;通过模拟操作系统原理的实现练习编程,进一步了解操作系统的实现方法;练习合作完成系统的团队精神和提高程序设计能力。

1.2实验要求和实验意义实现对操作系统的模拟,具体是在采用文件分配表的基础上实现单用户的磁盘文件管理部分和用户接口;加深对操作系统的工作原理和实现方式的理解,提高动手实践的能力。

1.3论文结构安排本论文主要内容:引言、系统分析与设计、系统实现、结束语、参考文献。

二系统分析与设计2.1系统要求模拟采用多道程序设计方法的单用户操作系统,该操作系统包括四部分内容:文件管理和用户接口、存储管理、设备管理、进程管理。

2.2主要模块2.2.1文件模块2.2.1.1文件模块的定义文件是在逻辑上具有完整意义的信息组合,它有一个名字做标识符。

一个文件必须要有一个文件名,用户利用文件名来访问文件。

文件名通常由一串字符构成,名字的长度因系统而异。

文件系统具有5大功能:完成文件存储空间的管理,实现文件名到物理地址的映射,实现文件和目录的操作管理,提供文件共享能力和安全可靠措施,文件系统向用户提供了有关文件和目录操作的接口。

2.2.1.2文件的逻辑结构文件的逻辑结构采用流式结构,流式文件指文件内的数据不再组成记录,只是一串的信息组合,字符是构成文件的基本单位,这种文件常常按长度来读取所需信息。

文件的内容均采用文本文件,系统中有两种文件:一种是存放任意字符的文件;一种是可执行文件:可执行文件的内容就是系统内进程的程序体。

2.2.1.3文件的物理结构实验中采用显示链接的物理文件结构,把磁盘中每一块的指针部分提出来,组织在一起,形成文件分配表(FAT表)。

一个磁盘仅设置一张文件分配表,磁盘有多少块,文件分配表就有多少项,若文件的一个磁盘块号为i,则这个文件的下一个磁盘的块号应该记录在文件分配表的第i项。

2.2.1.4磁盘模拟用一个文件C模拟磁盘,磁盘的每个盘块64字节,模拟磁盘共有128块。

第0,1块存放文件分配表,第2块存放根目录,其余存放子目录和文件。

2.2.1.5目录结构目录结构采用树形目录结构。

目录项内容(8个字节)目录名,文件名:2个字节;扩展名:2个字节(目录没有扩展名)。

目录,文件属性:1字节;起始盘块号:1个字节;文件长度:2个字节;●根目录根目录位置固定,为磁盘第2块;大小固定,共8项,占用模拟磁盘第2块。

●子目录位置不固定,大小不固定。

2.2.2用户接口●创建文件:create 文件名建立新文件,如果原来存在同名文件要提示是否覆盖。

●拷贝文件:copy 源文件名目标文件名当用户需要拷贝一些文件时,首先要先找到该文件,可同名拷贝,也可更名拷贝。

●删除文件: delete 文件名●显示文件: type 文件名仅显示文件内容。

●编辑文件: edit 文件名此命令完成对文件的编辑,只读文件不可以修改。

●改变文件属性: change 文件名属性将文件在只读和非只读、隐藏和非隐藏之间转换。

●磁盘格式化: format 盘符●建立目录: makdir 目录建立目录,若同名目录存在则建立失败。

●改变目录路径: chadir目录改变当前目录。

●删除空目录: rdir 目录当前目录、非空目录、根目录不能删除。

●删除目录: deldir 目录既可删除空目录又可删除非空目录,对于非空目录,首先要删除其下文件和目录然后才能删除其本身。

2.2.3屏幕显示屏幕显示要求包括:●用户命令接口,用于系统运行时用户输入命令;●磁盘目录显示,要求显示磁盘的树型目录结构;●磁盘使用情况,显示磁盘每一个磁盘块的空间是否空闲。

第三章系统实现3.1文件模块3.1.1创建FAT表这一部分主要实现FAT表的定义和初始化,代码如下:public class FAT{public byte[] fblock = new byte[128]; //FAT一共128项public byte leave = 125; //剩余空闲盘块数量public FAT() //构造函数{fblock[0] = fblock[1] = fblock[2] = 255;for (int i = 3; i < 128; i++)fblock[i] = 0;}public byte allempty() //空闲盘块数量{byte num = new byte();for (int i = 0; i < 128; i++)if (fblock[i] == 0)num++;return num;}public byte former(byte num) //查找第一个盘块{if (fblock[num] == 0)return 0; //此盘块为空byte pir = pirorblock(num);for (; pir != num; pir = pirorblock(pir)) //若num的前一个块号为它本身,则num为首块号num = pir;return num;}public byte last(byte num) //查找该块的最后一个块号{byte next = nextblock(num);for (; next != num; next = nextblock(next)) //无后续盘块时返回为0num = next;return num;}public byte pirorblock(byte num) //查找该块的前一个块号{if (fblock[num] == 0)return 0; //此盘块为空else if (fblock[num] == 255)return num; //单独存放一个盘块,为第一个盘块for (byte i = 3; i < 128; i++)if (fblock[i] == num)return i;return 255; //没找到}public byte nextblock(byte num) //查找该块的下一个块号{if (fblock[num] != 255)return fblock[num];elsereturn num; //该块为最后一块}public byte numall(byte num){byte i = 1;byte next = nextblock(num);for (; next != num; num = next, next = nextblock(next))i++;return i;}public bool add(byte block){byte b = last(block);byte n;if (findempty() == 0){MessageBox.Show("磁盘空间不够");return false;}else{n = findempty();fblock[b] = n;fblock[n] = 255;return true;}}public byte dirshenqing(){if (leave == 0){MessageBox.Show("磁盘空间不够");return 255; //剩余数目不够}byte b = findempty();fblock[b] = 255;leave--;return b;}public byte shenqing(int length) //根据文件长度申请盘块{byte n = Convert.ToByte(Math.Ceiling((double)(length / (double)64))); //共需多少盘块if (n > leave){MessageBox.Show("磁盘空间不够");return 255; //剩余数目不够}else{byte b = new byte();byte bb = new byte();b = findempty();fblock[b] = 255;for (int i = 0; i < n - 1; i++){bb = findempty();fblock[bb] = b;b = bb;}leave = Convert.ToByte(leave - n);return b; //首块号}}public bool huishou(byte block) //回收盘块{if (block > 2 && block <= 127){byte b = block;byte bb = block;byte i = 0;while (fblock[b] != 255){bb = fblock[b];fblock[b] = 0;b = bb;i++;}fblock[b] = 0;leave = Convert.ToByte(leave + i + 1); //剩余盘块量增加return true;}else{return false;}}}3.1.2磁盘模拟这一部分主要实现磁盘的组织情况,代码如下public void initdisk(){for (int i = 0; i < 128; i++){picture[i] = new PictureBox();picture[i].Location = new Point(6 + 22 * (i % 16), 20 + 18 * (i / 16));picture[i].Size = new Size(16, 12);if (file1.disk.fat.fblock[i] != 0)picture[i].BackColor = Color.Lime;elsepicture[i].BackColor = Color.White;this.groupBox3.Controls.Add(picture[i]);}}public void showdisk(){for (int i = 0; i < 128; i++){picture[i].Location = new Point(6 + 22 * (i % 16), 20 + 18 * (i / 16));picture[i].Size = new Size(16, 12);if (file1.disk.fat.fblock[i] != 0)picture[i].BackColor = Color.Lime;elsepicture[i].BackColor = Color.White;this.groupBox3.Controls.Add(picture[i]);}}3.1.3利用窗体实现文件的操作●创建txt文件private void文件ToolStripMenuItem_Click(object sender, EventArgs e) {creatnamelen cnl = new creatnamelen();cnl.ShowDialog();string str = ;byte len = Convert.ToByte(str.Length);if (len == 0)return;if (len > 3){MessageBox.Show("输入长度超过三个字符,只取前三个");str = str.Remove(3, len - 3);}string fullname = treeView1.SelectedNode.FullPath;str += "." + "tx";fullname += "\\" + str;bool a = file1.create(fullname);if (a == true){TreeNode now = treeView1.SelectedNode;TreeNode newnode = new TreeNode();newnode.Text = str;newnode.SelectedImageIndex = 3;newnode.ImageIndex = 3;now.Nodes.Add(newnode);showdisk();}●创建可执行文件private void可执行文件ToolStripMenuItem_Click(object sender, EventArgs e) {creatnamelen cnl = new creatnamelen();cnl.ShowDialog();string str = ;byte len = Convert.ToByte(str.Length);if (len == 0)return;if (len > 3){MessageBox.Show("输入长度超过三个字符,只取前三个");str = str.Remove(3, len - 3);}string fullname = treeView1.SelectedNode.FullPath;str += "." + "ex";fullname += "\\" + str + "." + "ex";bool a = file1.create(fullname);if (a == true){TreeNode now = treeView1.SelectedNode;TreeNode newnode = new TreeNode();newnode.Text = str;newnode.SelectedImageIndex = 1;newnode.ImageIndex = 1;now.Nodes.Add(newnode);}showdisk();}●显示文件private void显示文件ToolStripMenuItem_Click(object sender, EventArgs e) {string fullname = treeView1.SelectedNode.FullPath;TreeNode now = treeView1.SelectedNode;if (now.ImageIndex != 1 && now.ImageIndex != 3){MessageBox.Show("不是文件,不能显示");return;}file1.show(fullname, 0);showdisk();}●编辑文件private void编辑文件ToolStripMenuItem_Click(object sender, EventArgs e) {string fullname = treeView1.SelectedNode.FullPath;TreeNode now = treeView1.SelectedNode;if (now.ImageIndex != 1 && now.ImageIndex != 3){MessageBox.Show("不是文件,不能编辑");return;}file1.edit(fullname);showdisk();}●改变属性private void改变属性ToolStripMenuItem_Click(object sender, EventArgs e) {string fullname = treeView1.SelectedNode.FullPath;TreeNode now = treeView1.SelectedNode;if (now.ImageIndex != 1 && now.ImageIndex != 3){MessageBox.Show("不是文件,不能改变");return;}changeexten ct = new changeexten();ct.ShowDialog();string ex = ct.extension;bool a = file1.changefile(fullname, ex);if (a == true){string name = now.Text;now.Text = name.Substring(0, 4) + ex;if (ex == "ex"){now.ImageIndex = 1;now.SelectedImageIndex = 1;}else{now.ImageIndex = 3;now.SelectedImageIndex = 3;}}showdisk();}●运行可执行文件private void运行ToolStripMenuItem_Click(object sender, EventArgs e) {TreeNode now = treeView1.SelectedNode;if (now.ImageIndex != 1){MessageBox.Show("不是可执行文件,不能运行");return;}string fullname = now.FullPath;string str = file1.show(fullname, 0);creat(str.Length ,str );}●删除文件private void文件ToolStripMenuItem1_Click(object sender, EventArgs e) {TreeNode del = treeView1.SelectedNode;string fullname = "";fullname = del.FullPath;string str = "";for (int i = 0; i < del.Text.Length; i++){char[] nchar = del.Text.ToCharArray();if (nchar[i] != '\0')str += nchar[i].ToString();elsebreak;}treeView1.Nodes.Remove(del);file1.dirdelete(fullname);showdisk();}●拷贝文件private void复制ToolStripMenuItem_Click(object sender, EventArgs e) {fufrom = treeView1.SelectedNode;if (fufrom.ImageIndex != 1 && fufrom.ImageIndex != 3){MessageBox.Show("不是文件,不能复制");return;}fuzhi = fufrom.FullPath;}private void粘贴ToolStripMenuItem_Click(object sender, EventArgs e) {TreeNode now = treeView1.SelectedNode;string b = now.FullPath;string to = "";for (int i = 0; i < b.Length; i++){char[] nchar = b.ToCharArray();if (nchar[i] != '\0')to += nchar[i].ToString();elsebreak;}if (fuzhi != " "){bool a = file1.copyfile(fuzhi, to);if (a == true){TreeNode newnode = new TreeNode();newnode.Text = fufrom.Text;newnode.ImageIndex = fufrom.ImageIndex;newnode.SelectedImageIndex = fufrom.SelectedImageIndex;now.Nodes.Add(newnode);}}else if (cut != " "){if (cutnode == now)return;bool a = file1.copyfile(cut, to);file1.filedelete(cut);if (a == true){TreeNode newnode = new TreeNode();newnode.Text = cutnode.Text;newnode.ImageIndex = cutnode.ImageIndex;newnode.SelectedImageIndex = cutnode.SelectedImageIndex;now.Nodes.Add(newnode);}cut = " ";}showdisk();}3.2用户接口模块3.2.1创建文件图3-1创建文件的流程图public bool create(string fullname){byte d;byte m;byte cur;int len; //文件长度string filecontent; //文件内容byte num = 0; //文件所需块数byte[] nbyte;byte[] buffer1 = new byte[64]; //存放一个盘块中内容byte b = finddir(fullname); //文件所在根目录string[] strpat = splitfullname(fullname);string pathname = "";for (int i = 0; i < strpat.Length - 2; i++)pathname += strpat[i] + "\\";pathname += strpat[strpat.Length - 2];string[] str = splitfullname(fullname); // 文件路径名分段byte roadlen = Convert.ToByte(str.Length); //路径名长度string[] name = str[roadlen - 1].Split('.')//划分文件名和扩展名if (pare(name[1], "ex") != 0 && pare(name[1], "tx") != 0) {MessageBox.Show("文件扩展名错误");return false;}char[] nchar = new char[3]; //存放文件名char[] nchar1 = new char[2]; //存放扩展名byte[] f = empty(b); //根目录是否已满if (filechongming(fullname) != 255){MessageBox.Show("文件重名");return false;}if (f[0] == 255 && b == 2) //在根目录中插入{MessageBox.Show("根目录中已满,不能创建文件");return false;}else if (f[0] != 255) //255为此块盘已满,disk.readblock(f[0], 64);disk.rootdir.set(disk.buffer); //文件存放根目录内容nchar = name[0].ToCharArray(); //存放文件名nchar1 = name[1].ToCharArray();for (int i = 0; i < nchar.Length; i++)disk.rootdir.root[f[1]].filename[i] = Convert.ToByte(nchar[i]);for (int i = 0; i < 2; i++)disk.rootdir.root[f[1]].extension[i] = Convert.ToByte(nchar1[i]);if (name[1] == "ex")disk.rootdir.root[f[1]].dirORfile = 1;elsedisk.rootdir.root[f[1]].dirORfile = 2;createfile cf = new createfile();cf.ShowDialog();len = cf.length;filecontent = cf.str;num = Convert.ToByte(Math.Ceiling((double)(len / (double)64)));//文件所需盘块数m = disk.fat.shenqing(len);disk.writefat();if (m == 255) //磁盘空间不够,放不下此文件{return false;}disk.rootdir.root[f[1]].startblock = m;disk.rootdir.root[f[1]].length = Convert.ToByte(len);disk.buffer = disk.rootdir.get();disk.writein(f[0], 64);nbyte = disk.fat.findall(m); //所有盘块string str1;char[] fileneirong = new char[64];for (byte i = 0; i < num; i++){if (i == num - 1){str1 = filecontent.Substring(i * 64, len - 64 * (num - 1));fileneirong = str1.ToCharArray();for (int j = 0; j < fileneirong.Length; j++)disk.buffer[j] = Convert.ToByte(fileneirong[j]);disk.writein(nbyte[i], Convert.ToByte(len - 64 * (num - 1)));}else{str1 = filecontent.Substring(i * 64, 64);fileneirong = str1.ToCharArray();for (int j = 0; j < 64; j++)disk.buffer[j] = Convert.ToByte(fileneirong[j]);disk.writein(nbyte[i], 64);}}return true;}}3.2.2拷贝文件public bool copyfile(string from, string to){string[] fromstr = splitfullname(from); //源文件路径分解byte strlen = Convert.ToByte(fromstr.Length); //路径名长度string[] fromname = fromstr[strlen - 1].Split('.'); //划分文件名和扩展名string[] tostr = splitfullname(to); //复制文件路径分解;string toroot = tostr[tostr.Length - 1];byte dirstart = dirchongming(to); //目标目录所在盘块disk.readblock(dirstart, 64); //文件目录所在盘块disk.rootdir.set(disk.buffer);dirstart = disk.rootdir.filefindfat(toroot, 0);string strfull = show(from, 1); //源文件内容int len = strfull.Length; //文件长度string filecontent = strfull; //文件内容byte num = Convert.ToByte(Math.Ceiling((double)(len / (double)64)));//文件所需盘块数byte[] nbyte;byte[] buffer1 = new byte[64]; //存放一个盘块中内容byte m; //申请到的首盘块byte d;if (dirstart == 255){MessageBox.Show("路径错误");return false;}string tofullname = to + "\\" + fromstr[strlen - 1];byte tochong = filechongming(tofullname);if (tochong != 255){DialogResult r = MessageBox.Show("已存在此文件,是否覆盖", "粘贴", MessageBoxButtons.YesNo);if (r == DialogResult.No) //已存在此文件,不覆盖,不做操作{return false;}else//覆盖,将原来的删除,再新建filedelete(tofullname);}char[] nchar = fromname[0].ToCharArray(); //存放文件名char[] nchar1 = fromname[1].ToCharArray(); //存放扩展名byte[] f = empty(dirstart); //根目录是否已满,若满,则链接一个新盘块disk.readblock(f[0], 64);disk.rootdir.set(disk.buffer); //文件存放根目录内容if (f[0] == 255 && dirstart == 2) //在根目录中插入{MessageBox.Show("根目录中已满,不能创建文件");return false;}else if (f[0] != 255) //255为此块盘已满{for (int i = 0; i < 3; i++)disk.rootdir.root[f[1]].filename[i] = Convert.ToByte(nchar[i]);for (int i = 0; i < 2; i++)disk.rootdir.root[f[1]].extension[i] = Convert.ToByte(nchar1[i]);if (fromname[1] == "ex")disk.rootdir.root[f[1]].dirORfile = 1;elsedisk.rootdir.root[f[1]].dirORfile = 2;m = disk.fat.shenqing(len);disk.writefat();if (m == 255) //磁盘空间不够,放不下此文件{return false;}disk.rootdir.root[f[1]].startblock = m;disk.rootdir.root[f[1]].length = Convert.ToByte(len);disk.buffer = disk.rootdir.get();disk.writein(f[0], 64);nbyte = disk.fat.findall(m); //所有盘块string str1;char[] fileneirong = new char[64];for (byte i = 0; i < num; i++){if (i == num - 1){str1 = filecontent.Substring(i * 64, len - 64 * (num - 1));fileneirong = str1.ToCharArray();for (int j = 0; j < fileneirong.Length; j++)disk.buffer[j] = Convert.ToByte(fileneirong[j]);disk.writein(nbyte[i], Convert.ToByte(len - 64 * (num - 1)));}else{str1 = filecontent.Substring(i * 64, 64);fileneirong = str1.ToCharArray();for (int j = 0; j < 64; j++)disk.buffer[j] = Convert.ToByte(fileneirong[j]);disk.writein(nbyte[i], 64);}}return true;}3.2.3删除文件图3-3删除文件的流程图public bool filedelete(string fullname){byte b = filechongming(fullname);if (b == 255)return false;disk.readblock(b, 64);disk.rootdir.set(disk.buffer);string[] str = splitfullname(fullname); // 文件路径名分段byte strlen = Convert.ToByte(str.Length); //路径名长度string[] name = str[strlen - 1].Split('.')//划分文件名和扩展名byte attribute = new byte();if (name[1] == "ex")attribute = 1;elseattribute = 2;if (name[1] != "ex" && name[1] != "tx"){MessageBox.Show("文件扩展名错误");return false;}byte start = disk.rootdir.filefindfat(name[0], attribute);byte site = disk.rootdir.filesite(name[0], attribute);disk.fat.huishou(start);disk.rootdir.root[site].dirORfile = 3;for (int i = 0; i < 3; i++)disk.rootdir.root[site].filename[i] = 0;for (int i = 0; i < 2; i++)disk.rootdir.root[site].extension[i] = 0;disk.rootdir.root[site].startblock = disk.rootdir.root[site].length = 0;disk.writefat();disk.buffer = disk.rootdir.get();disk.writein(b, 64);return true;}3.2.4磁盘格式化图3-4 磁盘格式化是的流程图这一部分实现磁盘格式化,代码如下:public void format(){DialogResult r = MessageBox.Show("确实要格式化吗?", "格式化", MessageBoxButtons.YesNo);byte[] nbyte = new byte[64];if (r == DialogResult.Yes){nbyte[0] = nbyte[1] = nbyte[2] = 255;for (int i = 3; i < 64; i++)nbyte[i] = 0;disk.buffer = nbyte;disk.writein(0, 64);for (int i = 0; i < 64; i++)nbyte[i] = 0;disk.buffer = nbyte;disk.writein(1, 64);for (byte i = 2; i < 128; i++){for (int j = 0; j < 64; j++)nbyte[j] = 0;for (int j = 5; j < 64; j = j + 8)nbyte[j] = 3;disk.buffer = nbyte;disk.writein(i, 64);}setfat();}}3.2.5改变文件属性图3-5 改变文件属性的流程图这一部分实现改变文件属性,主要代码如下:public bool changefile(string fullname, string extention){byte b = filechongming(fullname);if (b == 255)return false;string[] str = splitfullname(fullname);byte roadlen = Convert.ToByte(str.Length); //路径名长度string[] name = str[roadlen - 1].Split('.');//划分文件名和扩展名disk.readblock(b, 64);disk.rootdir.set(disk.buffer);byte attribute;if (extention == "ex" || extention == "tx"){if (name[1] == "ex")attribute = 1;elseattribute = 2;char[] nc = new char[2];nc = extention.ToCharArray();byte site = disk.rootdir.filesite(name[0], attribute);for (int i = 0; i < 2; i++)disk.rootdir.root[site].extension[i] = Convert.ToByte(nc[i]);if (extention == "ex")disk.rootdir.root[site].dirORfile = 1;elsedisk.rootdir.root[site].dirORfile = 2;disk.buffer = disk.rootdir.get();disk.writein(b, 64);return true;}return false;}}3.2.6显示文件图3-6 显示文件的流程图这一部分主要实现文件的显示,代码如下:public string show(string fullname, int m){ string[] str = splitfullname(fullname);byte strlen = Convert.ToByte(str.Length); //路径名长度string[] name = str[strlen - 1].Split('.'); //划分文件名和扩展名string fileneirong = "";if (name[1] != "ex" && name[1] != "tx"){MessageBox.Show("不能显示");return fileneirong;}byte b = filechongming(fullname);if (b == 255){MessageBox.Show("不存在此文件,不能显示");return fileneirong;}disk.readblock(b, 64);disk.rootdir.set(disk.buffer);byte attribute = new byte();if (name[1] == "ex")attribute = 1;elseattribute = 2;byte start = disk.rootdir.filefindfat(name[0], attribute);byte site = disk.rootdir.filesite(name[0], attribute);byte len = disk.rootdir.root[site].length;byte[] nbyte = disk.fat.findall(start);for (int i = 0; i < nbyte.Length; i++){UTF8Encoding nnn = new UTF8Encoding();if (i != nbyte.Length - 1){disk.readblock(nbyte[i], 64);fileneirong += nnn.GetString(disk.buffer);}else{disk.readblock(nbyte[i], Convert.ToByte(len - 64 * i));fileneirong += nnn.GetString(disk.buffer);}}if (m == 0){showfile ss = new showfile(name[0], fileneirong);ss.ShowDialog();}return fileneirong;}3.2.7创建目录图3-7 创建目录的流程图这一部分主要实现创建目录,代码如下:public bool createdir(string fullname){setfat();byte d; //文件所在根目录不够时新增盘块号b yte cur;byte[] buffer1 = new byte[64]; //存放一个盘块中内容byte b = finddir(fullname); //文件所在根目录string[]str = splitfullname(fullname); // 文件路径名分段string name = str[str.Length - 1]; //划分目录名string pathname = "";for (int i = 0; i < str.Length - 2; i++)pathname += str[i] + "\\";pathname += str[str.Length - 1];if (b == 255){MessageBox.Show("路径错误");return false;}char[] nchar = new char[3]; //存放文件名byte[] f = empty(b); //根目录是否已满if(dirchongming(fullname) != 255){MessageBox.Show("文件重名");return false;}if (f[0] == 255 && b == 2) //在根目录中插入{MessageBox.Show("根目录中已满,不能创建文件");return false;}else if (f[0] != 255) //255为此块盘已满disk.readblock(f[0], 64);disk.rootdir.set(disk.buffer); //文件存放根目录内容nchar = name.ToCharArray();//存放文件名for (int i = 0; i < 3; i++)disk.rootdir.root[f[1]].filename[i] = Convert.ToByte(nchar[i]);for (int i = 0; i < 2; i++)disk.rootdir.root[f[1]].dirORfile = 0;disk.rootdir.root[f[1]].startblock = disk.fat.dirshenqing();disk.writefat();disk.rootdir.root[f[1]].length = 0;disk.buffer =disk.rootdir.get();disk.writein(f[0], 64);}else{cur = finddir(pathname);disk.readblock(cur, 64);disk.rootdir.set(disk.buffer); //文件存放根目录内容cur = disk.rootdir.filesite(pathname, 0);disk.buffer = disk.rootdir.get();disk.writein(finddir(pathname), 64);disk.fat.add(b);d = st(b);disk.readblock(d, 64);disk.rootdir.set(disk.buffer); //文件存放根目录内容nchar = name.ToCharArray(); //存放文件名for (int i = 0; i < 3; i++)disk.rootdir.root[0].filename[i] = Convert.ToByte(nchar[i]);for (int i = 0; i < 2; i++)disk.rootdir.root[0].extension[i] = 0;disk.rootdir.root[0].dirORfile = 0;disk.rootdir.root[0].startblock = disk.fat.dirshenqing();disk.rootdir.root[0].length = 0;disk.writefat();disk.buffer = disk.rootdir.get();disk.writein(d, 64);}return true;}3.2.8删除目录图3-8 删除目录的流程图这一部分主要实现删除目录,代码如下:public bool dirdelete(string fullname){byte b = dirchongming(fullname); //得到此路径目录所在盘块号if (b == 255)return false;disk.readblock(b, 64);disk.rootdir.set(disk.buffer);string[] str = splitfullname(fullname); // 文件路径名分段string name = str[str.Length - 1];byte start = disk.rootdir.filefindfat(name, 0);byte[] fatall =disk.fat.findall(start);byte site = disk.rootdir.filesite(name, 0);for (int i = 0; i < fatall.Length; i++){disk.readblock(fatall[i], 64);disk.rootdir.set(disk.buffer);for (int j = 0; j < 8; j++){if (disk.rootdir.root[j].dirORfile == 0) //仍为目录{UTF8Encoding nnn = new UTF8Encoding();dirdelete(fullname + "\\" +nnn.GetString(disk.rootdir.root[j].filename));}else if (disk.rootdir.root[j].dirORfile == 1) //文件{UTF8Encoding nnn = new UTF8Encoding();filedelete(fullname + "\\" +nnn.GetString(disk.rootdir.root[j].filename) + ".tx");}else if (disk.rootdir.root[j].dirORfile == 2){UTF8Encoding nnn = new UTF8Encoding();filedelete(fullname + "\\" +nnn.GetString(disk.rootdir.root[j].filename) + ".ex");}else if (disk.rootdir.root[j].dirORfile == 3) //空目录项continue;}disk.writefat();disk.buffer = disk.rootdir.get();disk.writein(fatall[i], 64);}//回收此目录在fat和此目录中位置信息disk.fat.huishou(start);disk.readblock(b, 64);disk.rootdir.set(disk.buffer);disk.rootdir.root[site].dirORfile = 3;for (int i = 0; i < 3; i++)disk.rootdir.root[site].filename[i] = 0;for (int i = 0; i < 2; i++)disk.rootdir.root[site].extension[i] = 0;disk.rootdir.root[site].startblock = disk.rootdir.root[site].length = 0;disk.writefat();disk.buffer = disk.rootdir.get();disk.writein(b, 64);return true;}3.3屏幕显示总体界面:图3-9 总体界面用户命令接口显示:图3-10 用户接口磁盘目录显示public void treeshow(byte block){file1.disk.readblock(block, 64);file1.disk.rootdir.set(file1.disk.buffer);for (int i = 0; i < 8; i++){if (file1.disk.rootdir.root[i].dirORfile != 3){string str = "";UTF8Encoding nnn = new UTF8Encoding();if (file1.disk.rootdir.root[i].dirORfile == 0)str = "C:\\" + nnn.GetString(file1.disk.rootdir.root[i].filename);elsestr = "C:\\" + nnn.GetString(file1.disk.rootdir.root[i].filename) + "." + nnn.GetString(file1.disk.rootdir.root[i].extension);diskdis.Nodes.Add(makenode(str));}}}图3-11 磁盘目录显示磁盘使用情况:显示磁盘使用情况的函数:public void showdisk(){for (int i = 0; i < 128; i++){picture[i].Location = new Point(6 + 22 * (i % 16), 20 + 18 * (i / 16));picture[i].Size = new Size(16, 12);if (file1.disk.fat.fblock[i] != 0)picture[i].BackColor = Color.Lime;elsepicture[i].BackColor = Color.White;this.groupBox3.Controls.Add(picture[i]);}}图3-12 磁盘使用情况四结束语通过做操作系统课程设计,我对操作系统的工作原理和实现方式有了更新更全面的认识,我所做的操作系统模拟程序文件管理部分基本实现了课程设计所要求的操作系统模拟的内容,但是由于水平有限仍有部分功能没有实现,尚需改善,以后需要改进和不断学习。

相关文档
最新文档