Ceng 334 - Operating Systems 4-1 Chapter 4 : File Systems • What is a file system? • Objectives & user requirements • Characteristics of files & directories • File system implementation • Directory implementation • Free blocks management • Increasing file system performance
39
Embed
Ceng 334 - Operating Systems 4-1 Chapter 4 : File Systems What is a file system? Objectives & user requirements Characteristics of files & directories.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Ceng 334 - Operating Systems 4-1
Chapter 4 : File Systems
• What is a file system?
• Objectives & user requirements
• Characteristics of files & directories
• File system implementation
• Directory implementation
• Free blocks management
• Increasing file system performance
Ceng 334 - Operating Systems 4-2
File System
• The collection of algorithms and data structures which perform the translation from logical file operations (system calls) to actual physical storage of information
Ceng 334 - Operating Systems 4-3
Objectives of a File System
• Provide storage of data and manipulation
• Guarantee consistency of data and minimise errors
• Optimise performance (system and user)
• Eliminate data loss (data destruction)
• Support variety of I/O devices
• Provide a standard user interface
• Support multiple users
Ceng 334 - Operating Systems 4-4
User Requirements
• Access files using a symbolic name
• Capability to create, delete and change files
• Controlled access to system and other users’ files
• Control own access rights
• Capability of restructuring files
• Capability to move data between files
• Backup and recovery of files
Ceng 334 - Operating Systems 4-5
Files• Naming
– Name formation
– Extensions (Some typical extensions are shown below)
Ceng 334 - Operating Systems 4-6
• Structuring
– (a) Byte sequence (as in DOS, Windows & UNIX)
– (b) Record sequence (as in old systems)
– (c) Tree structure (as in some mainframe Oses)
Files (Cont.)
Ceng 334 - Operating Systems 4-7
Files (Cont.)
• File types– Regular (ASCII, binary)– Directories– Character special files– Block special files
• File access– Sequential access– Random access
Ceng 334 - Operating Systems 4-8
Files (Cont.)• File attributes
– Read, write, execute, archive, hidden, system etc.– Creation, last access, last modification
Ceng 334 - Operating Systems 4-9
Files (Cont.)• File operations
1. Create
2. Delete
3. Open
4. Close
5. Read
6. Write
7. Append
8. Seek
9. Get attributes
10.Set Attributes
11.Rename
Ceng 334 - Operating Systems 4-10
Directories• Where to store attributes
– In directory entry (DOS, Windows)– In a separate data structure (UNIX)