• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 31 pages
Exam (elaborations)

Os file system interface file system implemenation

Document preview thumbnail
Preview 4 out of 31 pages

Os file system interface file system implemenation Os file system interface file system implemenation

Content preview

File system Interface:The concept of a file, access methods, directory structure, file system
mounting, files sharing, protection.
File System Implementation: File system structure, allocation methods, free-space
management, and secondary storage structure – overview of mass-storage structure, disk
scheduling and algorithms

File

A file is a named collection of related information that is recorded on secondary storage such as
magnetic disks, magnetic tapes and optical disks. In general, a file is a sequence of bits, bytes,
lines or records whose meaning is defined by the files creator and user.

Properties of a File System

Here, are important properties of a file system:

• Files are stored on disk or other storage and do not disappear when a user logs off.
• Files have names and are associated with access permission that permits controlled
sharing.
• Files could be arranged or more complex structures to reflect the relationship between
them.

File Attributes

A file has a name and data. Moreover, it also stores meta information like file creation date and
time, current size, last modified date, etc. All this information is called the attributes of a file
system.

Here, are some important File attributes used in OS:

• Name: It is the only information stored in a human-readable form.
• Identifier: Every file is identified by a unique tag number within a file system known as
an identifier.
• Location: Points to file location on device.
• Type: This attribute is required for systems that support various types of files.
• Size. Attribute used to display the current file size.
• Protection. This attribute assigns and controls the access rights of reading, writing, and
executing the file.
• Time, date and security: It is used for protection, security, and also used for monitoring

Functions of File

• Create file, find space on disk, and make an entry in the directory.
• Write to file, requires positioning within the file
• Read from file involves positioning within the file

, • Delete directory entry, regain disk space.
• Reposition: move read/write position.




File types- name, extension

File Type Usual extension Function

Executable exe, com, bin or ready-to-run machine- language
none program

Object obj, o complied, machine language, not linked

Source code c. p, pas, 177, source code in various languages
asm, a

Batch bat, sh Series of commands to be executed

Text txt, doc textual data documents

Word doc,docs, tex, various word-processor formats
processor rrf, etc.

Library lib, h libraries of routines

Archive arc, zip, tar related files grouped into one file,
sometimes compressed.




File Access Methods

File access is a process that determines the way that files are accessed and read into memory.
Generally, a single access method is always supported by operating systems. Though there are
some operating system which also supports multiple access methods.

Three file access methods are:

• Sequential access
• Direct random access

, • Index sequential access

Sequential Access

In this type of file access method, records are accessed in a certain pre-defined sequence. In the
sequential access method, information stored in the file is also processed one by one. Most
compilers access files using this access method.

Random Access

The random access method is also called direct random access. This method allow accessing the
record directly. Each record has its own address on which can be directly accessed for reading
and writing.

Index sequential access

This type of accessing method is based on simple sequential access. In this access method, an
index is built for every file, with a direct pointer to different memory blocks. In this method, the
Index is searched sequentially, and its pointer can access the file directly. Multiple levels of
indexing can be used to offer greater efficiency in access. It also reduces the time needed to
access a single record.

Overview of Directory Structure

A File system contains thousands and millions of files, owned by several users. The directory
structure organizes these files by keeping entries of all the related files. The file entries have
information like file name, type, location, the mode in which the file can be accessed by other
users in the system.

The two important features that must be taken care while maintaining a directory are given
below.

1. A user must have freedom of giving the desired name to the file, without taking into
consideration that the same file names are used by other users on the system.

2. A user must be able to share the files he creates and he must also be able to access the files,
created by other users.

Directory structure provides both the above-discussed features. A directory always has
information about the group of related files. Whenever a user or a process request for a file, the
file system search for the file’s entry in the directory and when the match is found, it obtains the
file’s location from there.

, Let us now study the directory structure with the help of the figure above. The field File
name, contains the name of the concerned file in the directory, Type field indicates the kind or
category of the file, Location Info field indicates the location where the file is stored.

Protection Info field contains the information whether the file can be accessed by the other user
in the system or not. Flag field contains the kind of directory entry like value D in Flag field
indicates that the file is a directory, value L indicates that the file is a link, value M indicates that
the file is a mounted file system.

The Misc info filed in the directory contains the miscellaneous information about the owner of
the file, the time of its creation, the time at which the file was modified last.

Types of Directory Structures
In this section, we will be discussing the most common types of directories, their benefits and
drawbacks.

1. Single-level directory structure

Single level directory structure has only one directory which is called the root directory. The
users are not allowed to create subdirectories under the root directory. All the files created by the
several users are present in the root directory only.

As you can see in the diagram below all the file F1, F2, F3, F4 created by the different users are
present at the root directory.

Document information

Uploaded on
August 27, 2025
Number of pages
31
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$23.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Onlineexam
4.2
(77)
Sold
465
Followers
352
Items
14902
Last sold
2 days ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions