SlideShare a Scribd company logo
JAYA
Introduction
 All computer applications need to store and retrieve
information.
 Things to be consider
 Store a very large amount of information.
 Information must survive after the termination of
process.
 Multiple processes must be able to access the
information concurrently.
solution
 Need to store the information on disks and other
external media in units called files.
 Process can read and write whenever needed.
 Information stored in units is persistent.
 information disappear when its owner explicitly
removes it.
File
 It is a uniform logical storage unit.
 Its a abstract mechanism.
 Named collection of related information, which is
stored on secondary storage.
 Managed by operating system.
File Naming
 It provides a way to store and retrieve the information
later.
 Used to shield the user from details of information
storage and disk working.
 Rules for file naming
 String of 1 to 8 letters
 Digits and special characters
 Some allow string from 1 to 255 characters
 Case sensitivity
 Extensions
File Naming
 Rules for UNIX Operating System
 Allows string from 1 to 255 characters
 Name String is case sensitive
 Varying size Extensions to separate file names
 Example
PROGRAM1, Program1, program1
program1.java.bz2 , program1.c
File Naming
 Rules for MS-DOS Operating System and Windows
 Allows string from 1 to 255 characters
 Name String is non -case sensitive
 1 to 3 character Extensions to separate file names
 Example
PROGRAM1, Program1, program1 {same}
program1.java
File Extensions
Extensions Meaning
File.bak Backup File
File.c C source program
File.gif Graphical Interchange Format Image
File.html Web document
File.iso ISO image of a CD-ROM
File.jpg Joint Photographic Expert Group encoded still pictures
File.mp3 Music encoded in MPEG layer3
File.mpg Movie encoded with MPEG standard
File.o Object file
File.pdf Portable Document Format File
File.txt General Text File
File.zip Compressed File
File Structure
 Ways of File Structure
 Unstructured Sequence of Bytes
 Collection of bytes
 Operating System does not know or care what is in the
File
 Handled by user
 Used in UNIX and WIN 98
 Advantages:
 Provides maximum flexibility.
 User can save anything in it.
 Disadvantage:
 No simultaneous read and write operation .
File Structure
 Unstructured Sequence of Bytes
1 Byte
File
File Structure
 Ways of File Structure
 Sequence of Fixed length Records
 Collection of fixed length records.
 Used in older systems.
 Advantages:
 Read and write operation on different record done
simultaneously.
 Disadvantage:
 Sequential search so time consuming
File Structure
 Sequence of Fixed length Records
Record
File
File Structure
 Ways of File Structure
 Tree Structure
 File consists of a tree of records with varying size.
 Each record contains a key Field.
 Tree is sorted based on key fields.
 Used in large mainframe systems
 Advantages:
 Less time to search a record.
File Structure
 Tree Structure
Ant Fox Pig
Cat Cow Dog Goat Lion Owl Pony Rat Worm
Hen Horse Lamb
File Structure
 Four Terms
 Fields
 Records
 Files
 Database
File Structure
 Four Terms
 Fields
 Basic elements of data
 Has 3 sub fields
 Example emp_name
 Records
 Collection of related fields.
 Has sub fields like name and length
 Example emp_record
File Structure
 Four Terms
 File
 Collection of similar records.
 Treated as a single entity by user.
 Has sub fields like name, creation date ,length.
 Example : payroll system.
 Database
 Collection of related data ( one or more files).
 Has sub fields like name and length
 Example: organizations data or project
File Types
 Operating system supports several types of files
 Regular File
 Character special File
 Block Special File
 Metadata File
 Directories
File Types
 Regular Files: Two types
 ASCII Files
 Consists lines of text
 Uses carriage return or line feed character
 Display or print as it is
 Edited by any editor
 Easy to link
 Binary Files
 Consists of bytes
 Difficult to link
File Types
 UNIX executable binary file
Magic Number
Text Size
Data Size
BSS Size
Symbol Table Size
Entry Point
Flag
text
Data
Relocation Bit
Symbol Table
Header
File Type
 Unix Binary archive File
Header
Object module
Header
Object module
Header
Object module
Header
Object module
Module name
Date
Owner
Protection
Size
File Attribute
 Every file has a name and additional information
 List of Attributes
 Name
 Protection
 password
 Identifier
 Type
 Location
 Creator
 owner
 Size
 Time and Date of creation
 Hidden flag
 Read-only flag
 Binary or ASCII file
 Lock flag
 System flag
File Access Methods
 Types of File Access Methods
 Sequential Access Method
 Random or Direct Access Method
 Other Access Methods
File Access Methods
 Sequential access method
 Simple access method.
 Information of the file is processed in order.
 Supports following operations
 read_next()
 write_next()
 rewind()
 Skip(n) records Current position
 Rewind read/write 
start end
File Access Methods
 Random or Direct access method
 It is based on disk model.
 Allows random access.
 File is viewed as a numbered sequence of records.
 Used to access large amount of data.
 Supports following operations
 read(n)
 write(n)
 jump to record n
 Query current record
File Access Methods
 Other Access method(Indexed)
 Build on top of direct access method
 To search the record
 Search index for file pointer
 Search file in directory
 Search a required record
Key Field Pointer
radha ----
raj -----
Radha Social-security age --
Index Relative File
File Operations
 Operations required to define a file properly.
 Operations are nothing but OS system calls.
 List of operations
 Creating a file
 Writing a file
 Reading a file
 Append a file
 Seek operation / repositioning within a file
 Deleting a file
 Get attribute
 Set attribute
 Rename
 Truncating a File
File System Implementation
 Why to use disk
 Deals with
 How the files and directories are stored
 How they are managed
 How it work efficiently
 File system layout
MBR pt partition1 partition2 partition3 -----
Entire disk space
Boot
block
Super
block
Free space
mgmt
I-nodes Root dir Files &
directory
Unix file system

More Related Content

Similar to FILE MANAGEMENT.pptx

File concept and access method
File concept and access methodFile concept and access method
File concept and access method
rajshreemuthiah
 
file management_osnotes.ppt
file management_osnotes.pptfile management_osnotes.ppt
file management_osnotes.ppt
HelalMirzad
 
Files
FilesFiles
Chapter 5
Chapter 5Chapter 5
Chapter 5
Ankit Dubey
 
Unit 3 file management
Unit 3 file managementUnit 3 file management
Unit 3 file management
Kalai Selvi
 
OS_Ch11
OS_Ch11OS_Ch11
OSCh11
OSCh11OSCh11
Ch11 OS
Ch11 OSCh11 OS
Ch11 OS
C.U
 
Chapter 10 - File System Interface
Chapter 10 - File System InterfaceChapter 10 - File System Interface
Chapter 10 - File System Interface
Wayne Jones Jnr
 
Degonto, File management system in fisheries science
Degonto, File management  system in fisheries scienceDegonto, File management  system in fisheries science
Degonto, File management system in fisheries science
Degonto Islam
 
File management
File managementFile management
File management
sangrampatil81
 
OPERATING SYSTEM
OPERATING SYSTEMOPERATING SYSTEM
OPERATING SYSTEM
RubaNagarajan
 
Ch12-OS9e-modified (1).pptx
Ch12-OS9e-modified (1).pptxCh12-OS9e-modified (1).pptx
Ch12-OS9e-modified (1).pptx
udithaisur
 
File Systems
File SystemsFile Systems
File Systems
Shipra Swati
 
FILE SYSTEMS IN WINDOWS OPERATING SYSTEMS
FILE SYSTEMS IN WINDOWS OPERATING SYSTEMSFILE SYSTEMS IN WINDOWS OPERATING SYSTEMS
FILE SYSTEMS IN WINDOWS OPERATING SYSTEMS
KABILESH RAMAR
 
Unit ivos - file systems
Unit ivos - file systemsUnit ivos - file systems
Unit ivos - file systems
donny101
 
CH11.pdf
CH11.pdfCH11.pdf
CH11.pdf
ImranKhan880955
 
File system
File systemFile system
File system
lodhran-hayat
 
Switching & Multiplexing
Switching & MultiplexingSwitching & Multiplexing
Switching & Multiplexing
MelkamuEndale1
 
File
FileFile

Similar to FILE MANAGEMENT.pptx (20)

File concept and access method
File concept and access methodFile concept and access method
File concept and access method
 
file management_osnotes.ppt
file management_osnotes.pptfile management_osnotes.ppt
file management_osnotes.ppt
 
Files
FilesFiles
Files
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
Unit 3 file management
Unit 3 file managementUnit 3 file management
Unit 3 file management
 
OS_Ch11
OS_Ch11OS_Ch11
OS_Ch11
 
OSCh11
OSCh11OSCh11
OSCh11
 
Ch11 OS
Ch11 OSCh11 OS
Ch11 OS
 
Chapter 10 - File System Interface
Chapter 10 - File System InterfaceChapter 10 - File System Interface
Chapter 10 - File System Interface
 
Degonto, File management system in fisheries science
Degonto, File management  system in fisheries scienceDegonto, File management  system in fisheries science
Degonto, File management system in fisheries science
 
File management
File managementFile management
File management
 
OPERATING SYSTEM
OPERATING SYSTEMOPERATING SYSTEM
OPERATING SYSTEM
 
Ch12-OS9e-modified (1).pptx
Ch12-OS9e-modified (1).pptxCh12-OS9e-modified (1).pptx
Ch12-OS9e-modified (1).pptx
 
File Systems
File SystemsFile Systems
File Systems
 
FILE SYSTEMS IN WINDOWS OPERATING SYSTEMS
FILE SYSTEMS IN WINDOWS OPERATING SYSTEMSFILE SYSTEMS IN WINDOWS OPERATING SYSTEMS
FILE SYSTEMS IN WINDOWS OPERATING SYSTEMS
 
Unit ivos - file systems
Unit ivos - file systemsUnit ivos - file systems
Unit ivos - file systems
 
CH11.pdf
CH11.pdfCH11.pdf
CH11.pdf
 
File system
File systemFile system
File system
 
Switching & Multiplexing
Switching & MultiplexingSwitching & Multiplexing
Switching & Multiplexing
 
File
FileFile
File
 

More from jayashri kolekar

Architectural modeling chapter 5 of omd
Architectural modeling chapter 5 of omdArchitectural modeling chapter 5 of omd
Architectural modeling chapter 5 of omd
jayashri kolekar
 
Advanced behavioral modeling chapter 4 of omd
Advanced behavioral modeling chapter 4 of omdAdvanced behavioral modeling chapter 4 of omd
Advanced behavioral modeling chapter 4 of omd
jayashri kolekar
 
Basic behavioral modeling chapter 3 of OMD
Basic behavioral modeling chapter 3 of OMDBasic behavioral modeling chapter 3 of OMD
Basic behavioral modeling chapter 3 of OMD
jayashri kolekar
 
Object oriented modeling and design
Object oriented modeling and designObject oriented modeling and design
Object oriented modeling and design
jayashri kolekar
 
OMD chapter 2 Class modelling
 OMD  chapter 2 Class modelling OMD  chapter 2 Class modelling
OMD chapter 2 Class modelling
jayashri kolekar
 
Macro
MacroMacro
Parsing
ParsingParsing
Loader
LoaderLoader
Assembler1
Assembler1Assembler1
Assembler1
jayashri kolekar
 
Cryptography
CryptographyCryptography
Cryptography
jayashri kolekar
 
System programming
System programmingSystem programming
System programming
jayashri kolekar
 
Compilers
CompilersCompilers
Compilers
jayashri kolekar
 
Introduction to information security
Introduction to information securityIntroduction to information security
Introduction to information security
jayashri kolekar
 

More from jayashri kolekar (13)

Architectural modeling chapter 5 of omd
Architectural modeling chapter 5 of omdArchitectural modeling chapter 5 of omd
Architectural modeling chapter 5 of omd
 
Advanced behavioral modeling chapter 4 of omd
Advanced behavioral modeling chapter 4 of omdAdvanced behavioral modeling chapter 4 of omd
Advanced behavioral modeling chapter 4 of omd
 
Basic behavioral modeling chapter 3 of OMD
Basic behavioral modeling chapter 3 of OMDBasic behavioral modeling chapter 3 of OMD
Basic behavioral modeling chapter 3 of OMD
 
Object oriented modeling and design
Object oriented modeling and designObject oriented modeling and design
Object oriented modeling and design
 
OMD chapter 2 Class modelling
 OMD  chapter 2 Class modelling OMD  chapter 2 Class modelling
OMD chapter 2 Class modelling
 
Macro
MacroMacro
Macro
 
Parsing
ParsingParsing
Parsing
 
Loader
LoaderLoader
Loader
 
Assembler1
Assembler1Assembler1
Assembler1
 
Cryptography
CryptographyCryptography
Cryptography
 
System programming
System programmingSystem programming
System programming
 
Compilers
CompilersCompilers
Compilers
 
Introduction to information security
Introduction to information securityIntroduction to information security
Introduction to information security
 

Recently uploaded

A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
IJNSA Journal
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
mamunhossenbd75
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
awadeshbabu
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
yokeleetan1
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
anoopmanoharan2
 
2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt
PuktoonEngr
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
ClaraZara1
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
Mukeshwaran Balu
 
sieving analysis and results interpretation
sieving analysis and results interpretationsieving analysis and results interpretation
sieving analysis and results interpretation
ssuser36d3051
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
drwaing
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
RadiNasr
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
Exception Handling notes in java exception
Exception Handling notes in java exceptionException Handling notes in java exception
Exception Handling notes in java exception
Ratnakar Mikkili
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
ihlasbinance2003
 

Recently uploaded (20)

A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
 
2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
 
sieving analysis and results interpretation
sieving analysis and results interpretationsieving analysis and results interpretation
sieving analysis and results interpretation
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
Exception Handling notes in java exception
Exception Handling notes in java exceptionException Handling notes in java exception
Exception Handling notes in java exception
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
 

FILE MANAGEMENT.pptx

  • 2. Introduction  All computer applications need to store and retrieve information.  Things to be consider  Store a very large amount of information.  Information must survive after the termination of process.  Multiple processes must be able to access the information concurrently.
  • 3. solution  Need to store the information on disks and other external media in units called files.  Process can read and write whenever needed.  Information stored in units is persistent.  information disappear when its owner explicitly removes it.
  • 4. File  It is a uniform logical storage unit.  Its a abstract mechanism.  Named collection of related information, which is stored on secondary storage.  Managed by operating system.
  • 5. File Naming  It provides a way to store and retrieve the information later.  Used to shield the user from details of information storage and disk working.  Rules for file naming  String of 1 to 8 letters  Digits and special characters  Some allow string from 1 to 255 characters  Case sensitivity  Extensions
  • 6. File Naming  Rules for UNIX Operating System  Allows string from 1 to 255 characters  Name String is case sensitive  Varying size Extensions to separate file names  Example PROGRAM1, Program1, program1 program1.java.bz2 , program1.c
  • 7. File Naming  Rules for MS-DOS Operating System and Windows  Allows string from 1 to 255 characters  Name String is non -case sensitive  1 to 3 character Extensions to separate file names  Example PROGRAM1, Program1, program1 {same} program1.java
  • 8. File Extensions Extensions Meaning File.bak Backup File File.c C source program File.gif Graphical Interchange Format Image File.html Web document File.iso ISO image of a CD-ROM File.jpg Joint Photographic Expert Group encoded still pictures File.mp3 Music encoded in MPEG layer3 File.mpg Movie encoded with MPEG standard File.o Object file File.pdf Portable Document Format File File.txt General Text File File.zip Compressed File
  • 9. File Structure  Ways of File Structure  Unstructured Sequence of Bytes  Collection of bytes  Operating System does not know or care what is in the File  Handled by user  Used in UNIX and WIN 98  Advantages:  Provides maximum flexibility.  User can save anything in it.  Disadvantage:  No simultaneous read and write operation .
  • 10. File Structure  Unstructured Sequence of Bytes 1 Byte File
  • 11. File Structure  Ways of File Structure  Sequence of Fixed length Records  Collection of fixed length records.  Used in older systems.  Advantages:  Read and write operation on different record done simultaneously.  Disadvantage:  Sequential search so time consuming
  • 12. File Structure  Sequence of Fixed length Records Record File
  • 13. File Structure  Ways of File Structure  Tree Structure  File consists of a tree of records with varying size.  Each record contains a key Field.  Tree is sorted based on key fields.  Used in large mainframe systems  Advantages:  Less time to search a record.
  • 14. File Structure  Tree Structure Ant Fox Pig Cat Cow Dog Goat Lion Owl Pony Rat Worm Hen Horse Lamb
  • 15. File Structure  Four Terms  Fields  Records  Files  Database
  • 16. File Structure  Four Terms  Fields  Basic elements of data  Has 3 sub fields  Example emp_name  Records  Collection of related fields.  Has sub fields like name and length  Example emp_record
  • 17. File Structure  Four Terms  File  Collection of similar records.  Treated as a single entity by user.  Has sub fields like name, creation date ,length.  Example : payroll system.  Database  Collection of related data ( one or more files).  Has sub fields like name and length  Example: organizations data or project
  • 18. File Types  Operating system supports several types of files  Regular File  Character special File  Block Special File  Metadata File  Directories
  • 19. File Types  Regular Files: Two types  ASCII Files  Consists lines of text  Uses carriage return or line feed character  Display or print as it is  Edited by any editor  Easy to link  Binary Files  Consists of bytes  Difficult to link
  • 20. File Types  UNIX executable binary file Magic Number Text Size Data Size BSS Size Symbol Table Size Entry Point Flag text Data Relocation Bit Symbol Table Header
  • 21. File Type  Unix Binary archive File Header Object module Header Object module Header Object module Header Object module Module name Date Owner Protection Size
  • 22. File Attribute  Every file has a name and additional information  List of Attributes  Name  Protection  password  Identifier  Type  Location  Creator  owner  Size  Time and Date of creation  Hidden flag  Read-only flag  Binary or ASCII file  Lock flag  System flag
  • 23. File Access Methods  Types of File Access Methods  Sequential Access Method  Random or Direct Access Method  Other Access Methods
  • 24. File Access Methods  Sequential access method  Simple access method.  Information of the file is processed in order.  Supports following operations  read_next()  write_next()  rewind()  Skip(n) records Current position  Rewind read/write  start end
  • 25. File Access Methods  Random or Direct access method  It is based on disk model.  Allows random access.  File is viewed as a numbered sequence of records.  Used to access large amount of data.  Supports following operations  read(n)  write(n)  jump to record n  Query current record
  • 26. File Access Methods  Other Access method(Indexed)  Build on top of direct access method  To search the record  Search index for file pointer  Search file in directory  Search a required record Key Field Pointer radha ---- raj ----- Radha Social-security age -- Index Relative File
  • 27. File Operations  Operations required to define a file properly.  Operations are nothing but OS system calls.  List of operations  Creating a file  Writing a file  Reading a file  Append a file  Seek operation / repositioning within a file  Deleting a file  Get attribute  Set attribute  Rename  Truncating a File
  • 28. File System Implementation  Why to use disk  Deals with  How the files and directories are stored  How they are managed  How it work efficiently  File system layout MBR pt partition1 partition2 partition3 ----- Entire disk space Boot block Super block Free space mgmt I-nodes Root dir Files & directory Unix file system

Editor's Notes

  1. Query current record – used to return back to this record later
  2. Query current record – used to return back to this record later