操作系統中的文件系統和訪問方法

文件 (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

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/542012.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/542012.shtml
英文地址,請注明出處:http://en.pswp.cn/news/542012.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

centos7鏡像加速_docker 鏡像加速CentOS7詳細介紹

前言在Docker Hub官網上注冊帳號,即可下載使用倉庫里的全部的docker鏡像。而因為網絡原因,國內的開發者沒辦法流暢的下載鏡像,經常會出現下載中斷的錯誤。解決方法就是使用國內的容器Hub加速服務,本質就是更改pull優先級較高的服務…

java 根據類名示例化類_Java LocalDateTime類| atOffset()方法與示例

java 根據類名示例化類LocalDateTime類atOffset()方法 (LocalDateTime Class atOffset() method) atOffset() method is available in java.time package. atOffset()方法在java.time包中可用。 atOffset() method is used to create an OffsetDateTime to merge this LocalDat…

Zabbix監控——proxy 分布式監控配置

proxy分布式監控 Zabbix proxy是在大規模分布式監控場景中,采用的一種用以分擔server端壓力的分層結構, proxy可以代替zabbix server檢索客戶端的數據,然后把數據匯報給zabbix server,極大的減輕了server的負載壓力,使…

AutoCAD_acadiso.dwt卡死

2019獨角獸企業重金招聘Python工程師標準>>> 問題描述:每次執行到打開acadiso.dwt就卡死,且電腦顯示有網,確打不開網頁 可能原因:可能是因為AotuCAD是盜版的 解決辦法: 1.在任務管理器中把WSCommCntr.exe進…

else 策略模式去掉if_java – 用狀態/策略模式替換if/else邏輯

我認為你應該使用GoF模式Chain of responsibility.你應該引入兩個接口:1)你將檢查正確條件的條件,例如“如果zip文件不存在”并返回布爾結果 – 如果條件滿足則返回“true”,否則“else”,2)執行策略,它將運行分配有條件的動作,例如: “從指定的URL下載它…

docker簡介與搭建

1 . 對docker的理解: Docker 是一個開源的應用容器引擎,讓開發者可以打包他們的應用以及依賴包到一個可移植的鏡像中,然后發布到任何流行的 Linux或Windows 機器上,也可以實現虛擬化。容器是完全使用沙箱機制,相互之間…

Java BigInteger類| toByteArray()方法與示例

BigInteger類testBit()方法 (BigInteger Class testBit() method) testBit() method is available in java.math package. testBit()方法在java.math包中可用。 testBit() method is used to convert this BigInteger to a byte [] that holds 2s complement denotation of thi…

007_Web to lead

轉載于:https://www.cnblogs.com/bandariFang/p/6229491.html

設置header_Nginx的這些安全設置,你都知道嗎?

Nginx 是最流行的 Web 服務器,可以只占用 2.5 MB 的內存,卻可以輕松處理 1w 的 http 請求。做為網站的入口,Nginx 的安全設置重要性不言而喻。下面帶你一起去認識一下這些安全配置吧!nginx.conf是 Nginx 最主要的配置文件&#xf…

動態路由協議_動態路由協議的類別

動態路由協議Dynamic routing protocols have been divided into 2 categories i.e Distance vector protocols and Link state protocols. Both of these protocols are being explained in detail in this tutorial. 動態路由協議分為距離矢量協議和鏈路狀態協議兩大類 。 本…

docker鏡像創建與優化

1 . 創建鏡像 有兩種方法構建鏡像: docker commit :將運行的容器保存成鏡像Dockerfile:自動構建 使用docker commit 創建鏡像分為三步: 運行容器修改容器將容器保存為鏡像 舉例: [rootdocker ~]# docker load -i…

ISP運營商實驗室測試機架拓撲搭建經驗分享

大家好,有些日子沒更新干貨了,近期難得有假期進行修整,思前顧后還是坐下來聊聊自己長期負責維護和搭建的實驗室環境。廢話不多說,直接上圖。因為圖較大,分上下部分進行上傳。網絡主框架(上)服務…

關于二手交易用戶指南怎么寫_讓用戶拍案叫絕文案怎么寫?試試這3個方法

“共鳴”到底是什么? 為什么有些文章會引起共鳴,而有些則沒有。現在假設為產品家用手持式美容儀寫一份副本。 由于主要重點是“家庭使用”,因此您立即想到了“家庭美容”的口號。 盡管這句話很簡單易懂,但談論起來總是很簡單……似…

結構化程序goto語句_C ++ goto語句| 查找輸出程序| 套裝1

結構化程序goto語句Program 1: 程序1&#xff1a; #include <iostream>#include <math.h>using namespace std;int main(){int num1 1;int num2 0;MY_LABEL:num2 num1 * num1;cout << num2 << " ";num1 num1 pow(2, 0);if (num1 < …

docker倉庫搭建、加密、用戶認證

1 . 含義及理解&#xff1a; 倉庫分為公開倉庫&#xff08;Public&#xff09;和私有倉庫&#xff08;Private&#xff09;兩種形式。最大的公開倉庫是 Docker Hub&#xff0c;存放了數量龐大的鏡像供用戶下載。 國內的公開倉庫包括 Docker Pool等&#xff0c;可以提供大陸用戶…

Centos7+Nginx+Keepalived實現Apache服務的高可用負載均衡

Centos7NginxKeepalived實現Apache服務的高可用&負載均衡今天是2017年的第一天&#xff0c;昨天也就是2016年的最后一天&#xff0c;我嘗試部署了Centos7NginxKeepalived實現WEB服務的高可用負載均衡服務&#xff0c;終于在2017年的第一天前完成了&#xff0c;所以在此分享…

客戶端通過網口啟動可過去的ip_西安交通大學16年3月課程考試《網絡組網技術綜合訓練》作業考核試題...

西安交通大學16年3月課程考試《網絡組網技術綜合訓練》作業考核試題一、單選題(共 20 道試題&#xff0c;共 40 分。)V 1. 下列不屬于服務器內部結構的是()A. CPUB. 電源C. 5類雙絞線D. 北橋芯片滿分&#xff1a;2 分2. 網絡中使用光纜的優點是()A. 便宜B. 容易安裝C. 是一個工…

mcq 隊列_MCQ | 軟件工程基礎知識/簡介(1)

mcq 隊列Q1. Which of the following is a part of the software? Q1。 以下哪個是軟件的一部分&#xff1f; Programs 程式 Documentation 文獻資料 Operating Procedures 運營流程 All of the above 上述所有的 Answer: d. All of the above 答案&#xff1a; d。 上述所有…

docker設置鏡像加速器

設置鏡像加速器 一般情況下&#xff0c;直接從官方倉庫中直接拉取鏡像會比較慢&#xff0c;可以設置鏡像加速器&#xff0c;相當于一個反向代理。以阿里云為例 1 . 首先獲取自己的加速器地址 www.aliyun.com 登陸自己的賬號&#xff08;可以是支付寶賬號&#xff09; 首頁點…

keytool條目_java keytool 常用命令

最近在做ssl連接active directory&#xff0c; 遇到了不少的ssl的問題。連接ssl時會需要用將證書保存到keystore&#xff0c; 而這個步驟剛好就用到了keytool命令。直接敲keytool會有提示如何用這個命令&#xff0c; 但對于完全不懂的我&#xff0c;還是找了下基本命令&#xf…