Computer Science, asked by cosmic999, 7 months ago

Explain how are files being organised in a Directory System.(long answer)​

Answers

Answered by KeshaDesai
0

Explanation:

Files are organized by storing related files in the same directory. In a hierarchical file system (that is, one in which files and directories are organized in a manner that resembles a tree), a directory contained inside another directory is called a subdirectory.

Answered by Anonymous
1

Answer:

Explanation:

There are several logical structures of a directory, these are given below.

Single-level directory –

Single level directory is simplest directory structure.In it all files are contained in same directory which make it easy to support and understand.

A single level directory has a significant limitation, however, when the number of files increases or when the system has more than one user. Since all the files are in the same directory, they must have the unique name . if two users call their dataset test, then the unique name rule violated.

Advantages:

Since it is a single directory, so its implementation is very easy.

If the files are smaller in size, searching will become faster.

The operations like file creation, searching, deletion, updating are very easy in such a directory structure.

Disadvantages:

There may chance of name collision because two files can not have the same name.

Searching will become time taking if the directory is large.

In this can not group the same type of files together.

Two-level directory –

As we have seen, a single level directory often leads to confusion of files names among different users. the solution to this problem is to create a separate directory for each user.

In the two-level directory structure, each user has there own user files directory (UFD). The UFDs has similar structures, but each lists only the files of a single user. system’s master file directory (MFD) is searches whenever a new user id=s logged in. The MFD is indexed by username or account number, and each entry points to the UFD for that user.

Advantages:

We can give full path like /User-name/directory-name/.

Different users can have same directory as well as file name.

Searching of files become more easy due to path name and user-grouping.

Disadvantages:

A user is not allowed to share files with other users.

Still it not very scalable, two files of the same type cannot be grouped together in the same user.

Tree-structured directory –

Once we have seen a two-level directory as a tree of height 2, the natural generalization is to extend the directory structure to a tree of arbitrary height.

This generalization allows the user to create there own subdirectories and to organize on their files accordingly.

Similar questions