Page 156 - DCAP403_Operating System
P. 156

Unit 8: File Management





           /sbin  Contains files needed to boot the machine and mount the /usr file system. Most of the   Notes



                 commands used during booting come from the boot image’s RAM disk file system; therefore,
                 very few commands reside in the /sbin directory.

           /tmp  Serves as a mount point for a file system that contains system-generated temporary fi les.
           /u    Symbolic link to the /home directory.

           /usr  Serves as a mount point for a file system containing files that do not change and can be shared

                 by machines (such as executable programs and ASCII documentation).
                 Standalone machines mount a separate local file system over the /usr directory. Diskless and

                 disk-poor machines mount a directory from a remote server over the /usr fi le system.
           /var  Serves as a mount point for files that vary on each machine. The /var file system is confi gured as


                 a file system because the files that it contains tend to grow. For example, it is a symbolic link to


                 the /usr/tmp directory, which contains temporary work fi les.
              Task    How will you mount a fi le? Explain.
          8.6 File Sharing


          In today’s world where the working is a multiuser environment a file is required to be shared

          among more than one users. There are several techniques and approaches to effects this operation.

          Simple approach is to copy the file at the users local hard disk. This approach essentially creates

          to different files, in therefore cannot be treated as fi le sharing.

          A file can be shared in three different modes:
          1.   Read only: The user can only read or copy the fi le.
          2.   Linked shared: All the users can share the file and can make the changes  but the changes



               are reflected in the order defined by the operating systems.

          3.   Exclusive mode: The file is acquired by one single user who can make the changes while
               others can only read or copy it.
          Sharing can also be done through symbolic links, but there occurs certain problems like concurrent
          updation problem, deletion problem. Updation cannot be done simultaneously by two users at
          a time, also one cannot delete a file if it in use by another user. The solution for this problem is

          done by locking fi le techniques.
          8.7 Protection


          The data in the computer system should be protected and kept secure. A major concern is to
          protect data  from both physical damage (reliability) and improper access (protection). There is
          a mechanisms in the computer system that a system program or manually it can take the backup

          or duplicate the files automatically. File systems can be damaged by hardware problems (such as
          errors in reading or writing), power surges or failures, head crashes, dirt, temperature extremes.
          Also the data can be lost due to bugs on system. Protection can be provided in many ways. For
          a small single-user system, you might provide protection by physically removing the fl oppy
          disks and locking them in a desk drawer or file cabinet. In a multi-user system, however, other

          mechanisms are needed.
          8.8 File System Implementation


          The most important issue in file storage is keeping track of which disk blocks go with which


          file. Different operating systems use different methods - contiguous allocation and linked list

                                           LOVELY PROFESSIONAL UNIVERSITY                                   149
   151   152   153   154   155   156   157   158   159   160   161