Page 147 - DCAP403_Operating System
P. 147

Operating System




                    Notes          Introduction

                                   Another part of the operating system is the file manager. While the memory manager is responsible


                                   for the maintenance of primary memory, the file manager is responsible for the maintenance of
                                   secondary storage (e.g., hard disks).


                                   Each  file is a named collection of data stored in a device. The  file manager implements this

                                   abstraction and provides directories for organizing files. It also provides a spectrum of commands


                                   to read and write the contents of a file, to set the file read/write position, to set and use the
                                   protection mechanism, to change the ownership, to list files in a directory, and to remove a fi le.

                                   The file manager provides a protection mechanism to allow machine users to administer how

                                   processes executing on behalf of different users can access the information in files. File protection


                                   is a fundamental property of files because it allows different people to store their information on

                                   a shared computer, with the confidence that the information can be kept confi dential.
                                   8.1 File Systems
                                   A file system is a method for storing and organizing computer files and the data they contain to


                                   make it easy to find and access them. File systems may use a data storage device such as a hard

                                   disk or CD-ROM and involve maintaining the physical location of the files, they might provide

                                   access to data on a fi le server by acting as clients for a network protocol (e.g., NFS, SMB, or 9P
                                   clients), or they may be virtual and exist only as an access method for virtual data.
                                   More formally, a file system is a set of abstract data types that are implemented for the storage,

                                   hierarchical organization, manipulation, navigation, access, and retrieval of data. File systems

                                   share much in common with database technology, but it is debatable whether a file system can

                                   be classified as a special-purpose database (DBMS).
                                   8.1.1 Types of File Systems

                                   File system types can be classified into disk file systems, network file systems and special purpose


                                   fi le systems.
                                   1.   Disk fi le systems: A disk fi le system is a fi le system designed for the storage of fi les on a
                                       data storage device, most commonly a disk drive, which might be directly or indirectly
                                       connected to the computer.

                                                 Example: Disk file systems include FAT, FAT32, NTFS, HFS and HFS+, ext2,

                                       ext3, ISO 9660, ODS-5, and UDF. Some disk file systems are journaling file systems or

                                       versioning fi le systems.

                                   2.   Flash fi le systems: A fl ash file system is a file system designed for storing fi les on fl ash

                                       memory devices. These are becoming more prevalent as the number of mobile devices is
                                       increasing, and the capacity of flash memories catches up with hard drives.


                                       While a block device layer can emulate a disk drive so that a disk file system can be used

                                       on a flash device, this is suboptimal for several reasons:
                                       (a)  Erasing blocks: Flash memory blocks have to be explicitly erased before they can be

                                            written to. The time taken to erase blocks can be significant, thus it is benefi cial to
                                            erase unused blocks while the device is idle.

                                       (b)  Random access: Disk file systems are optimized to avoid disk seeks whenever possible,
                                            due to the high cost of seeking. Flash memory devices impose no seek latency.
                                       (c)  Wear leveling: Flash memory devices tend to wear out when a single block is repeatedly

                                            overwritten; fl ash file systems are designed to spread out writes evenly.



          140                              LOVELY PROFESSIONAL UNIVERSITY
   142   143   144   145   146   147   148   149   150   151   152