os202

Logo

OS202 - johanessteven19 - Updated Weekly throughout the semester!

View the Project on GitHub johanessteven19/os202

Back to Home


Top 10 List of Week 03

  1. About files.
    Files, in the context of computers, refer to an abstract data type that is defined and implemented into the computer by the Operating System. Each file will store a sequence of logical records that may either be a byte, a line, or more complex data items. What these logical records mean is defined by its creator and user. These files are usually stored on a secondary hardware, such as magnetic disks and optical disks. Every file on the computer will have a format that may or may not be accessible by the operating system. For example, MacOS by itself cannot open .exe files without the help of other programs.
    Source: OSC Chapter 13.

  2. The role of OS in managing files.
    Each file that still exists as a logical file concept has to be mapped onto an actual physical storage device, such as the hard disk of a computer. This task itself is what makes the user able to access files through the usage of the Operating System. The user may also organize files into certain directories that can be sorted. The directory will contain information such as date of creation, name, type and length of file, etc. All of this is available through the usage of Operating Systems.
    Source: OSC Chapter 13.

  3. Protection of files.
    Since files are used to store various types of data that may or may not be critical to the user, each file will need to be protected from outside threats, such as hackers, etc. Therefore, each file is attached with a ‘permission level’. Each file access could be limited by these permission levels, such as only being able to read the file, only being able to read-and-write, all the way up to full permission, where the user can read, write, execute, append, delete, list directory, so on and so forth. These permission levels can be bypassed by the usage of secret keys such as passwords, etc.
    Source: OSC Chapter 13.

  4. File storage.
    Files are organized and managed by a file system. These file systems are stored permanently secondary storage device that can be partitioned to allow multiple varying types of file systems on a single device. They are mounted onto a specific logical architecture to then be used. The system will then allocate the appropriate space for each file on the file system.
    Source: OSC Chapter 14.

  5. File systems.
    File systems are created to be the methods and data structures that is utilized by the OS itself to keep track of the many, many files stored on a disk or a partitioned storage space. The main concepts to undestand about UNIX file system are the:
    • superblock, contains the general information about the file system (e.g. size, etc.).
    • inode, contains all of the information about a single file, excluding its name.
    • data block, located inside of an inode, stores the file’s data.
    • directory block, stores the name of the file and how many inodes needed to store informations regarding the file.
    • indirection block, used as extra space to be allocated dynamically if needed.
      Source: The Linux Documentation Project.
  6. Using the file systems.
    To use the created file systems, we have to first mount it onto a particular mount point in a directory tree. The OS will automatically manage and organize everything so that the file system is accessible. UNIX and Linux-based operating systems will then create a singular directory tree that will contain every file of the file system such that they will be accessible from an existing subdirectory.It should be noted that each particular file system will have their own directory tree. The file system can also be unmounted whenever it is no longer necessary.
    Source: The Linux Documentation Project.

  7. Common types of Linux file systems.
    • minix, the oldest and most reliable.
    • xia, the modified version of minix, that does not have limitations on file names and sizes.
    • ext2, most featureful native Linux file system.
    • ext, ancient version of ext2, is considered obsolete.
    • ext3, same as ext2, but with added journaling. Also the most popular.
    • reiserfs, a robust file system that allows journaling that prevents sudden data loss.
    • jfs, IBM-designed file system to be used in high performance environments.
    • xfs, designed to maintain high performance with large files.
    • msdos, compatible with the MS-DOS FAT file systems.
    • nfs, a networked file system that allows sharing between computers.
      Source: The Linux Documentation Project.
  8. Creating a file system.
    Using the mkfs command, will initialize a file system that can then be used. There are several flags that can be used to customize the file system.
    • -t fstype, selects the type of file system.
    • -c, searches and initializes bad blocks.
    • -l filename, reads initial bad block list from the name file.
      Source: The Linux Documentation Project.
  9. File system details.
    There are many file system types provided by the general-purpose OS, ranging from special-purpose to general. When the system is powered on, the boot loader will always boot at least one file system. The desired file system can be selected by the administrator. The file system does not have to be stored locally, as remote file systems can now be implemented by usage of the program ftp, or by connecting through web servers and clients through the internet. The remote user will have to send a mount request and be authenticated before sharing is possible.
    Source: OSC Chapter 15.

  10. File system maintenance.
    To maintain structural integrity of the file system, there are many methods that can be utilized. The consistency checker will repair any damaged structure that is detected. The OS will also provide backup tools that will allow stored data to be copied onto a separate storage device. Therefore, the user can recover files that may be lost or damaged from hardware failure, OS bugs, or even accidental deletion.
    Source: OSC Chapter 14.