File Management | Operating System Notes | B.Tech
top of page

File Management: Operating System Class Notes

Updated: Oct 16, 2022

Mobiprep has created last-minute notes for all topics of operating system to help you with the revision of concepts for your university examinations. So let’s get started with the lecture notes on Operating System (OS).

Our team has curated a list of the most important questions asked in universities such as DU, DTU, VIT, SRM, IP, Pune University, Manipal University, and many more. The questions are created from the previous year's question papers of colleges and universities.


File Management


Question- 1) Mention the different file attributes and file types.

Answer: A file can be defined as a data structure which stores the sequence of records. Files are stored in a file system, which may exist on a disk or in the main memory. Files can be simple (plain text) or complex (specially-formatted).


1. Name

Every file carries a name by which the file is recognized in the file system. One directory cannot have two files with the same name.


2. Identifier

Along with the name, Each File has its own extension which identifies the type of the file. For example, a text file has the extension .txt, A video file can have the extension .mp4.


3. Type

In a File System, the Files are classified in different types such as video files, audio files, text files, executable files, etc.


4. Location

In the File System, there are several locations on which, the files can be stored. Each file carries its location as its attribute.


5. Size

The Size of the File is one of its most important attribute. By size of the file, we mean the number of bytes acquired by the file in the memory.


6. Protection

The Admin of the computer may want the different protections for the different files. Therefore each file carries its own set of permissions to the different group of Users.


7. Time and Date

Every file carries a time stamp which contains the time and date on which the file is last modified.


 

Question- 2) What is acyclic graph directories?

Answer: The tree structured directory system doesn't allow the same file to exist in multiple directories therefore sharing is major concern in tree structured directory system. We can provide sharing by making the directory an acyclic graph. In this system, two or more directory entry can point to the same file or sub directory. That file or sub directory is shared between the two directory entries.

These kinds of directory graphs can be made using links or aliases. We can have multiple paths for a same file. Links can either be symbolic (logical) or hard link (physical).


If a file gets deleted in acyclic graph structured directory system, then

  1. In the case of soft link, the file just gets deleted and we are left with a dangling pointer.

  2. In the case of hard link, the actual file will be deleted only if all the references to it gets deleted.


 

Question- 3) Explain various methods of accessing a file?

Answer: There are three ways to access a file into a computer system:

  1. Sequential-Access,

  2. Direct Access,

  3. Index sequential Method.

Sequential Access –

It is the simplest access method. Information in the file is processed in order, one record after the other. This mode of access is by far the most common; for example, editor and compiler usually access the file in this fashion.

Read and write make up the bulk of the operation on a file. A read operation -read next- read the next position of the file and automatically advance a file pointer, which keeps track I/O location. Similarly, for the writewrite next append to the end of the file and advance to the newly written material.


Key points:

  1. Data is accessed one record right after another record in an order.

  2. When we use read command, it move ahead pointer by one

  3. When we use write command, it will allocate memory and move the pointer to the end of the file

  4. Such a method is reasonable for tape.


Direct Access –

Another method is direct access method also known as relative access method. A filed-length logical record that allows the program to read and write record rapidly. in no particular order. The direct access is based on the disk model of a file since disk allows random access to any file block. For direct access, the file is viewed as a numbered sequence of block or record. Thus, we may read block 14 then block 59 and then we can write block 17. There is no restriction on the order of reading and writing for a direct access file.

A block number provided by the user to the operating system is normally a relative block number, the first relative block of the file is 0 and then 1 and so on.


Index sequential method –

It is the other method of accessing a file which is built on the top of the sequential access method. These methods construct an index for the file. The index, like an index in the back of a book, contains the pointer to the various blocks. To find a record in the file, we first search the index and then by the help of pointer we access the file directly.


Key points:

  1. It is built on top of Sequential access.

  2. It control the pointer by using index.


 

Question- 4) Explain Remote file systems.

Answer: Remote file sharing (RFS) is a type of distributed file system technology. It was developed in 1980 by AT&T. Later, it was delivered with UNIX System version V (five) release 3 (SVR3). It enables file and/or data access to multiple remote users over the Internet or a network connection. It is also known as a general process of providing remote user access to locally stored files and/or data.


 

Question- 5) What is Virtual File Systems?

Answer: A virtual file system (VFS) or virtual filesystem switch is an abstract layer on top of a more concrete file system. The purpose of a VFS is to allow client applications to access different types of concrete file systems in a uniform way. A VFS can, for example, be used to access local and network storage devices transparently without the client application noticing the difference. It can be used to bridge the differences in Windows, classic Mac OS/macOS and Unix filesystems, so that applications can access files on local file systems of those types without having to know what type of file system they are accessing.


 



bottom of page