
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question

Transcribed Image Text:Compare between the (Single level Directory
and, two level Directory) with Drawing and, Give
one example for each one of them?
Logical structure of a directory:
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 limitations, however, when the number of files
increases or when the system has more than one user. Since all files are in the same
directory, they must have unique names. If two users call their data file test.txt, then
the unique-name rule is violated. For example, in one programming class, 23 students
called the program for their second assignment prog2.c; another 11 called it assign2.c.
Fortunately, most file systems support file names of up to 255 characters, so it is
relatively easy to select unique file names.
Even a single user on a single-level directory may find it difficult to remember the
names of all the files as the number of files increases. It is not uncommon for a user to
have hundreds of files on one computer system and an equal number of additional
files on another system. Keeping track of so many files is a daunting task.
directory caf
bo
a
test
data mail cont
hex records
at
A
C
C
files
2) Two-Level Directory
As we have seen, a single-level directory often leads to confusion of file names
among different users. The standard solution is to create a separate directory for each
user.
In the two-level directory structure, each user has his own user file directory (UFD)
The UFDs have similar structures, but each lists cely the files of a single user. When a
user job starts or a user logs in, the system's master file directory (MFD) is
searched. The MFD is indexed by user name or account number, and each entry
points to the UFD for that user.
When a user refers to a particular file, enly his own UFD is searched. Thus, different
users may have files with the same name, as long as all the file names within each
UFD are unique. To create a file for a user, the operating system searches only that
user's LFD to ascertain whether another file of that name exists. To delete a file, the
operating system confines its search to the local UFD; thus, it cannot accidentally
delete another user's file that has the same name.
directory ser2 user user 4
user fle
cat bo a test
adats a
directory cat
test x data
C C O O C O O Ó Ć C
The user directories themselves must be created and deleted as necessary.
A special system program is run with the appropriate user name and account
information. The program creates a new UFD and adds an entry for it to the MFD.
The execution of this program might be restricted to system administrators. Although
the two-level directory structure solves the name-collision problem, it still has
disadvantages. This structure effectively isolates one user from another. Isolation is an
advantage when the users are completely independent but is a disadvantage when the
users want to cooperate on some task and to access one another's files. Some systems
simply do not allow local user files to be accessed by other users.
If access is to be permitted, one user must have the ability to name a file in another
user's directory. To name a particular file uniquely in a two-level directory, we must
give both the user name and the file name. A two-level directory can be thought of as
a tree, or an inverted tree, of height 2. The root of the tree is the MFD. Its direct
descendants are the UFDs. The descendants of the UFDs are the files themselves. The
files are the leaves of the tree. Specifying a user name and a file name defines a path
in the tree from the root (the MFD) to a leaf (the specified file). Thus, a user name and
a file name define a path name. Every file in the system has a path name. To name a
file uniquely, a user must know the path name of the file desired.
a
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Please attach a picture,I need downloadable images as an answer. The RL can be implemented without dynamically managed linked lists by creating a new field, next, in each PCB, which points to the next PCB on the same list. Each entry of the RL then points to the first PCB on the list. Assume that RL contains 3 processes at level 5 and 1 process at level 0. Draw a diagram showing the RL and the modified PCBs.arrow_forwardShow that, from the perspective of a programmer, deep access is preferable than shallow access, and not only on the basis of performance.arrow_forwardImagine you get a data set from a client that contains addresses from 150 countries all around the world and your task is to verify them, the data is stored in 3 fields – Address Line, City, ZIP code. What you also have available is address verification solution for each country, but the data set does not include the country code. Your task is to design logic that will process the data and find the country for each record, so they can be run through a validation component. Think of the most efficient way.arrow_forward
- From the perspective of a programmer, it is essential to elucidate the superiority of deep access over shallow access, without solely relying on performance as the basis for argumentation?arrow_forwardPascal allows gotos with nonlocal targets. How could such statements be handled if static chains were used for nonlocal variable access? Hint: Consider the way the correct activation record instance of the static parent of a newly enacted procedure is foundarrow_forwardBoth the JSP scriptlet and the JSP expression that are included inside a JSP file are run when the file is processed. If a local variable is declared in the scriptlet, it is still permissible to use that variable in a JSP expression as long as the variable is specified in the scriptlet. Consider it a given that the JSP expression will be placed just after the scriptlet in the order in which it was written. Is this accurate or does it not hold true?arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education