19c in this organization also there is a separate

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Name structure attributes containing file data (Disk address) Figure 14.18. Typical contents of a directory. There is one entry per file. When a new file is created, an entry for it is created in the directory, and when a file is deleted, its corresponding entry is deleted from the directory. When an existing file is opened for use, the operating system searches its corresponding entry in the directory and then extracts its attributes and disk addresses, and loads them in a table in main memory. All subsequent references to the file use this information in main memory. Directory Organization The number of directories used and the way these directories are organized varies from one system to another. The following three types of organizations are commonly used: 1. Single directory. This is the simplest organization. As shown in Figure 14.19(a), in this case, a single directory contains entries for all the files in the system. Although this organization is simple to implement, it has significant limitations when the number of files increases or when there are more than one users. As the number of files increases, it becomes difficult to remember the names of all the files in order to create new files with unique names. Similarly, in a system having multiple users, if two users choose the same file name, the system will not accept the file name of the user who did so later than the other user because it violates the unique-name rule. Such conflicts and confusions make this directory organization unsuitable for multi-user systems. Hence it is used only by the most primitive microcomputer operating systems. This organization is popularly known as flat directory structure. 2. One directory per user. As shown in Figure 14.19(b), in this organization, there is a separate directory for each user. The names of all the files belonging to a particular user are listed in his/her directory. As a file name needs to be unique only within a directory, different users can have files with the same name. This overcomes the limitation of file name conflicts among users...
View Full Document

This document was uploaded on 04/07/2014.

Ask a homework question - tutors are online