Organize the Directory (Logically) to Obtain 且织目录的逻辑结构 Efficiency- locating a file quickly.(效率:快速的定位一个文 件) Naming- convenient to users.(命名:方便用户) Two users can have same name for different files (两个用户可以有相同名字的不同文件) The same file can have several different names (相同的文件可以有不同的名字) Grouping-logical grouping of files by properties, (e. g all Pascal programs, all games,.) (分组:从逻辑上对文件按属性进行分组,比如所有的 Pasca程 序,游戏) Applied Operating System Concepts 11 Silberschatz, Galvin, and Gagne @1999
11.11 Silberschatz, Galvin, and Gagne ©1999 Applied Operating System Concepts Organize the Directory (Logically) to Obtain 组织目录的逻辑结构 • Efficiency – locating a file quickly.(效率:快速的定位一个文 件) • Naming – convenient to users.(命名:方便用户) – Two users can have same name for different files. (两个用户可以有相同名字的不同文件) – The same file can have several different names. (相同的文件可以有不同的名字) • Grouping – logical grouping of files by properties, (e.g., all Pascal programs, all games, …) (分组:从逻辑上对文件按属性进行分组,比如所有的Pascal程 序,游戏)
Single-Leve| Directory(单级目录) A single directory for all users.(一个对所有用户的简单目录结构) directory test data mail cont hex records file Naming problem(命名问题) Grouping problem(分组) Applied Operating System Concepts Silberschatz, Galvin, and Gagne @1999
11.12 Silberschatz, Galvin, and Gagne ©1999 Applied Operating System Concepts Single-Level Directory(单级目录) • A single directory for all users.(一个对所有用户的简单目录结构) • Naming problem(命名问题) • Grouping problem(分组)
TWo-eve| Directory(二级目录 Separate directory for each user.(每个用户有单独的目录结构 master file user 1 user 2 user 3 user 4 ory user file directorat a data a test data a ° Path name(路径名) ° Can have the same file name for different user(不同的用户可以有相 Efficient searching(有效率的搜索) No grouping capability(无法分组) Applied Operating System Concepts Silberschatz, Galvin, and Gagne @1999
11.13 Silberschatz, Galvin, and Gagne ©1999 Applied Operating System Concepts Two-Level Directory(二级目录) • Separate directory for each user.(每个用户有单独的目录结构 ) • Path name(路径名) • Can have the same file name for different user(不同的用户可以有相 同 • Efficient searching(有效率的搜索) • No grouping capability(无法分组)
Tree-Structured directories(树型目录) root spell programs stat mail dist find count hex reorder prog copy prt exp reorder list find hex count sp last first Applied Operating System Concepts Silberschatz, Galvin, and Gagne @1999
11.14 Silberschatz, Galvin, and Gagne ©1999 Applied Operating System Concepts Tree-Structured Directories(树型目录)