MIT 201- ADVANCED OPERATING
SYSTERM AND NETWORKING
Instructor: JOHN ED AUGUSTUS ESCORIAL , MIT
Presenter: VAN O. AMPANG
File Systems, File System Performance
CHAPTER OBJECTIVES
• To discuss what is file systems.
• To explain the function of file systems.
• To discuss file concept, file attributes, and file operations.
• To explain access methods (including sequential and direct
method) , and directory overview.
What is file system?
For most users, the file system is the most visible aspect
of an operating system. It provides the mechanism for
on-line storage of and access to both data and programs
of the operating system and all the users of the
computer system.
File Concept
Computers can store information on various storage
media, such as magnetic disks, magnetic tapes, and
optical disks.
File Attributes
A file is named, for the convenience of its human users,
and is referred to by its name.
A file’s attributes vary from one operating system to
another but typically consist of these:
• Name. The symbolic file name is the only information kept
in human readable form.
• Identifier. This unique tag, usually a number, identifies the
file within the file system; it is the non-human-readable
name for the file.
• Type. This information is needed for systems that support
different types of files.
• Location. This information is a pointer to a device and to
the location of the file on that device.
• Size. The current size of the file (in bytes, words, or
blocks) and possibly the maximum allowed size are
included in this attribute.
• Protection. Access-control information determines who
can do reading, writing, executing, and so on.
• Time, date, and user identification. This information
may be kept for creation, last modification, and last use.
These data can be useful for protection, security, and
usage monitoring.
File Operations
A file is an abstract data type. To define a file properly,
we need to consider the operations that can be
performed on files.
Six basic file operations:
• Creating a file. Two steps are necessary to create a
file.
• Writing a file. To write a file, we make a system call
specifying both the name of the file and the information
to be written to the file
• Reading a file. To read from a file, we use a system call
that specifies the name of the file and where (in
memory) the next block of the file should be put.
• Repositioning within a file. The directory is searched for
the appropriate entry, and the current-file-position
pointer is repositioned to a given value.
• Deleting a file. To delete a file, we search the directory
for the named file.
• Truncating a file. The user may want to erase the
contents of a file but keep its attributes.
File Types
When we design a file system—indeed, an entire
operating system—we always consider whether the
operating system should recognize and support file
types.
File Structure
File types also can be used to indicate the internal
structure of the file.
Internal File Structure
Internally, locating an offset within a file can be
complicated for the operating system.
Access Methods
Files store information. When it is used, this information
must be accessed and read into computer memory.
Sequential Access
The simplest access method is sequential access.
Information in the file is processed in order, one record
after the other.
Direct Access
Another method is direct access (or relative access).
Here, a file is made up of fixed-length logical records
that allow programs to read and write records rapidly in
no particular order.
Other Access Methods
Other access methods can be built on top of a direct-
access method.
Directory Overview
The directory can be viewed as a symbol table that
translates file names into their directory entries.
When considering a particular directory structure, we need to keep in mind
the operations that are to be performed on a directory:
• Search for a file. We need to be able to search a
directory structure to find the entry for a particular file.
• Create a file. New files need to be created and added
to the directory.
• Delete a file. When a file is no longer needed, we want
to be able to remove it from the directory.
• List a directory. We need to be able to list the files in a
directory and the contents of the directory entry for
each file in the list.
• Rename a file. Because the name of a file represents
its contents to its users.
• Traverse the file system. We may wish to access every
directory and every file within a directory structure.
REFERENCE:
• Gagne, Galvin, and Silberschatz. Operating-System-Concepts, 9th
Edition, 2012
Thank you!

(file systems)12312321321321312312312.pptx

  • 1.
    MIT 201- ADVANCEDOPERATING SYSTERM AND NETWORKING Instructor: JOHN ED AUGUSTUS ESCORIAL , MIT Presenter: VAN O. AMPANG
  • 2.
    File Systems, FileSystem Performance
  • 3.
    CHAPTER OBJECTIVES • Todiscuss what is file systems. • To explain the function of file systems. • To discuss file concept, file attributes, and file operations. • To explain access methods (including sequential and direct method) , and directory overview.
  • 4.
    What is filesystem?
  • 5.
    For most users,the file system is the most visible aspect of an operating system. It provides the mechanism for on-line storage of and access to both data and programs of the operating system and all the users of the computer system.
  • 6.
    File Concept Computers canstore information on various storage media, such as magnetic disks, magnetic tapes, and optical disks.
  • 7.
    File Attributes A fileis named, for the convenience of its human users, and is referred to by its name.
  • 8.
    A file’s attributesvary from one operating system to another but typically consist of these:
  • 9.
    • Name. Thesymbolic file name is the only information kept in human readable form. • Identifier. This unique tag, usually a number, identifies the file within the file system; it is the non-human-readable name for the file. • Type. This information is needed for systems that support different types of files. • Location. This information is a pointer to a device and to the location of the file on that device.
  • 10.
    • Size. Thecurrent size of the file (in bytes, words, or blocks) and possibly the maximum allowed size are included in this attribute. • Protection. Access-control information determines who can do reading, writing, executing, and so on. • Time, date, and user identification. This information may be kept for creation, last modification, and last use. These data can be useful for protection, security, and usage monitoring.
  • 11.
    File Operations A fileis an abstract data type. To define a file properly, we need to consider the operations that can be performed on files.
  • 12.
    Six basic fileoperations:
  • 13.
    • Creating afile. Two steps are necessary to create a file. • Writing a file. To write a file, we make a system call specifying both the name of the file and the information to be written to the file • Reading a file. To read from a file, we use a system call that specifies the name of the file and where (in memory) the next block of the file should be put.
  • 14.
    • Repositioning withina file. The directory is searched for the appropriate entry, and the current-file-position pointer is repositioned to a given value. • Deleting a file. To delete a file, we search the directory for the named file. • Truncating a file. The user may want to erase the contents of a file but keep its attributes.
  • 15.
    File Types When wedesign a file system—indeed, an entire operating system—we always consider whether the operating system should recognize and support file types.
  • 17.
    File Structure File typesalso can be used to indicate the internal structure of the file.
  • 18.
    Internal File Structure Internally,locating an offset within a file can be complicated for the operating system.
  • 19.
    Access Methods Files storeinformation. When it is used, this information must be accessed and read into computer memory.
  • 20.
    Sequential Access The simplestaccess method is sequential access. Information in the file is processed in order, one record after the other.
  • 21.
    Direct Access Another methodis direct access (or relative access). Here, a file is made up of fixed-length logical records that allow programs to read and write records rapidly in no particular order.
  • 22.
    Other Access Methods Otheraccess methods can be built on top of a direct- access method.
  • 23.
    Directory Overview The directorycan be viewed as a symbol table that translates file names into their directory entries.
  • 24.
    When considering aparticular directory structure, we need to keep in mind the operations that are to be performed on a directory:
  • 25.
    • Search fora file. We need to be able to search a directory structure to find the entry for a particular file. • Create a file. New files need to be created and added to the directory. • Delete a file. When a file is no longer needed, we want to be able to remove it from the directory.
  • 26.
    • List adirectory. We need to be able to list the files in a directory and the contents of the directory entry for each file in the list. • Rename a file. Because the name of a file represents its contents to its users. • Traverse the file system. We may wish to access every directory and every file within a directory structure.
  • 27.
    REFERENCE: • Gagne, Galvin,and Silberschatz. Operating-System-Concepts, 9th Edition, 2012
  • 28.