File Systems - III - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

File Systems - III

Description:

... contains list of user directories. Second level contains user ... Directories ... could be a subset of directories all with reference count 0, ... – PowerPoint PPT presentation

Number of Views:25
Avg rating:3.0/5.0
Slides: 18
Provided by: yuanyu1
Category:

less

Transcript and Presenter's Notes

Title: File Systems - III


1
File Systems - III
CS423UG Operating Systems
  • Indranil Gupta
  • Lecture 24
  • 10/21/2005

2
ls al (or dir)
  • Directories and their organization

3
Directory Structure Organization
  • Maps symbolic filenames into disk locations,
    resolves entire pathnames
  • Operations on a directory (note difference from
    file operations)
  • list directory
  • search for a file
  • create file
  • backup, archival, file migration

4
Directory Operations
  • Readdir
  • Rename
  • Link
  • Unlink
  1. Create
  2. Delete
  3. Opendir
  4. Closedir

5
Directory Contents
  • For each file/subdir
  • file name symbolic name
  • file type indicates format of file
  • location device and location
  • usage count (how many processes have this file
    open)
  • size
  • protection
  • creation, access, and modification date
  • owner identification

6
Single Level (Flat) Directory
7
Problems With Single Level Directory
  • more than one user?
  • large file systems ?
  • moving files from one system to another?
  • name clashes?
  • modularity?

8
Two-level Directory
  • Introduced to remove naming problems between
    users
  • First level contains list of user directories
  • Second level contains user files
  • System files kept in separate directory or level
    1
  • Sharing accomplished by simply providing to F.S.
    other users id filename

9
Two-level Directory
10
Tree Structured (Hierarchical) Directories
  • Arbitrary depth of directories
  • Each directory contains further subdirectories
    and files
  • Leaf nodes are files
  • Interior nodes are directories
  • Path name lists nodes to traverse to find node
  • Use absolute paths from root
  • Use relative paths from current working directory
    for the calling process

11
Tree Structured Directories
12
Acyclic-Graph Structured Directories
  • Allow directories to link to one another, allow
    multiple directories to contain same file (how?)
  • Results in Acyclic graphs
  • Two users can name same file or same directory
  • Duplicate paths may complicate task of backing up
    periodically

13
Acyclic-Graph Structured Directories
14
General Graph Structured Directories
  • Allow cycles
  • More flexible
  • More costly
  • Need garbage collection (circular structures)
  • There could be a subset of directories all with
    reference count gt 0, but none of these are
    reachable from the root
  • When doing recursive search for a file within the
    file system, must prevent infinite searches

15
General Graph Structured Directories
16
Path Names
17
Announcements
  • Reading for this lecture 6.2
  • Reading for next lecture
  • Next week
  • I am out of town next week M and W
  • Monday will have lecture on File systems (given
    by Ramses Morales, PhD student in CS)
  • Wednesday !In-class quiz!
Write a Comment
User Comments (0)
About PowerShow.com