Presentation is loading. Please wait.

Presentation is loading. Please wait.

Why Do We Need Files? Must store large amounts of data. Information stored must survive the termination of the process using it - that is, be persistent.

Similar presentations


Presentation on theme: "Why Do We Need Files? Must store large amounts of data. Information stored must survive the termination of the process using it - that is, be persistent."— Presentation transcript:

1 Why Do We Need Files? Must store large amounts of data. Information stored must survive the termination of the process using it - that is, be persistent. Multiple processes must be able to access the information concurrently. Independent files, stored on external media, solve these problems.

2 Managing files is another responsibility of an operating system. The part of the operating system that does this is called the file system. Here again, the operating system satisfies its goal of providing the user “ease of operation”. The file system provides an interface to the user for how files “appear”. This includes naming, protection, and operations permitted. At the same time, how the file system is actually implemented is hidden from the user.

3 File Naming Typical file extensions.

4 Three Kinds of File Structures byte sequence record sequence tree

5 File Types (a) An executable file (b) An archive

6 File Access Sequential access –read all bytes/records from the beginning –cannot jump around, could rewind or back up –convenient when medium was mag tape Random access –bytes/records read in any order –essential for data base systems –read can be … move file marker (seek), then read or … read and then move file marker

7 File Attributes Possible file attributes - not found in any one system.

8 File Operations Create Delete Open Close Get attributes Set Attributes Rename Read Write Append Seek

9 Directories Single-Level Directory Systems A single level directory system –contains 4 files –owned by 3 different people, A, B, and C

10 Two-level Directory Systems Letters indicate owners of the directories and files

11 Hierarchical Directory Systems A hierarchical directory system

12 Path Names: A UNIX directory tree

13 Directory Operations Create Delete Opendir Closedir Readdir Rename Link Unlink


Download ppt "Why Do We Need Files? Must store large amounts of data. Information stored must survive the termination of the process using it - that is, be persistent."

Similar presentations


Ads by Google