LOGICAL STRUCTURE OF A DIRECTORY


The various logical structure of a directory is as follows:

§  Single Level Directory

§  Two Level Directory

§  Tree Structure Directory

Single Level Directory:

§  It is the simplest form of directory structure having only one level of directories.

§  All the file are contained in the same directory.

§  So, all files should have unique name that no two users can have same file name as the files of all users are stored in same directory.

Advantages:

§  It is simple, easy to understand.

§  Easy to find the file.

Disadvantages:

§  It requires unique file names so no two users can have a same file name.

§  It does not provide the method to organise the files.

§  It is difficult to remember all file names and creates files with unique name.

Two Level Directories:

§  This kind of directory structure supports two levels of directories that a Master File Directory and User File Directory as sub- directories of master directory.

§  In This Structure, Different users have different directories containing their own files only.

§  In this system, the combination of user name and file name serves as pathname for a file. When a user refers to a particular file, his own User File Directory is searched.

Advantages:

§  The file of different users is separated from each other as each user has its own directory.

§  It solves the problem of name-collision as observed in single level directory. Two users can have same file name in their own directories.

§  Search options for files are efficient as compared to single level directory structure.

Disadvantages:

§  Sharing of file by different users is difficult.

§  Some systems do not allow sharing the files.

Tree Level Directory:

§  It is the most common, powerful and flexible structure implemented in almost every operating system.

§  It is just extension of two level directory structures.

§  It uses the same concept of two level directory structure of master file directory having user file directories as subdirectories.

§  Each user has User file Directory and sub directories and files.

§  In tree structure, file can be referred in two ways: Absolute Pathname andRelative Pathname

§  Absolute Pathname starts from the root directory and ends at the required file following a path of directories and subdirectories. For example: the path c:/windows/pro/abc.txt represents the absolute path.

§  Relative Pathname starts from the current directory to the file. For example: /user/cd. then a file whose absolute path is /user/cd/ss can be referred simply as ‘ss’.

Advantages:

§  It is simple and easy to use. All users have different directories and their subdirectories.

§  Now different users can keep the same file name in their own directories.

§  It provides efficient searching by absolute or relative path.

Disadvantages:

§  The files cannot be shared of different users.

Advertisements

One thought on “LOGICAL STRUCTURE OF A DIRECTORY”

Give A message for us

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s