1 / 25

File System Implementation

File System Implementation. Chapter 6.3 Thursday, April 19, 2007. Today’s Schedule. Files Overview of files & directories (6.1-2) System Implementation (Chapter 6.3). Objectives. You will be able to describe: User’s view of file and directory File abstractions provided by O/S

montana
Télécharger la présentation

File System Implementation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. File System Implementation Chapter 6.3 Thursday, April 19, 2007

  2. Today’s Schedule • Files • Overview of files & directories (6.1-2) • System Implementation (Chapter 6.3)

  3. Objectives You will be able to describe: • User’s view of file and directory • File abstractions provided by O/S • Different file types according to how they are laid out on disk blocks

  4. Files: Long-term Information Storage • Must store large amounts of data • Information stored must survive the termination of the process using it • Multiple processes must be able to access the information concurrently

  5. File Structure • Three kinds of files • byte sequence • record sequence • tree

  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

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

  9. Memory-Mapped Files (a) Segmented process before mapping files into its address space (b) Process after mapping existing file abc into one segment creating new segment for xyzShared file use problem???

  10. DirectoriesSingle-Level Directory Systems • A single level directory system • contains 4 files • owned by 3 different people, A, B, and C

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

  12. Hierarchical Directory Systems A hierarchical directory system

  13. Path Names A UNIX directory tree

  14. Create Delete Opendir Closedir Readdir Rename Link Unlink Directory Operations

  15. File System Implementation A possible file system layout

  16. Contiguous Allocation (a) Contiguous allocation of disk space for 7 files (b) State of the disk after files D and E have been removed

  17. Linked List Allocation Storing a file as a linked list of disk blocksSequential read is easy

  18. Linked List Using Table in Memory Linked list allocation using a file allocation table in RAM

  19. I-Nodes An example i-node

  20. The UNIX V7 File System A UNIX i-node Accommodating larger files!

  21. Implementing Directories Where store file attributes?(a) A simple directory fixed size entries disk addresses and attributes in directory entry (b) Directory in which each entry just refers to an i-node

  22. Handling Shared Files File system containing a shared file

  23. Shared Files (a) Situation prior to linking (b) After the link is created (c)After the original owner removes the file

  24. Let’s Try some … • Chapter 6 Problems, Pg 449 • Problems #2, 6, 9, 10, 11, 12, 15

  25. Tuesday, April 24 • Read Chapter 6 File Systems • 6.3 - Files • 6.4 – Example Systems

More Related