100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
File Systems in operating systems $5.29   Add to cart

Class notes

File Systems in operating systems

 1 view  0 purchase
  • Course
  • Institution

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-ordinatio...

[Show more]

Preview 3 out of 20  pages

  • December 30, 2022
  • 20
  • 2021/2022
  • Class notes
  • Ymk sir
  • All classes
avatar-seller
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

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller vaibhav51ppsv2020. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $5.29. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

79271 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$5.29
  • (0)
  Add to cart