Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Studies (AL) File Management File system interface.

Similar presentations


Presentation on theme: "Computer Studies (AL) File Management File system interface."— Presentation transcript:

1 Computer Studies (AL) File Management File system interface

2 Reference Silberschatz, Galvin, Gagne “Operating System Concepts 6 th edition”, 2003, Wiley

3 Content File concept Attribute, basic operation, type Access method Sequential, direct Directory Structure Single-level, two-level, tree structure Absolute path, relative path File System Mounting File Sharing (optional) File protection

4 File Concept A file is a named collection of related information that is recorded on secondary storage. Files are mapped, by OS, onto physical device.

5 Three special type of files Source file is a sequence of subroutines and functions, each of which is further organized as declarations followed by executable statements. An object file is a sequence of bytes organized into blocks understandable by the system’s linker. An executable file is a series of code sections that the loader can bring into memory and execute.

6 File attributes Name Identifier Type Location Size Protection Time, date and user identification

7 File Operations Create a file Writing a file Reading a file Repositioning within a file Deleting a file Truncating a file (erase content, keep its attributes) Appending a file (add info. To a file.) Renaming a file

8 Open-file table Most of the file operations involve searching the directory for the entry associated with the named file. To avoid these searching, many systems require that an open system call be used before that file is first used actively. The OS keeps a small table containing information about all open files. When a file operation is requested, the file is specified via an index into this table, so no searching is required. When the file is no longer actively used, it is closed by the process and the operating system removes its entry in the open-file table. Information associated to open file includes: File pointer File open count (no. of process) Disk location of the file Access right

9 File type The system uses the extension to indicate the type of the file and the type of operations that can be done on that file Executable: exe, com, bin Word processor: doc, rtf Multimedia: mpeg, mov, rm

10 File Access method Sequential access Information in the file is processed in order, one record after the order Usually base on a tape model of a file. Variable-length record. Direct access Read and write records rapidly in no particular order Base on disc model Fixed-length record

11 Directory structure The file system of computers can be extensive 1. Disk is split into one or more partition 2. In each partition, there are number of directories. Single-level directory: all files are contained in the same directory. Two-level directory: user file directory for user data, where master file directory contains system files.

12 Path Absolute path begins at the root and follows a path down to the specified file, giving the directory names on the path E.g. root/spell/mail/prt/first Relative path defines a path from the current directory E.g. prt/first

13 Protection Types of access (controlled access) Read Write Execute Append Delete List

14 Access control Files and directories are associated to an access- control list (ACL) Three classifications of users in connection with each file: Owner: the user who created the file is the owner Group: A set of users who are sharing the file and need similar access is a group, or group Universe: all other users in the system constitute the universe


Download ppt "Computer Studies (AL) File Management File system interface."

Similar presentations


Ads by Google