SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
File-System Interface
File Structure
• None - sequence of words, bytes
• Simple record structure
• Lines
• Fixed length
• Variable length
• Complex Structures
• Formatted document
• Relocatable load file
• Can simulate last two with first method by inserting
appropriate control characters
• Who decides:
• Operating system
• Program
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
• 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
File Operations
• File is an abstract data type
• Create
• Write
• Read
• Reposition within file (seek)
• Delete
• Truncate
• Open(Fi) – search the directory structure on disk for entry
Fi, and move the content of entry to memory
• Close (Fi) – move the content of entry Fi in memory to
directory structure on disk
Open Files
• Several pieces of data are needed to manage open files:
• File pointer: pointer to last read/write location, per
process that has the file open
• File-open count: counter of number of times a file is
open – to allow removal of data from open-file table
when last processes closes it
• Disk location of the file: cache of data access
information
• Access rights: per-process access mode information
Open File Locking
• Provided by some operating systems and file systems
• Mediates access to a file
• Mandatory or advisory:
• Mandatory – access is denied depending on locks held
and requested
• Advisory – processes can find status of locks and decide
what to do
File Types – Name, Extension
Access Methods
• Sequential Access
read next
write next
reset
no read after last write
(rewrite)
• Direct Access
read n
write n
position to n
read next
write next
rewrite n
n = relative block number
Sequential-access File
Directory Structure
• A collection of nodes containing information about all files
F 1 F 2 F 3
F 4
F n
Directory
Files
Both the directory structure and the files reside on disk
Backups of these two structures are kept on tapes
Disk Structure
• Disk can be subdivided into partitions
• Disks or partitions can be RAID protected against failure
• Disk or partition can be used raw – without a file system,
or formatted with a file system
• Partitions also known as minidisks, slices
• Entity containing file system known as a volume
• Each volume containing file system also tracks that file
system’s info in device directory or volume table of
contents
Operations Performed on Directory
• Search for a file
• Create a file
• Delete a file
• List a directory
• Rename a file
• Traverse the file system
Single-Level Directory
• A single directory for all users
Naming problem
Grouping problem
Two-Level Directory
• Separate directory for each user
 Path name
 Can have the same file name for different user
 Efficient searching
 No grouping capability
Tree-Structured Directories
Tree-Structured Directories (Cont)
• Absolute or relative path name
• Creating a new file is done in current directory
• Delete a file
rm <file-name>
• Creating a new subdirectory is done in current directory
mkdir <dir-name>
Example: if in current directory /mail
mkdir count
mail
prog copy prt exp count
Deleting “mail”  deleting the entire subtree rooted
by “mail”
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 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 Sharing – Remote File Systems
• 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
• Distributed Information Systems (distributed naming services) such as
LDAP, DNS, NIS, Active Directory implement unified access to
information needed for remote computing
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 Lists and Groups
• Mode of access: read, write, execute
• Three classes of users
RWX
a) owner access 7  1 1 1
RWX
b) group access 6  1 1 0
RWX
c) public access 1  0 0 1
• 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.
owner group public
chmod 761 game
Attach a group to a file
chgrp G game
Windows XP Access-Control
List Management
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8th Edition
End of Chapter 10

Contenu connexe

Tendances

Tendances (20)

Resource Monitoring and management
Resource Monitoring and management  Resource Monitoring and management
Resource Monitoring and management
 
Disk and File System Management in Linux
Disk and File System Management in LinuxDisk and File System Management in Linux
Disk and File System Management in Linux
 
Oracle Architecture
Oracle ArchitectureOracle Architecture
Oracle Architecture
 
Phân quyền trên file và thư mục trên Ubuntu
Phân quyền trên file và thư mục trên UbuntuPhân quyền trên file và thư mục trên Ubuntu
Phân quyền trên file và thư mục trên Ubuntu
 
Luận văn Thạc sĩ Nghiên cứu triển khai giải pháp đảm bảo an ninh mạng trên nề...
Luận văn Thạc sĩ Nghiên cứu triển khai giải pháp đảm bảo an ninh mạng trên nề...Luận văn Thạc sĩ Nghiên cứu triển khai giải pháp đảm bảo an ninh mạng trên nề...
Luận văn Thạc sĩ Nghiên cứu triển khai giải pháp đảm bảo an ninh mạng trên nề...
 
How One Company Offloaded Data Warehouse ETL To Hadoop and Saved $30 Million
How One Company Offloaded Data Warehouse ETL To Hadoop and Saved $30 MillionHow One Company Offloaded Data Warehouse ETL To Hadoop and Saved $30 Million
How One Company Offloaded Data Warehouse ETL To Hadoop and Saved $30 Million
 
Data base security & integrity
Data base security &  integrityData base security &  integrity
Data base security & integrity
 
firewall
firewallfirewall
firewall
 
Files
FilesFiles
Files
 
10 File System
10 File System10 File System
10 File System
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
 
Linux commands
Linux commands Linux commands
Linux commands
 
Topic 4 database recovery
Topic 4 database recoveryTopic 4 database recovery
Topic 4 database recovery
 
Lý thuyết giấu tin trong file audio
Lý thuyết giấu tin trong file audioLý thuyết giấu tin trong file audio
Lý thuyết giấu tin trong file audio
 
File Management
File ManagementFile Management
File Management
 
Cấu hình Postgresql căn bản trong 20 phút
Cấu hình Postgresql căn bản trong 20 phútCấu hình Postgresql căn bản trong 20 phút
Cấu hình Postgresql căn bản trong 20 phút
 
Web server administration
Web server administrationWeb server administration
Web server administration
 
Luận văn: Ứng dụng kỹ thuật học máy vào phát hiện mã độc, 9đ
Luận văn: Ứng dụng kỹ thuật học máy vào phát hiện mã độc, 9đLuận văn: Ứng dụng kỹ thuật học máy vào phát hiện mã độc, 9đ
Luận văn: Ứng dụng kỹ thuật học máy vào phát hiện mã độc, 9đ
 
File organization
File organizationFile organization
File organization
 
Tai lieu ve raid
Tai lieu ve raidTai lieu ve raid
Tai lieu ve raid
 

En vedette

Index allocation 48 1
Index allocation 48 1Index allocation 48 1
Index allocation 48 1
myrajendra
 
Linked allocation 48
Linked  allocation 48Linked  allocation 48
Linked allocation 48
myrajendra
 
Secondary storage management in os
Secondary storage management in osSecondary storage management in os
Secondary storage management in os
Sumant Diwakar
 

En vedette (8)

I/O Buffering
I/O BufferingI/O Buffering
I/O Buffering
 
Index allocation 48 1
Index allocation 48 1Index allocation 48 1
Index allocation 48 1
 
File System and File allocation tables
File System and File allocation tablesFile System and File allocation tables
File System and File allocation tables
 
Operation System
Operation SystemOperation System
Operation System
 
Linked allocation 48
Linked  allocation 48Linked  allocation 48
Linked allocation 48
 
Secondary storage management in os
Secondary storage management in osSecondary storage management in os
Secondary storage management in os
 
Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
 
Os Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual MemoryOs Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual Memory
 

Similaire à ITFT_File system interface in Operating System

Introduction to distributed file systems
Introduction to distributed file systemsIntroduction to distributed file systems
Introduction to distributed file systems
Viet-Trung TRAN
 

Similaire à ITFT_File system interface in Operating System (20)

Ch10 file system interface
Ch10   file system interfaceCh10   file system interface
Ch10 file system interface
 
Os6
Os6Os6
Os6
 
File Management & Access Control
File Management & Access Control File Management & Access Control
File Management & Access Control
 
File system
File systemFile system
File system
 
UNIT7-FileMgmt.pptx
UNIT7-FileMgmt.pptxUNIT7-FileMgmt.pptx
UNIT7-FileMgmt.pptx
 
File system in operating system e learning
File system in operating system e learningFile system in operating system e learning
File system in operating system e learning
 
Unit 3 file management
Unit 3 file managementUnit 3 file management
Unit 3 file management
 
File System.pptx
File System.pptxFile System.pptx
File System.pptx
 
5263802.ppt
5263802.ppt5263802.ppt
5263802.ppt
 
File Management
File ManagementFile Management
File Management
 
Unix File System
Unix File SystemUnix File System
Unix File System
 
Unit 3 chapter 1-file management
Unit 3 chapter 1-file managementUnit 3 chapter 1-file management
Unit 3 chapter 1-file management
 
File system and Deadlocks
File system and DeadlocksFile system and Deadlocks
File system and Deadlocks
 
Systems Programming - File IO
Systems Programming - File IOSystems Programming - File IO
Systems Programming - File IO
 
UNIT III.pptx
UNIT III.pptxUNIT III.pptx
UNIT III.pptx
 
File System operating system operating system
File System  operating system operating systemFile System  operating system operating system
File System operating system operating system
 
file management
file managementfile management
file management
 
Introduction to distributed file systems
Introduction to distributed file systemsIntroduction to distributed file systems
Introduction to distributed file systems
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
 
Unix slide
Unix slideUnix slide
Unix slide
 

Plus de Sneh Prabha (10)

ITFT_Telephone network
ITFT_Telephone networkITFT_Telephone network
ITFT_Telephone network
 
ITFT_Switching techniques in networking
ITFT_Switching techniques in networkingITFT_Switching techniques in networking
ITFT_Switching techniques in networking
 
ITFT_Semaphores and bounded buffer
ITFT_Semaphores and bounded bufferITFT_Semaphores and bounded buffer
ITFT_Semaphores and bounded buffer
 
ITFT_Osi reference model
ITFT_Osi reference modelITFT_Osi reference model
ITFT_Osi reference model
 
ITFT_Computer Network
ITFT_Computer NetworkITFT_Computer Network
ITFT_Computer Network
 
ITFT_Microwave, infrared & bluetooth communication
ITFT_Microwave, infrared & bluetooth communicationITFT_Microwave, infrared & bluetooth communication
ITFT_Microwave, infrared & bluetooth communication
 
ITFT_Introduction to Operating system
ITFT_Introduction to Operating systemITFT_Introduction to Operating system
ITFT_Introduction to Operating system
 
ITFT_Inter process communication
ITFT_Inter process communicationITFT_Inter process communication
ITFT_Inter process communication
 
ITFT_Data Link Layer issues
ITFT_Data Link Layer  issuesITFT_Data Link Layer  issues
ITFT_Data Link Layer issues
 
ITFT_Device management in Operating System
ITFT_Device management in Operating SystemITFT_Device management in Operating System
ITFT_Device management in Operating System
 

Dernier

An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
SanaAli374401
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Dernier (20)

Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 

ITFT_File system interface in Operating System

  • 2. File Structure • None - sequence of words, bytes • Simple record structure • Lines • Fixed length • Variable length • Complex Structures • Formatted document • Relocatable load file • Can simulate last two with first method by inserting appropriate control characters • Who decides: • Operating system • Program
  • 3. 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 • 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
  • 4. File Operations • File is an abstract data type • Create • Write • Read • Reposition within file (seek) • Delete • Truncate • Open(Fi) – search the directory structure on disk for entry Fi, and move the content of entry to memory • Close (Fi) – move the content of entry Fi in memory to directory structure on disk
  • 5. Open Files • Several pieces of data are needed to manage open files: • File pointer: pointer to last read/write location, per process that has the file open • File-open count: counter of number of times a file is open – to allow removal of data from open-file table when last processes closes it • Disk location of the file: cache of data access information • Access rights: per-process access mode information
  • 6. Open File Locking • Provided by some operating systems and file systems • Mediates access to a file • Mandatory or advisory: • Mandatory – access is denied depending on locks held and requested • Advisory – processes can find status of locks and decide what to do
  • 7. File Types – Name, Extension
  • 8. Access Methods • Sequential Access read next write next reset no read after last write (rewrite) • Direct Access read n write n position to n read next write next rewrite n n = relative block number
  • 10. Directory Structure • A collection of nodes containing information about all files F 1 F 2 F 3 F 4 F n Directory Files Both the directory structure and the files reside on disk Backups of these two structures are kept on tapes
  • 11. Disk Structure • Disk can be subdivided into partitions • Disks or partitions can be RAID protected against failure • Disk or partition can be used raw – without a file system, or formatted with a file system • Partitions also known as minidisks, slices • Entity containing file system known as a volume • Each volume containing file system also tracks that file system’s info in device directory or volume table of contents
  • 12. 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. Single-Level Directory • A single directory for all users Naming problem Grouping problem
  • 14. Two-Level Directory • Separate directory for each user  Path name  Can have the same file name for different user  Efficient searching  No grouping capability
  • 16. Tree-Structured Directories (Cont) • Absolute or relative path name • Creating a new file is done in current directory • Delete a file rm <file-name> • Creating a new subdirectory is done in current directory mkdir <dir-name> Example: if in current directory /mail mkdir count mail prog copy prt exp count Deleting “mail”  deleting the entire subtree rooted by “mail”
  • 17. 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
  • 18. 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
  • 19. File Sharing – Remote File Systems • 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 • Distributed Information Systems (distributed naming services) such as LDAP, DNS, NIS, Active Directory implement unified access to information needed for remote computing
  • 20. Protection • File owner/creator should be able to control: • what can be done • by whom • Types of access • Read • Write • Execute • Append • Delete • List
  • 21. Access Lists and Groups • Mode of access: read, write, execute • Three classes of users RWX a) owner access 7  1 1 1 RWX b) group access 6  1 1 0 RWX c) public access 1  0 0 1 • 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. owner group public chmod 761 game Attach a group to a file chgrp G game
  • 23. Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8th Edition End of Chapter 10