Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

File Systems in operating systems

Rating
-
Sold
-
Pages
20
Uploaded on
30-12-2022
Written in
2021/2022

In these notes, Covered all the topics of operating systems briefly. COs - Analyze the structure of OS and basic architectural components involved in OS design. Compare and contrast various CPU scheduling algorithms. Evaluate the requirements for the process synchronization and co-ordination in the contemporary operating system. Analyze various algorithms for memory management, I/O management and security aspects of operating system. Write shell scripts in Unix/Linux O.S and write simple programs using kernel system calls. Also understand virtualization concept

Show more Read less
Institution
Course

Content preview

7 – File Systems

(1) Explain file attributes and file operations in brief.
• A file is a unit of storing data on a secondary storage device such as a hard disk or
other external media.
• Every file has a name and its data. Operating system associates various information
with files. For example the date and time of the last modified file and the size of file
etc….
• This information is called the file’s attributes or metadata.
• The attributes varies considerably from system to system. Some of the possibilities of
attributes are shown below.
File Attributes
• These attributes relates to the files attributes and tell who may access it and who may
not.
Attribute Meaning
Protection Who can access the file and in what way.
Password Password needed to access the file.
Creator ID of the person who created the file.
Owner Current owner.


• Flags are bits or short fields that control or enable some specific property.
Attribute Meaning
Read only flag 0 for read/write, 1 for read only.
Hidden flag 0 for normal, 1 for do not display the listings.
System flag 0 for normal, 1 for system file.
Archive flag 0 for has been backed up, 1 for needs to be backed up.
Random access flag 0 for sequential access only, 1 for random access.
Temporary flag 0 for normal, 1 for delete file on process exit.
Lock flag 0 for unlocked, 1 for locked.




1

, 7 – File Systems

• The record length, key position and key length are only present in files whose record
can be looked up using the key. They provide the information required to find the keys.
Attributes Meaning
Record length Number of bytes in a record.
Key position Offset of the key within each record.
Key length Number of bytes in key field.

• The various times keep track of when the file was created, most recently accessed and
most recently modified.
Attributes Meaning
Creation time Date and time the file was created.
Time of last access Date and time of file was last accessed.
time of last change Date and time of file was last changed.

• The current size tells how big the file is at present. And some old mainframe operating
system requires the maximum size to be specified.
Attribute Meaning
Current size Number of bytes in the file.
Maximum size Number of bytes the file may grow to.


File operations
• File exists to store information and allow it to be retrieved later.
• Different system provides different operations to allow storage and retrieval.
• The most common system calls are shown below.
▪ Create
The purpose of the call is to announce that the file is coming and to set some
attributes.
▪ Delete
When the file is no longer needed, it has to be deleted to free up disk space.
▪ Open
The purpose of the open call is to allow the system to fetch the attributes.


2

, 7 – File Systems
▪ Close
When all accesses are finished, the attributes and disk addresses are no longer
needed, so the file should be closed to free up table space.
▪ Read
Data are read from file. Usually the bytes come from the current position.
▪ Write
Data are written to the file, usually at the current position.
▪ Append
This call is restricted form of write. It can only add data to the end of file.
▪ Seek
For a random access files, a method is needed to specify from where to take
the data. Seek repositions the file pointer to a specific place in the file.
▪ Get attributes
Processes often need to read the file attributes to do their work.
▪ Set attributes
Some of the attributes are user settable and can be changed after the file has
been created. This system call makes that possible.
▪ Rename
It frequently happens that a user needs to change the name of an existing file.
This system call makes it possible.


(2) Writes short notes on file types & file access.
File Types

File Types



Regular Files Directories



ASCII Files Binary Files



Regular File
• Regular files are the ones that contain user information.

3

Written for

Institution
Course

Document information

Uploaded on
December 30, 2022
Number of pages
20
Written in
2021/2022
Type
Class notes
Professor(s)
Ymk sir
Contains
All classes

Subjects

$5.79
Get access to the full document:

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

Get to know the seller
Seller avatar
vaibhav51ppsv2020

Also available in package deal

Get to know the seller

Seller avatar
vaibhav51ppsv2020 C.K.Pithawala school of engineering and techonology
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
14
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

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