File Types- name, extension 文件类型,名称,扩 ile Type Fi Usual extension Function 「 Executable exe, com, bin or ready-to-run machine none language progra Object obL, o complied, machine anguage, not linked Source code C, p, pas, 177 source code in various asm. a languages Batch I bat, sh commands to the commandinterpreter Text txt. doc textual data documents Word processor wp, tex, rrf, etc.various word-processor. formats Library a libraries of routines Print or view ps, dvi, gif ASCll or binary file Archive arc, zip tar related files grouped into one file. sometime compressed Applied Operating System Concepts 116 Silberschatz, Galvin, and Gagne @1999
11.6 Silberschatz, Galvin, and Gagne ©1999 Applied Operating System Concepts File Types – name, extension 文件类型,名称,扩展名 Executable exe, com, bin or none ready-to-run machinelanguage program Object obj, o complied, machine language, not linked Source code c, p, pas, 177, asm, a source code in various languages Batch bat, sh commands to the command interpreter Text txt, doc textual data documents Word processor wp, tex, rrf, etc. various word-processor formats Library lib, a libraries of routines Print or view ps, dvi, gif ASCII or binary file Archive arc, zip, tar related files grouped into one file, sometimes compressed. File Type Usual extension Function
Access Methods(存取方法) Sequential Access(顺序存取) read next(读下一个) write next(写下一个) reset(复位) no read after| ast write(曾读政) (rewrite Direct Access直接存取)dn(被第们项) read Wten(写第项) position to n(移动位置到第项) read next(读下一个) write next(写下一个) rewrite n(重写第n个) n= relative block number(n为相对块数) Applied Operating System Concepts 117 Silberschatz, Galvin, and Gagne @1999
11.7 Silberschatz, Galvin, and Gagne ©1999 Applied Operating System Concepts Access Methods(存取方法) • Sequential Access(顺序存取) read next(读下一个) write next (写下一个) reset(复位) no read after last write(未曾读取) (rewrite) • Direct Access(直接存取) read n(读第n项) write n(写第n项) position to n(移动位置到第n项) read next(读下一个) write next (写下一个) rewrite n(重写第n个) n = relative block number(n为相对块数)
Directory Structure(目录结构) A collection of nodes containing information about all files (一个包含着所有文件信息的节点的集合) Directory 目录 Files 文件 F1F2 F 4 F3 Fn ° Both the directory structure and the files reside on disk.(目录结构和文 件都在磁盘上) Backups of these two structures are kept on tapes.(备份放在磁带上 Applied Operating System Concepts 11.8 Silberschatz, Galvin, and Gagne 1999
11.8 Silberschatz, Galvin, and Gagne ©1999 Applied Operating System Concepts Directory Structure(目录结构) • A collection of nodes containing information about all files. (一个包含着所有文件信息的节点的集合) F 1 F 2 F 3 F 4 F n Directory 目录 Files 文件 • Both the directory structure and the files reside on disk.(目录结构和文 件都在磁盘上) • Backups of these two structures are kept on tapes.(备份放在磁带上)
Information in a device directory 设条目录由的信息 Name(名称) Type(类型) Address(地址) Current length(当前长度) ° Maximum length(最大长度) Date last accessed( for archival)(最后访问时间) Date last updated( for dump)(数据最后更新时间) Owner|D( who pays)(所有者D) Protection information( discuss later)(保护信息) Applied Operating System Concepts 11. Silberschatz, Galvin, and Gagne @1999
11.9 Silberschatz, Galvin, and Gagne ©1999 Applied Operating System Concepts Information in a Device Directory 设备目录中的信息 • Name (名称) • Type(类型) • Address (地址) • Current length(当前长度) • Maximum length(最大长度) • Date last accessed (for archival)(最后访问时间) • Date last updated (for dump)(数据最后更新时间) • Owner ID (who pays)(所有者ID) • Protection information (discuss later)(保护信息)
Operations Performed on Directory 操作系练的目录行为 Search for a file(寻找一个文件) Create a file(建立一个文件) ° Delete a file(删除一个文件) List a directory((列出目录的列表) Rename a file(重命名文件) ° Traverse the file system(整体操作文件系统) Applied Operating System Concepts 1.10 Silberschatz, Galvin, and Gagne @1999
11.10 Silberschatz, Galvin, and Gagne ©1999 Applied Operating System Concepts Operations Performed on Directory 操作系统的目录行为 • Search for a file(寻找一个文件) • Create a file(建立一个文件) • Delete a file(删除一个文件) • List a directory((列出目录的列表) • Rename a file(重命名文件) • Traverse the file system(整体操作文件系统)