文件 (File)

A file is basically a sequence of bytes organized into blocks that are understandable by any machines. In other words, the collection of related information that is stored in a secondary storage device is also called a file. The file is a collection of logically related entities. According to the users view a file is the smallest allots space of the logical secondary storage. The object that stores data, information, settings or commands used with a computer program on a computer is called file. In graphical user interface (GUI) such as Microsoft Windows, files display as icons that relate to the program that opens the file.

文件基本上是按字节顺序组织的块,任何机器都可以理解。 换句话说,存储在辅助存储设备中的相关信息的集合也称为文件。 该文件是逻辑上相关的实体的集合。 根据用户视图,文件是逻辑辅助存储的最小分配空间。 存储与计算机上的计算机程序一起使用的数据,信息,设置或命令的对象称为文件。 在Microsoft Windows等图形用户界面(GUI)中,文件显示为与打开文件的程序有关的图标。

By using a software program we can create a file on the computer. For example to create an image file you would use an image editor and create a document you would use a word processor. Computer files are stored on a drive e.g (hard disk), disc (DVD) and diskette (e.g floppy) and may also be contained in a folder (directory) on that medium. Information is kept in files. Files reside on secondary storage. When this formation is to be used, it has to be accessed and brought into primary main memory. Information in files could be accessed in many ways. It is usually dependent on an application.

通过使用软件程序,我们可以在计算机上创建文件。 例如,要创建图像文件,可以使用图像编辑器,而可以使用文字处理器来创建文档。 计算机文件存储在驱动器(例如硬盘),光盘(DVD)和软盘(例如软盘)上,也可以包含在该介质的文件夹(目录)中。 信息保存在文件中。 文件位于辅助存储上。 当使用这种形式时,必须对其进行访问并将其带入主主存储器。 文件中的信息可以通过多种方式访问​​。 它通常取决于应用程序。

文件属性 (Attributes of file)

A file is referred by its name, a name or string is a collection of character. There are many systems which differentiate the upper and lower case of the alphabet. When a file is saved by any name it becomes independents for the user and file name should be unique. The system does not allow the files of the same types of name. The attributes of the file may vary from the one operating system to another operating system. Following are some attribute of the file,

文件以其名称来引用,名称或字符串是字符的集合。 有许多系统可以区分字母的大写和小写。 以任何名称保存文件时,文件将独立于用户,并且文件名应唯一。 系统不允许使用相同名称的文件。 文件的属性可能因一个操作系统而异。 以下是文件的一些属性,

  • Name - The name of any file is the information which is in readable form for the users.

    名称 -任何文件的名称都是用户可读的信息。

  • Identifier - The identifier is a unique tag number which identifies the file within the file system. It is not possible for the human to read the identifier or tag number.

    标识符 -标识符是唯一的标记号,用于标识文件系统中的文件。 人类无法读取标识符或标签号。

  • Type - type is needed for the system that supports different types of file.

    Type-支持不同文件类型的系统需要type。

  • Size - In this attribute, the current or the maximum size of the file is included( in bytes, words, blocks).

    大小 -在此属性中,包含文件的当前或最大大小(以字节,字,块为单位)。

  • Location - This attribute of the file is the pointer to the file and the location of the file where the file is stored on that device.

    位置 -文件的此属性是指向文件的指针以及文件在该设备上存储文件的位置。

  • Protection - this information determines the control and assigns the power of reading, writing and executing. It also defines that who can do the reading, writing.

    保护 -此信息确定控制权并分配读取,写入和执行的权限。 它还定义了谁可以阅读,写作。

  • Time date and user identification - This type of data is useful for the protection, security and usage monitoring. It also defines the last creation, last modification and last use of the file.

    时间日期和用户标识 -这种类型的数据可用于保护,安全性和使用情况监视。 它还定义了文件的最后创建,最后修改和最后使用。

文件操作 (Operations of the file)

A file has many properties so to defile the file property operating system provides a lot of information that can be performed on the file. There are many simple and easy operations of file like create, delete, update and some others like rename.

文件具有许多属性,因此要对文件属性进行脱污,操作系统会提供许多可以在文件上执行的信息。 文件有许多简单易用的操作,例如创建,删除,更新以及其他一些操作,例如重命名。

  1. Creating a file - for creating any file there are mainly two steps first the free space is available in the system and second is the new entry of file must be made in the directory.

    创建文件 -要创建任何文件,主要有两个步骤,首先是系统中有可用空间,其次是必须在目录中输入新文件。

  2. Writing a file - For writing a file the system call specifies the two things name of the file and the information that is written on the file. When the name of the file is given the system search that file in the directory, the write pointer point the location where the next write is to take place and write pointer is updated.

    写入文件 -为了写入文件,系统调用指定文件的两个名称以及写在文件上的信息。 当给定文件名时,系统在目录中搜索该文件,写指针指向下一次写操作发生的位置,并且写指针被更新。

  3. Reading a file - For reading a file the system call also specifies the two things name of the file and the read pointer. The directory is searched for the given entry and system keep track on the read pointer. The read pointer is updated once the read is completed. The same pointer is used by both the read and write operation on the file.

    读取文件 -为了读取文件,系统调用还指定了文件的两个名称和读取指针。 在目录中搜索给定的条目,系统跟踪读取的指针。 一旦读取完成,读取指针就会更新。 对文件的读写操作使用相同的指针。

  4. Deleting a file - For deleting a file first we search for the directory and then erase the directory. After that, we release the space so that it can be reused by another file.

    删除文件 -首先要搜索文件,然后搜索目录,然后删除目录。 之后,我们释放空间,以便其他文件可以重用该空间。

  5. Repositioning of the file - First, the directory is searched for the file and the current position of the file is changed by the new position.

    重新放置文件 -首先,在目录中搜索文件,并通过新位置更改文件的当前位置。

档案存取方式 (File Access Method)

The file contains the information but when it required to used this information can be access by the access methods and reads into the computer memory. Some system provides only one access method and some provide more than on access method to access the file,

该文件包含该信息,但是当需要使用此信息时,可以通过访问方法进行访问并读入计算机内存。 某些系统仅提供一种访问方法,而某些系统提供的访问方式超过了访问文件的方式,

1. Sequential Access Method

1.顺序访问方法

A sequential access is that in which the records are accessed in some sequence, i.e., the information in the file is processed in order, one record after the other. This access method is the most primitive one.

顺序访问是指按某种顺序访问记录的操作,即按顺序处理文件中的信息,一个记录接一个记录。 这种访问方法是最原始的一种。

The idea of Sequential access is based on the tape model which is a sequential access device. We consider Sequential access method is best because most of the records in a file are to be processed. For example, transaction files.

顺序访问的思想基于作为顺序访问设备的磁带模型。 我们认为顺序访问方法是最好的,因为文件中的大多数记录都将被处理。 例如,交易文件。

Example: Compilers usually access files in this fashion.

示例:编译器通常以这种方式访问​​文件。

2. Direct or Random Access Methods

2.直接或随机访问方法

Sometimes it is not necessary to process every record in a file. It is not necessary to process all the records in the order in which they are present in the memory. In all such cases, direct access is used.

有时没有必要处理文件中的所有记录。 不必按它们在内存中出现的顺序处理所有记录。 在所有这些情况下,都将使用直接访问。

The disk is a direct access device which gives us the reliability to random access of any file block. In the file, there is a collection of physical blocks and the records of that blocks.

磁盘是直接访问设备,它使我们能够可靠地随机访问任何文件块。 在该文件中,包含物理块和该块的记录的集合。

Eg. Databases are often of this type since they allow query processing that involves immediate access to large amounts of information. All reservation systems fall into this category.

例如。 数据库通常是这种类型的,因为它们允许查询处理,该处理涉及立即访问大量信息。 所有预订系统都属于这一类。

Not all operating systems support direct access files. The sequential and direct access of the file is defined at the time of creation and accessed accordingly later. The direct access of a sequential file is not possible but Sequential access to a direct access file is possible.

并非所有操作系统都支持直接访问文件。 在创建时定义文件的顺序和直接访问,并在以后进行相应访问。 不能直接访问顺序文件,但是可以顺序访问直接访问文件。

3. Index Access Method

3.索引访问方法

An indexed file is a computer file with an index that allows easy random access to any record given its file key. The key is an attribute that uniquely identifies a record. We can say that If more than one index is present the other ones are alternate indexes. The creation of the indexes is done with the file but maintained by the system.

索引文件是具有索引的计算机文件,该索引允许在给定其文件密钥的情况下轻松随机地访问任何记录。 键是唯一标识记录的属性。 我们可以说,如果存在多个索引,则其他索引是备用索引。 索引的创建由文件完成,但由系统维护。

4. Index sequential Access Method

4.索引顺序访问方法

The index sequential access method is a modification of the direct access method. Basically, it is kind of combination of both the sequential access as well as direct access. The main idea of this method is to first access the file directly and then it accesses sequentially. In this access method, it is necessary for maintaining an index. The index is nothing but a pointer to a block. The direct access of the index is made to access a record in a file. The information which is obtained from this access is used to access the file. Sometimes the indexes are very big. So to maintain all these hierarchies of indexes are built in which one direct access of an index leads to information of another index access.

索引顺序访问方法是直接访问方法的修改。 基本上,它既是顺序访问又是直接访问的结合。 此方法的主要思想是先直接访问文件,然后顺序访问。 在这种访问方法中,必须维护索引。 索引不过是指向块的指针。 可以直接访问索引来访问文件中的记录。 从此访问获得的信息用于访问文件。 有时索引很大。 因此,为了维护索引的所有这些层次结构,在其中索引的一个直接访问会导致另一索引访问的信息。

The main advantage in this type of access is that both direct and sequential access of files is possible with the help of this method.

这种访问方式的主要优点是,借助此方法可以同时进行文件的直接和顺序访问。

翻译自: https://www.includehelp.com/operating-systems/file-system-and-access-methods.aspx

操作系统中的文件系统和访问方法相关推荐

  1. linux a卡安装教程视频下载,在深度Deepin操作系统中安装AMD驱动的方法,附安装全过程...

    以下为你介绍在深度Deepin操作系统中安装AMD驱动的方法,以选择Radeon Software for Linux Driver for Ubuntu 18.04.3(19.30版本)为例说明. ...

  2. excel多级表头存入mysql_一种多个多层表头的表格在数据库中的存储及其访问方法与流程...

    技术领域: 本发明涉及一种多个多层表头的表格在数据库中的存储方法. 背景技术: :在各个领域,长期以来都会产生和积累大量手绘的.印刷的或EXCEL格式保存的表格数据,将这些表格数据录入到数据库系统中存 ...

  3. 内核中根据inode得到文件名_聊聊DOS操作系统中的文件系统FAT12

    前面我们更多的集中在Linux系统下文件系统的介绍,是时候介绍一下其它文件系统了.今天我们介绍一下Windows操作系统下的文件系统,也就是FAT文件系统.严格的来说其实是DOS的文件系统.今天我们介 ...

  4. VC++的应用程序框架中各类之间的访问方法

    Visual C++ 6.0开发环境中,我们可以用MFC AppWizard 自动生成一个应用程序                   .其中包括了应用类,主边框窗口类,子边框窗口类(MDI 应用程序 ...

  5. linux ddos攻击ip,Linux操作系统中实现DDOS攻击的方法

    软件用的是最有名的DDOS,首先说我们用来攻击的客户机和服务器的配置方法,使用当下最有名的REDHATLinux进行测试,本次攻击测试我使用的是FEDORA CORE3. 开始设置服务器: 解压 ta ...

  6. wsl Linux子系统和windows主机文件系统互相访问方法

    1. windows查看linux文件 打开文件资源管理器,然后在目录窗口输入 \\wsl$ .回车就可以看到所有的子系统了.如图: 2. linux 子系统中查看 win目录 命令行打开 /mnt ...

  7. 一般计算机系统中的文件系统采用,南昌大学2001年考研专业课试卷操作系统A

    南昌大学2001年攻读硕士学位研究生 入  学  考  试  试  题 报考专业:计算机应用             考试科目:操作系统(A) 一. 判断题(共15分,每题1分,答对的得1分;不答的不 ...

  8. linux中的last命令,在Linux系统中使用Last命令的方法,包括Last命令选项说明

    如果您要管理多用户系统,则通常需要知道登录机器的人员.时间和来源.last是一个命令行实用程序,用于显示有关系统用户的最近登录会话的信息,当您需要跟踪用户活动或调查可能的安全漏洞时,此功能非常有用.本 ...

  9. 【Linux 内核】Linux 操作系统结构 ( Linux 内核在操作系统中的层级 | Linux 内核子系统及关系 | 进程调度 | 内存管理 | 虚拟文件系统 | 网络管理 | 进程间通信 )

    文章目录 一.Linux 内核在操作系统中的层级 二.Linux 内核子系统 三.Linux 内核子系统之间的关系 一.Linux 内核在操作系统中的层级 Linux 内核 所在层级 : 整个计算机系 ...

最新文章

  1. mysql8.0查看用户_MySQL 8.0用户及安全管理
  2. [Android Studio] 初体验
  3. STM32——系统滴答定时器
  4. C语言优先队列作用,C语言实现优先队列(priority queue)
  5. 怎么修改远程服务器的地址,怎么修改远程服务器的地址
  6. JDK5后的特性整理
  7. 华为那道上机题 用?来区隔一句话的输入。
  8. abp调用登录接口获取token再调用其他接口
  9. 配置alexa skill(二)
  10. typedef用法,函数指针
  11. [Elasticsearch] 多字段搜索 (五) - 以字段为中心的查询
  12. 发布jar包至maven本地库及私服
  13. 【欧拉降幂公式】【欧拉函数】
  14. java深拷贝的三种方式
  15. 梯度下降及python实现
  16. canvas-网页蜘蛛网特效代码解读
  17. 基于Spring Boot在线学习系统设计与实现
  18. 3D数字化与3D打印:用“虚拟”再造“现实”
  19. 关于appid 被锁定问题
  20. 在计算机中 无符号书最常用于表示,微型计算机原理及应用试题库(无答案)

热门文章

  1. c++进制转换_一文了解进制之间的原理和转换
  2. android 自定义透明 等待 dialog,Android自定义Dialog内部透明、外部遮罩效果
  3. apple quicktime怎么在ppt中用_PPT情感专题大赏No. 007:一份这就是街舞第三季主题PPT(上集)...
  4. mysql异常恢复工具_[MySQL异常恢复]mysql ibd文件恢复
  5. python sqlite并发处理_python sqlite大数据 处理
  6. python 笔试题 英方_4000字转型数据分析师笔试面试经验分享
  7. c++ 二次开发 良田高拍仪_六枝特良田LYV-850加工中心导轨配套防护罩日常维修
  8. html 复选框name值,HTML(5)表单元素以及对各个表单元素的name、value属性的理解
  9. javascript复制到黏贴板之完美兼容
  10. C#统计字符出现的个数【C#】