0% found this document useful (0 votes)
168 views

File System Interface: Polytechnic University of The Philippines

Polytechnic University of the Philippines discusses file system interfaces in Chapter 10. The key points are: 1) A file system provides logical addressing and file attributes like name, size, and permissions to control access. 2) Common file operations include create, read, write, delete and directory operations like search, list and rename. 3) Directory structures are organized for efficient searching, logical grouping of files, and naming conventions. Common structures include single-level, two-level tree, and acyclic graph directories. 4) File systems are mounted before use and can be remotely shared through distributed file systems using client-server models and network protocols like NFS. 5) Protection

Uploaded by

momshe_214
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
168 views

File System Interface: Polytechnic University of The Philippines

Polytechnic University of the Philippines discusses file system interfaces in Chapter 10. The key points are: 1) A file system provides logical addressing and file attributes like name, size, and permissions to control access. 2) Common file operations include create, read, write, delete and directory operations like search, list and rename. 3) Directory structures are organized for efficient searching, logical grouping of files, and naming conventions. Common structures include single-level, two-level tree, and acyclic graph directories. 4) File systems are mounted before use and can be remotely shared through distributed file systems using client-server models and network protocols like NFS. 5) Protection

Uploaded by

momshe_214
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 31

Polytechnic University of the Philippines

CHAPTER 10

File System Interface


MIT 603

Reported by : S h e r w i n G. G u t a y a n d C i e l o B . R a m o s

1
File System Interface

• File Concept
• Access Methods
• Directory Structure
• File-System Mounting
• File Sharing
• Protection 2
File System Interface
Objectives

• To explain the function of file systems


• To describe the interfaces to the systems
• To discuss file-system design tradeoffs, including
access methods, file sharing, and directory
structures
• To explore file-system protection 3
File System Interface
File Concept

• Contiguous logical address space


• Types:
Data
Numeric
Character
Binary
Program
4
File System Interface
File Attributes

• Name – only information kept in human-readable form

• Identifier – unique tag (number) identifies file within file

system
• Type – needed for systems that support different types

• Location – pointer to file location on device

• Size – current file size 5


File System Interface
File Attributes

• Protection – controls who can do reading, writing,

executing
• Time, date, and user identification – data for protection,

security, and usage monitoring

• Information about files are kept in the directory structure,

which is maintained on the disk 6


File System Interface
File Operations

•Create •Open(Fi) – search the


•Write directory structure on disk for
•Read entry Fi, and move the
•Reposition within file content of entry to memory
•Delete
•Truncate •Close (Fi) – move the
• Append content of entry Fi in memory
to directory structure on disk
• Rename 7
File System Interface
File Types – Name, Extension

8
File System Interface
Logical and Physical View of Files
BLOCKING
File A
Record 1

Record 2
Block 1
Record 3

Record 4

Record 5
Block 2
Record 6

Secondary Storage 9
File System Interface
File Organization and Access
1. Pile File Organization
- Simplest form
- Unstructured
2. Sequential File Organization
- oldest form
- records are written and accessed consecutively
3. Multikey / Indexed File Organization
- making use of key fields
4. Random / Direct file Organization
- directly go t the known address
5. Indexed Sequential File Organization
10
- combines sequence order based on a key field
File System Interface
Directory Structure

• A collection of nodes containing information about all files

Directory

• Both the directory


structure and the
files reside on disk
Files F4
F1 F2
F3
Fn
11
File System Interface
A Typical File System Organization

12
File System Interface
Operations Performed on Directory

• Search for a file


• Create a file
• Delete a file
• List a directory
• Rename a file
• Traverse the file system
13
File System Interface
Organize the Directory (Logically)
to Obtain

• Efficiency – locating a file quickly


• Naming – convenient to users
– Two users can have same name for different files
– The same file can have several different names
• Grouping – logical grouping of files by properties, (e.g.,
all Java programs, all games, …)

14
File System Interface
Single-Level Directory

• A single directory for all users

Naming problem
Grouping problem 15
File System Interface
Two-Level Directory

• Separate directory for each user

 Path name  Efficient searching


 Can have the same file name  No grouping capability
for different user
File System Interface
Tree Structured Directory
File System Interface
Tree Structured Directory

• Efficient searching

• Grouping Capability

• Current directory (working directory)


– cd /spell/mail/prog
– type list
File System Interface
Acyclic-Graph Directories

• Have shared subdirectories and files


File System Interface
Acyclic-Graph Directories

• Two different names (aliasing)


• If dict deletes list  dangling pointer
Solutions:
– Backpointers, so we can delete all pointers
Variable size records a problem
– Backpointers using a daisy chain organization
– Entry-hold-count solution
• New directory entry type
– Link – another name (pointer) to an existing file
– Resolve the link – follow pointer to locate the file
File System Interface
General Graph Directories
File System Interface
File System Mounting

• A file system must be mounted


before it can be accessed
• A unmounted file system (i.e.
Fig. 11-11(b)) is mounted at a
mount point
File System Interface
File System Mounting

(a) Existing. (b) Unmounted Partition


File System Interface
File System Mounting
Mount Point
File System Interface
File Sharing

• Sharing of files on multi-user systems is desirable

• Sharing may be done through a protection scheme

• On distributed systems, files may be shared across a


network

• Network File System (NFS) is a common distributed


file-sharing method
File System Interface
File Sharing – Multiple Users

• User IDs identify users, allowing permissions and


protections to be per-user

• Group IDs allow users to be in groups, permitting


group access rights
File System Interface
File Sharing – Remote File System

• Uses networking to allow file system access between systems


– Manually via programs like FTP
– Automatically, seamlessly using distributed file systems
– Semi automatically via the world wide web
• Client-server model allows clients to mount remote file systems from
servers
– Server can serve multiple clients
– Client and user-on-client identification is insecure or complicated
– NFS is standard UNIX client-server file sharing protocol
– CIFS is standard Windows protocol
– Standard operating system file calls are translated into remote calls
File System Interface
Protection

• File owner/creator should be able to control:


– what can be done
– by whom

• Types of access
– Read – Append
– Write – Delete
– Execute – List
File System Interface
Access Lists and Groups

• Mode of access: read, write, execute


• Three classes of users
RWX
a) owner access 7  111
RWX
b) group access 6  110
RWX
c) public access 1  001
• Ask manager to create a group (unique name), say G, and add
some users to the group.
• For a particular file (say game) or subdirectory, define an
appropriate access.
File System Interface
A Sample UNIX Directory Listing
File System Interface

End of Report

You might also like