File Models in Distributed Operating System
Several machines are utilized in Distributed File Systems (DFS) to supply the file system's facility. Various file systems frequently use various conceptual models. Models based on structure and mobility is frequently used for file modeling. In this article, you will learn about the file models in the distributed operating system.
Types of Files models in the distributed operating systems
There are mainly two types of file models in the distributed operating system.
There are two types of file models in structure criteria. These are as follows:
The Structured file model is presently a rarely used file model. In the structured file model, a file is seen as a collection of records by the file system. Files come in various shapes and sizes and with a variety of features. It is also possible that records from various files in the same file system have varying sizes. Despite belonging to the same file system, files have various attributes. A record is the smallest unit of data from which data may be accessed. The read/write actions are executed on a set of records. Different "File Attributes" are provided in a hierarchical file system to characterize the file. Each attribute consists of two parts: a name and a value. The file system used determines the file attributes. It provides information on files, file sizes, file owners, the date of last modification, the date of file creation, access permission, and the date of last access. Because of the varied access rights, the Directory Service function is utilized to manage file attributes.
The structured files are also divided into two types:
Files with Non-Indexed records
Records in non-indexed files are retrieved based on their placement inside the file. For instance, the second record from the starting and the second from the end of the record.
Files with Indexed records
Each record contains a single or many key fields in a file containing indexed records, each of which may be accessed by specifying its value. A file is stored as a B-tree or similar data structure or hash table to find records quickly.
It is the most important and widely used file model. A file is a group of unstructured data sequences in the unstructured model. Any substructure does not support it. The data and structure of each file available in the file system is an uninterrupted sequence of bytes such as UNIX or DOS. Most latest OS prefer the unstructured file model instead of the structured file model due to sharing of files by multiple apps. It has no structure; therefore, it can be interpreted in various ways by different applications.
There are two files model in the Modifiability Criteria. These are as follows:
The existing operating system employs the mutable file model. A file is described as a single series of records because the same file is updated repeatedly once new material is added. After a file is updated, the existing contents are changed by the new contents.
The Immutable file model is used by Cedar File System (CFS). The file may not be modified once created in the immutable file model. Only after the file has been created can it be deleted. Several versions of the same file are created to implement file updates. When a file is changed, a new file version is created. There is consistent sharing because only immutable files are shared in this file paradigm. Distributed systems allow caching and replication strategies, overcoming the limitation of many copies and maintaining consistency. The disadvantages of employing the immutable file model include increased space use and disc allocation activity. CFS uses the "Keep" parameter to keep track of the file's current version number. When the parameter value is 1, it results in the production of a new file version. The previous version is erased, and the disk space is reused for a new one. When the parameter value is greater than 1, it indicates the existence of several versions of a file. If the version number is not specified, CFS utilizes the lowest version number for actions such as "delete" and the highest version number for other activities such as "open".