Problems twotwo level directory separate directory

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: for all users. Problems? TwoTwo-Level Directory Separate directory for each user. Path name is needed to share files Can have the same file name for different user Efficient searching No grouping capability: still fairly flat, no subdirs TreeTree-Structured Directories Advantages? Efficient searching Grouping Capability Current directory (working directory) convenience: convenience: absolute path names can get long! relative naming • cd /spell/mail/prog • cat list Acyclic Acyclic-Graph Directories Have shared subdirectories and files. Acyclic Acyclic-Graph Directories (Cont.) Two different names (aliasing) – problem? Deletes dict /count dangling pointer! Solution: Acyclic Acyclic-Graph Directories (Cont.) If delete means delete the link, when does the file actually get deleted? deleted? General General Graph Directory Types Types of Links Hard link - multiple (path) names refer to same file (actual storage) - delete/remove: uses reference counts Soft/symbolic link - linked file (target) is special – stores the path to the source file - link directories - link across filesystems: won’t work for hard links - delete source -> dangling reference Unix – man ln Protection Protection File owner/creator should be able to control: • what can be done • by whom Types of access • • • • • • Read Write Execute Append Delete List Access Access Lists and Groups (Unix) Mode of access: read, write, execute Three classes of users a) owner access 7 b) groups access 6 c) public access 1 RWX 111 RWX 110 RWX 001 Unix Unix Special Files Prompt> ls –l /etc/passwd -r--r--r-- 1 root sys 415 May 12 2004 /etc/passwd - : regular file d: directory l: symbolic link b/c: block/char devices few others File File System Layout file system info meta-data CSci CSci 5103 Operating Systems File system implementation Chap 4 FileFile-System Structure File structure • Logical storage unit • Collection of related information File system r...
View Full Document

This document was uploaded on 04/02/2014.

Ask a homework question - tutors are online