0% found this document useful (0 votes)
14 views4 pages

OS CHP5-File System and Concept

Uploaded by

Deeksha Verma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views4 pages

OS CHP5-File System and Concept

Uploaded by

Deeksha Verma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

LECTURE NOTES

on
OPERATING SYSTEM

AV
(ICS-401)

D
2023– 2024

YA
B. Tech IIIrd Sem e s t e r
Mr. Deepanshu Singh Yadav, Assistant Profes so r

H
Ms. Diksha Sharma, Assistant Profes so r

G
N
Sitapur Road, Lucknow
Uttar Pradesh
SI

India
Pin Code :226021
U
SH

INSTITUTE OF ENGINEERING
&TECHNOLOGY
N
PA

Department of Computer Science and Engineering


EE
D

REFERENCES :

Mr. Deepanshu Singh Yadav , Assistant Professor ,IET,LUCKNOW Page 1


[Link] Sharma, Assistant Professor ,IET,LUCKNOW
1. Silberschatz, Galvin and Gagne, “Operating Systems Concepts”, Wiley
2. Harvey M Dietel, “ An Introduction to Operating System”, Pearson Education
3. William Stallings, “Operating Systems: Internals and Design Principles ”, 6th Edition, Pearson
Education
4. D M Dhamdhere, “Operating Systems : A Concept based Approach”, 2nd Edition
5. Sibsankar Halder and Alex A Aravind, “Operating Systems”, Pearson Education
6. Rajiv Chopra, “ Operating System a Practical approach”, [Link]
7. [Link], “Operating System”,Technical Publications.

AV
8. [Link]/
9. [Link]
10. [Link]
11. Tutorials point

D
12. [Link]

YA
Disclaimer: The e-content is exclusively meant for academic purposes and for enhancing teaching and
learning. Any other use for economic/commercial purpose is strictly prohibited. The users of the content
shall not distribute, disseminate or share it with anyone else and its use is restricted to advancement of
individual knowledge. The information provided in this e-content is developed from authentic references, to
the best of my knowledge.

H
G
N
SI
U
SH
N
PA
EE
D

Mr. Deepanshu Singh Yadav , Assistant Professor ,IET,LUCKNOW Page 1


[Link] Sharma, Assistant Professor ,IET,LUCKNOW
What is a file?
A file can be defined as a data structure that stores a sequence of records. The file is stored in the file system
and can reside on a disk or in the main memory. The file can be simple (text only) or complex (specially
formatted). A collection of files is called a directory. The collection of directories at different levels is called
the file system. Different file attributes give information about the file. These are
File attributes
The file system stores file attributes in the file’s data block. The file system also uses dynamic file attributes,
which are automatically appended to or subtracted from a file’s data block when modified.

AV
 Name- This is the only information stored in a human-readable format. A name is given to each
file. One directory cannot contain two files with the same name.
 Extension- This attribute is required for systems that support different file types. For example, a

D
text file has a .txt extension and a video file has a .mp4 extension.
 Location- Refers to the location of the file on the device. The file system has several places where
you can save your files. Each file contains its location as an attribute.

YA
 Size-File- size means the number of bytes captured by the file in memory.
 Identifier- Each file is identified by a unique tag number within the file system called an
identifier.
 Protection- This attribute assigns and controls access to read, write, and execute files. Computer

H
administrators may need different protection for each file. Therefore, each file has its own
permissions on different user groups.
 Compression- It tells the type of compression there is.

G
 Created/Modified date- Each file has a timestamp that includes the date and time the file was
last modified.
N
The main difference between Paging and Segmentation is that Paging divides memory into fixed-size
blocks called pages, while Segmentation divides memory based on data type or function into variable-
SI

sized segments.
Operations on file
 Creating- Creating a file involves two steps. First, check if there is free space. You must create a
U

new directory file entry if you have enough space.


 Opening- This is a common operation performed on a file. After you create a file, you need to
open it before you can perform any file processing operations. If the user wants to open the file,
SH

call a system call to instruct the operating system to open the file and pass the file name to the file
 Writing- To write a file, you need to know two things. One is the name of the file and the other is
the information or data written to the file
 Deleting- To delete a file, first browse the directory of the named file, then free up the file area
N

and delete the directory entry.


 Truncating- To truncate a file, delete only the contents of the file, but don’t delete its file
PA

structure.
 Close File- After editing the file, you need to close the file to free up any permanent changes
made and occupied resources. Finally, the internal descriptor created when the file was opened
is released.
EE

File system in an operating system


A file system is a collection of files and directories used by an operating system to organize the storage of
files and to provide a pathway for users to access those files.
A file system is a software layer that manages files and folders on an electronic storage device, such as a
D

hard disk or flash memory. File systems allow different programs to access and use the same storage
locations without knowing each other’s internal details.
Your operating system has a file system that helps keep track of your files. The file system organises and
manages files and directories (or folders). It also keeps track of each file’s space on your hard drive.

Mr. Deepanshu Singh Yadav , Assistant Professor ,IET,LUCKNOW


Page 1
[Link] Sharma, Assistant Professor ,IET,LUCKNOW
There are a few different file system types, each with unique benefits and uses. In this post, we’ll look at the
different types of file systems and discuss when it’s best to use them.

Why do you need a file system?


Without a file system, storage devices store large blocks of data simultaneously, and the operating system
cannot distinguish between them. The main reason for using a file system is:
 To improve performance in terms of response time.
 To eliminate or mitigate the risk of data loss or corruption

AV
 To meet your data management needs and requirements
 Easy access to your data.
Imagine a room with a bunch of paper scattered all over the place. You won’t be able to access the papers.
So, it is better to arrange them in files or folders.

D
Functions of file system
1. The purpose of a file system is to provide a way for users to access files and directories. The file

YA
system does this by providing a directory structure and a set of rules for how files and
directories are stored.
2. Provides security against information loss due to system failure.
3. If necessary, a file recovery module is also provided.
4. The file system provides a pathway for users to access files and directories by storing them in a

H
specific location on the file system. The pathname determines the pathway, a sequence of file
system components that specifies where the file or directory should be located on the file
system.
G
N
SI
U
SH
N
PA
EE
D

Mr. Deepanshu Singh Yadav , Assistant Professor ,IET,LUCKNOW


Page 1
[Link] Sharma, Assistant Professor ,IET,LUCKNOW

You might also like