Advanced operating system
Etefa Belachew
                  Jimma University
               institute of Technology
  faculity of Electrical and Computer Engineering
         December 17, 2022
           Etefa Belachew   Advanced operating system
 CHAPTER THREE
File System Interface, Implementation and
Distributed File Systems
     hear are parts which i am going to discuss about:
   1   File and Directory Structure
   2   File System Mounting
   3   File Sharing and Protection
                         Etefa Belachew   Advanced operating system
File Concept
 A file is a named collection of related information that is recorded
 on secondary storage.
    The information in a file is defined by its creator.
         Since main memory is usually too small, the computer system must
          provide secondary storage to back up main Memory
         The File system provides the mechanism for storage of and (multiple)
          access to both data and programs residing on the disks.
         Data files may be numeric, alphabetic, alphanumeric, or binary
         Files may be free form, such as text files, or maybe formatted rigidly.
         where files are stored? memory
         The File system provides the mechanism for storage of and (multiple)
          access to both data and programs residing on the disks
                             Etefa Belachew   Advanced operating system
File concept cont....
   Basesd on above informatin how can file be defined? A file
  is an object on a computer that storese
     1 data,
     2 information,
     3 settings, or commands used with a computer program.
                        Etefa Belachew   Advanced operating system
File Management System:
  Bridges the gap between low-level disk organization (an array of
  blocks) and the user’s views (a stream or collection of records)
  (mapped).
      Some devices transfer a character or a block of characters at a
       time.
      Some can be accessed only sequentially, others randomly
      Some transfer data synchronously, others asynchronously
      Some are dedicated, some shared.
      They can be read-only or read-write
                           Etefa Belachew   Advanced operating system
File Attributes
  File attributes are pieces of information associated with every file
  and directory that includes additional data about the file itself or its
  contents.
      Name:only information kept in human-readable form
      Identifier:unique tag (number) identifies file within file system
      Type:needed for systems that support different types
      Location:pointer to file location on device
      Size :current file size(in bytes, words, or blocks)
      Protection:controls who can do reading, writing, executing.
      Time, date,:This information may be kept for creation, last
       modification, and last use.
       Information about files are kept in the directory structure,
                             Etefa Belachew   Advanced operating system
File Operations:
  File is an abstract data type. To define a file properly, we need to
  consider the operations that can be performed on files.
     1  Create: while creating cheack space then new file is placed .
     2  Write:To write a file, we make a system call specifying both
        the name and the information to be written to the file.
     3   Read:: just reading from spesfic dirctory
     4   Re-position:chanching position to some where neded.
     5  Delete:: realseing the file out of the directory.
     6  Truncate::erasing the content of file keeping its attiributes
     7  Open(Fi): – search the directory structure on disk for entry
        Fi, and move the content of entry to memory
     8   Close (Fi): – move the content of entry Fi in memory to
                           Etefa Belachew   Advanced operating system
File Type
     A common technique for implementing file types is to include
      the type as part of the file name.
     The name is split into two parts-a name and an extension,
      usually separated by a period character
     In this way, the user and the operating system can tell from
      the name alone what the type of a file is.
     File name examples include resullze.doc, Server.java, and aaa.c
                          Etefa Belachew   Advanced operating system
File Type
            Etefa Belachew   Advanced operating system
File Directory
    To keep track of files, file systems normally have directories or
     folders
    Usually, a directory is itself a file
    The directory can be viewed as a symbol table that translates
     file names into their directory entries
    A typical directory entry contains information (attributes,
     location, ownership) about a file
                          Etefa Belachew   Advanced operating system
File Directory(cont.....)
  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.
      Delete a file
      List a directory.
      Rename a file
      Traverse the file system
  Organize the Directory (Logically) to Obtain:
     Efficiency
     Naming
     Grouping
                           Etefa Belachew   Advanced operating system
Types file directory:
  Single level Directory
     The simplest directory structure is the single-level directory
     A single-level directory has significant limitations, when Direct
      (Random) Access the number of files increases or when the
      system has more than one user.
                            Etefa Belachew   Advanced operating system
Types file directory cont ...:
  two level Directory
     In the two-level directory structure, each user has his own user
      file directory (UFD)
     The UFDs have similar structures, but each lists only the files
      of a single user.
     Can have the same file name for different user.
                           Etefa Belachew   Advanced operating system
Types file directory cont...:
  Tree-Structured Directories
     The tree has a root directory, and every file in the system has
      a unique path name
                           Etefa Belachew   Advanced operating system
Types file directory cont...:
  acyclic-Structured Directories
     This is a generalization of Tree-structured directory
     An acyclic graph (a graph with no cycles) allows directories to
      share subdirectories and files
                           Etefa Belachew   Advanced operating system
File System Mounting
  what mounting stands for?
    Mounting refers to the grouping of files in a file system
     structure accessible to the user of the group of users.
    It can be either
          local: in such case mounting, it connects disk drivers as one machine,
           or
          remote mounting: remote mounting it uses Network File System
           (NFS) to connect to directories on other machines so that they can
           be used as if they are the part of the user’s file system.
                              Etefa Belachew   Advanced operating system
File system mounting cont ...
     The directory structure built out of multiple volume must be
      mounted to make them available with in file system.
     Mounting file system attaches that the file to directory(mount
      point) and makes it available to system.The root(/) file
      system is always mounted.
     Lets consider the following diagrams for further illustration.
                          Etefa Belachew   Advanced operating system
File System Mounting cont...
  Suppose let a be unmounted and b be going to be mounted.
                         Etefa Belachew   Advanced operating system
File System Mounting cont...
  Hear is the procedure to mount the file.
                           Etefa Belachew   Advanced operating system
File System Mounting cont...
  After mounting we get the figure below .
                          Etefa Belachew   Advanced operating system
File Sharing
     When an OS accommodates multiple users, the issues of file
      sharing, file naming, and file protection become important.
     Most systems have evolved to use the concepts of file (or
      directory) owner (or user) and group
         The owner is the user who can change attributes and grant
         The group attribute defines a subset of users who can share File
          access to the file.
     Sharing of files on multi-user systems is desirable
     Sharing may be done through a protection scheme
     On distributed systems, files may be shared across a network
      which is so called(NFS)
                             Etefa Belachew   Advanced operating system
File Sharing cont.....
  File Sharing – Multiple Users
     User IDs identify users, allowing permissions and protections
       to be per-user.
     Group IDs allow users to be in groups, permitting group
       access rights.
                          Etefa Belachew   Advanced operating system
file Protection
     When information is stored in a computer system, we want to
      keep it safe from physical damage (reliability) and improper
      access (protection)
     File systems can be damaged by hardware problems (such as
      errors in reading or writing), power surges or failures, head
      crashes, dirt, temperature extremes, and vandalism
                          Etefa Belachew   Advanced operating system
Types of Access
    The need to protect files is a direct result of the ability to an
     access files.
         Systems that do not permit access to the files of other users do not
          need protection
         Alternatively, we could provide free access with no protection.
    Both approaches are too extreme for general use. What is
     needed is controlled access.
    Several types of operation can be controlled
         like(Read,Write,Execute,Append,Delete,List).
                             Etefa Belachew   Advanced operating system
THIS BRINGS THE END ON MY PART
  THANKS FOR YOUR ATENSION
         Etefa Belachew   Advanced operating system