The file system is an integral part of any operating system with long-term storage capabilities.The file system has two different parts, the mechanism for storing files and the directory structure for organizing files.In modern operating systems, several users may access the same files at the same time, so it is also necessary to implement functions such as access control and different forms of file protection.The file is a collection of binary data.A file can represent a program, a document, or, in some cases, part of the file system itself.In modern computing, they are usually several different storage devices connected to the same computer.A universal data structure like a file system allows computers to access many different storage devices in the same way, for example, when you look at the contents of a hard disk or cd, you can view it through the same interface, although they are completely different media and the data is mapped on them in a completely different way.There can be very different data structures inside the file, but they can all be accessed by the same method built into the file system.The arrangement of the data in the file is then determined by the program that created the data.The file system also stores some properties for the files in it.All files have a name that the user can access.In most modern file systems, the name consists of three parts, the unique name, term, and extension.File \ 'bob, for example.Jpg "is uniquely identified by the first word" bob "and the extension jpg indicates that it is a jpeg image file.The file extension allows the operating system to decide what to do if someone tries to open the file.The operating system maintains a list of associated file extensions.Should the user try to access \ 'bob.Jpg \ 'then whatever the system default image viewer is, it is likely to be opened.The system also stores the location of the file.In some file systems, files can only be stored as a continuous block.This simplifies the storage and access of files, because the system only needs to know the start location and size of the file on disk.However, this does cause complexity if you want to expand or delete files, as there may not be enough space to accommodate larger versions of files.Most modern file systems overcome this problem by using linked file allocation.This allows files to be stored in any number of segments.The file system then has to store where each block of the file is and how big they are.This greatly simplifies file space allocation, but is slower than continuous allocation because files can be distributed on disk.Modern operating systems overcome this defect by providing disk defragmenting programs.This is a utility that can rearrange all files on disk so that all files can be placed in continuous blocks.Information about file protection is also integrated into the file system.The scope of protection can start with a simple system implemented in the FAT system of early windows where files can be marked as read-For more secure systems implemented in NTFS, file system administrators can set separate read and write access rights for different users or user groups.Although File Protection adds a lot of complexity and potential difficulties, systems (such as raptors) can be shared over a network or over time by many different computers or users.Some file systems also store data about which user created the file and when it was created.Although this is not important for the operation of the file system, it is useful for the users of the system.In order for the file system to function properly, they need some defined actions to create, open, and edit files.Almost all file systems provide the same basic way to manipulate files.The file system must be able to create the file.To do this, there must be enough space on the drive to hold the file.There must also be no other files in the directory, which will be placed under the same name.After the file is created, all of the above properties will be recorded by the system.We may need to edit the file after it is created.This may just simply attach some data to the end of it, or delete or replace the data already stored in it.When doing so, the system keeps a write pointer that marks the location of the next write file.It must of course be readable in order for the file to be useful.To do this, you need to know the name and path of the file.Therefore, the file system can determine where the file is stored on the drive.The system keeps the Read pointer while reading the file.This store will read which part of the drive will follow.In some cases, it is not possible to simply read all files into memory.The file system also allows you to reposition the Read pointer in the file.To do this, the system needs to know the distance you want to read the pointer to jump to the file.A database system is a useful example.When querying the database, it is obviously invalid to read the entire file to the location where the required data is located. On the contrary, the application that manages the database will determine the location of the required data in the file, and jump to the location.This operation is often called file lookup.The file system also allows you to delete files.To do this, it needs to know the name and path of the file.To delete a file, the system simply removes its entry from the directory structure and adds all the space it used to occupy to the list of available spaces (or any other available space management system it uses)These are the most basic operations required for the file system to work properly.They exist in all modern computer file systems, but their functions may vary.For example, a delete File operation is performed in a modern file system like NTFS, where file protection is built in, which will be more complicated than the same operation in an old file system like FAT.Before proceeding, both systems first check that the file is in use, and then NTFS must check that the user who is currently deleting the file has permission to do so.Some file systems also allow multiple people to open the same file at the same time, and if other users currently open the file, it must be decided whether the user has the right to write the file back to disk.If two users have read and write permissions for the file, should one user be allowed to overwrite it while the other user still opens the file?Or, if a user has read-Write permissions and the other have only read permissions on the file. If no other user has the opportunity to try to overwrite the file as well, should a user with write permission be allowed to overwrite it?Different file systems also support different ways of accessing.The easiest way to access information in a file is sequential access.This is where the information in the file accesses a record at once from the beginning.To change the location in the file, you can re-circle or forward some records, or reset to the beginning of the file.This access method is based on the file storage system of the tape drive, but can also work on sequential access devices such as modern DAT tape drives as on random devicesAccess (such as a hard drive ).Although this method is very simple to operate and is very suitable for certain tasks, such as playing media, this method is very simple for more complex tasks, such as database management.A more modern approach is direct access, a way to better facilitate reading is unlikely to be a sequential task.Direct access allows to read or write records in any order required by the application.This method of allowing any part of the file to be read in any order is more suitable for modern hard drives, as they also allow any part of the drive to be read in any order, and there is little reduction in the transmission rate.Direct access is more appropriate for most applications than sequential access, as it is designed around the most common storage media used today, rather than storage media that are no longer used except for large offline backups-ups.Given the way direct access works, it is also possible to build other access methods based on direct access, such as sequential access or the creation of indexes of all records of a file, to speed up the search of data in the file.In addition to storing and managing files on the drive, the file system maintains a directory system that references files.Modern hard drives store hundreds of gigabytes.The file system helps organize this data by dividing it into directories.The directory can contain files or more directories.Like a file, the file system needs to perform several basic operations on its directory structure to work properly.It needs to be able to create a file.This is also included in the peration overview on the file, but it needs to be added to the directory structure in addition to creating the file.When deleting a file, you need to mark the space occupied by the file as free space.The file itself also needs to be removed from the directory structure.You may need to rename the file.This requires changes to the directory structure, but the file itself still does notchanged.List a directory.In order to use the disk properly, the user needs to know what is stored in all disks on the disk.In addition, users need to be able to browse the directory on the hard drive.Since designing the first directory structure, they have gone through several major developments.Before applying the directory structure to the file system, all files are stored at the same level.This is basically a system where all files are saved in one directory.The next progress in this area will be considered as the first directory structure, the secondary directory.Here, there is a single list of directories that are on the same level.These files are then stored in these directories.This allows different users and applications to store files separately.After that, we know the first directory structure, the directory tree, today.The tree structure directory is improved on two levels of directories by allowing directories and files to be stored in the directory.All modern file systems use tree-structure directories, but many file systems have additional features, such as security built on top of them.Protection can be achieved in many ways.Some file systems allow you to have a directory protected by a password.In this system.The file system does not allow you to access the directory until the user name and password of a given directory.Others extend this system by granting different user or group access.The operating system requires users to log in before using the computer, and then restrict their access to areas they do not have access.The system used by the computer science department for the submission of storage space and Raptor courses is a good example.In file systems like NTFS, the use of all types of storage space, network access, and printers can be controlled in this way.Other types of access control can also be implemented outside of the file system.Apps like win zip, for example, allow you to password protect files.At present, we can use many different file systems on many different platforms, depending on the type of application and the size of the drive, different situations are suitable for different file systems.If you are designing a file system for a tape backup system, then the sequential access method is more appropriate than the direct access method, given the limitations of the hardware.Also, if you have a small hard drive on your home computer, there is no real advantage in using a more complex file system because it doesn't need features like protection.If I were to design a filesystem for a 10 gb drive, I would use continuous link allocation to make the most efficient use of drive space and limit the time it takes to maintain the drive.I will also design a direct access method on the sequential access method to take full advantage of the hardware.The directory structure will be tree-based to allow for better organization of information on the drive and allow non-looping directories to make it easier for several users to work on the same project.It will also have a file protection system that allows different user groups to have different access rights and password protection for directories and individual files.At present, several file systems have implemented the ideal functions of the 10 Gig hard disk I described above, including NTFS for Windows NT and XP operating systems and ext2 used in linux