o Also referred to as simply a file system orfilesystem.
o The system that an operating system or program uses to organize and keep track of files.
o For example, a hierarchical file system is one that uses directories to organize files into a tree structure.
o Although the operating system provides its own file management system, you can buy separate file management systems.
o These systems interact smoothly with the operating system but provide more features, such as improved backup procedures and stricter file protection.
1. Single level Directory
· The simplest directory structure is the single-level directory.
· All files are contained in the same directory, which is easy to support and understand.
· A single level directory has significant limitation, however, when the number of the file increases or when there is more than one user.
· Since all files are in the same directory, they must have unique names.
· If we have two users who call their data file test, then the unique name rule is violated.
· For example in one programming class 23 student call the program for their second assignment prog2: another 11 call it assign2.
· Although file names are generally selected to reflect the content of the file, there are often limited in length.
· The MS-DOS operating system allows only 11 characters file names: Unix allows 255 characters.
· Even with a single user, as the number of files increases, it becomes difficult to remember the name of all the file, so as to create only file with unique name.
· It is not uncommon for a user to have 100 of files on one computer system and an equal number of additional files on another system.
· In such an environment, keeping track of so many files is a daunting task.
2. Two level directory
The major disadvantage to a single level directory is the confusion of file names between different users.
The standard solution is to create a separate directory for each user.
· In the two level directory structures, each user has her own user file directory (UFD).
· Each UFD has a similar structure, but lists only the files of a single user.
· When a user job starts or a user log in, the system master file directory (MFD), is search.
· The master file directory is index by user name or account number, and each entry point to the UFD for that user.
· When a user refers to a particular file, only his own UFD is search.
· Thus different users may have files with the same name, as long as all the file names within it UFD are unique.
3. Multilevel directory
· Once have seen how to view a two level directory as two-level tree, the natural generalization is to extend the directory structure to a tree of a arbitrary height.
· This generalization allows users to create their own subdirectories and to organize their files accordingly.
· The MS-DOS system for instance is structured as a tree.
· In fact a tree is the most common directory structure.
· The tree has a root directory.
· Every files in the system has a unique path name.
· A path name is the path from the root through all the sub directories to a specified file.
Access Right
· None: The user may not even learn of the existence of the file much less access it. To enforce this restriction, the user is not allowed to read the user directory that includes this file.
· Knowledge: The user can determine that the file exists and who its owner is. The user is then able to petition the owner for additional access rights
· Execution: The user can load and execute a program but cannot copy it. Proprietary programs are often made accessible with this restriction.
· Reading: The user can read the file for any purpose, including copying and execution. Some system is able to enforce a distinction between viewing and copying. In the former case, the content of the file can be displayed to the user, but the user has no means for making copy.
· Appending: The user can add data to the file, often only at the end, but cannot modify or delete any of the file’s content. This right is useful in collecting data from a number of sources.
· Updating: The user can modify, delete and add to the file’s data. Updating normally includes writing the file initially, rewriting it completely or in part and removing all or portion of the data. Some systems distinguish among different degrees of updating.
- Changing protection: The user can change the access rights granted to other users. Typically this right is held only by the owner of the file. In some systems, the owner can extend this right to others. To prevent abuse of this mechanism, the file owner is typically able to specify which rights can be changed by the holder of this right.
· Deletion: The user can delete the file from the file system.
Secondary Storage Organization Program
A file may contain more than one block of secondary storage. It means few block should linking to form file. There are three methods which are:
· Linking block
· File map
· Index block
Linking block
· Every block that use to from a file will link using a pointer.
· The pointer in UFD (User file directory) link to the first block in a chain.
· The Problem to this method is there are many access to disk and need to be done to find the last file, for example to delete file, clear information about the earlier position of the file.
File map
· This method linking the block to form a file and were recorded using file map.
· It is known as file scheduling.
· The pointer in the file of UFD will link to the location in the map file which is representing the first block to form the file.
· The last block will stated using zero pointers.
Index Block
· This method will link the entire block using the index block.
· The pointer in the UFD will link to that index block.
· The advantage of this method is file can be accessed without parallel system.
While the disadvantages are too many space should be used to keep the index block.
No comments:
Post a Comment