We can label the path names in the previous question as semantic path names. If Bob types

Question:

We can label the path names in the previous question as semantic path names. If Bob types "cd .." while in working directory

d, the command changes the working directory to the directory in which d was created. To make the behavior of ".." more intuitive, Alice proposes that ".." should behave in path names syntactically. That is, the parent of a directory

d, d/.. is the same directory that would obtain if we instead referred to that directory by removing the last path name component of

d. For example, if Bob’s current working directory is /a/b/c and Bob types "cd ..", the result is exactly as if Bob had executed "cd /a/b"

a.If the unix file system were to implement syntactic path names, in which directory would Bob end up after typing the following two commands?

image text in transcribed

b. Under what circumstances do semantic path names and syntactic path names provide the same behavior? A. When the name space of the file system forms an undirected graph. B. When the name space of the file system forms a tree rooted at “/”. C. When there are no synonyms for directories. D. When symbolic links, like hard links, can be used as synonyms only for files.

c. Bob proposes the following implementation of syntactic names. He will first rewrite a path name syntactically to eliminate the "..", and then resolve the rewritten path name forward from the root. Compared to the implementation of semantic path names as described in Section 2.5, what is a disadvantage of this syntactic implementation? A. The syntactic implementation may require many more disk accesses than for semantic path names. B. This cost of the syntactic implementation scales linearly with the number of path name components. C. The syntactic implementation doesn’t work correctly in the presence of hard links. D. The syntactic implementation doesn’t resolve "." correctly in the current working directory.

Step by Step Answer:

Related Book For  book-img-for-question

Principles Of Computer System Design An Introduction

ISBN: 9780123749574

1st Edition

Authors: Jerome H. Saltzer, M. Frans Kaashoek

Question Posted: