SlideShare a Scribd company logo
File Handling

   Organized By: Vinay Arora
                  Assistant Professor
                  CSED, TU




                                      V.A.
                                    CSED,TU
Disclaimer

        This is NOT A COPYRIGHT             MATERIAL
   Content has been taken mainly from the following books:

        Operating Systems Concepts By Silberschatz & Galvin,
Operating Systems: Internals and Design Principles By William Stallings
                        www.os-book.com
         www.cs.jhu.edu/~yairamir/cs418/os2/sld001.htm
     www.personal.kent.edu/~rmuhamma/OpSystems/os.html
 http://msdn.microsoft.com/en-us/library/ms685096(VS.85).aspx
http://www.computer.howsttuffworks.com/operating-system6.htm
         http://williamstallings.com/OS/Animations.html
         http://msdn.microsoft.com/en-us/library/aa450566.aspx
                           www.os-book.com
     http://www.yolinux.com/TUTORIALS/ForkExecProcesses.html
                                 Etc…
                                 VA.
                               CSED,TU
File Concept
   Contiguous Logical Address Space

   Types:

      Data
          numeric
          character
          Binary

      Program




                                    VA.
                                  CSED,TU
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

                                        VA.
                                      CSED,TU
File Operations
   Create
   Write
   Read
   Reposition within File
   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

                                    VA.
                                  CSED,TU
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

                                 VA.
                               CSED,TU
VA.
CSED,TU
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


                                     VA.
                                   CSED,TU
Sequential Access




                      VA.
                    CSED,TU
Index & Relative Files




                    VA.
                  CSED,TU
Directory Structure
   A collection of nodes containing information about all files




                                    VA.
                                  CSED,TU
File System Organization




                   VA.
                 CSED,TU
Operations performed on Directory
   Search for a File

   Create a File

   Delete a File

   List a Directory

   Rename a File

   Traverse the File System


                                VA.
                              CSED,TU
Organize directory 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, …)




                                     VA.
                                   CSED,TU
Single-level Directory




                    VA.
                  CSED,TU
Two-level Directory




                   VA.
                 CSED,TU
Tree Structured Directory




                   VA.
                 CSED,TU
Acyclic Graph Directory




                   VA.
                 CSED,TU
General Graph Directory




                  VA.
                CSED,TU
File Sharing




                 VA.
               CSED,TU
File Sharing




                 VA.
               CSED,TU
File Security




                  VA.
                CSED,TU
Thnx…



    VA.
  CSED,TU

More Related Content

PDF
OS - Secondary Storage
PDF
OS - Introduction to Operating Systems
PDF
OS - Introduction to Systems
PDF
OS - Memory Management
PPT
101 4.3 control mounting and unmounting of filesystems
PPTX
Device Management
PPTX
11 linux filesystem copy
PPT
Linux filesystemhierarchy
OS - Secondary Storage
OS - Introduction to Operating Systems
OS - Introduction to Systems
OS - Memory Management
101 4.3 control mounting and unmounting of filesystems
Device Management
11 linux filesystem copy
Linux filesystemhierarchy

What's hot (20)

PPT
Lpi lição 01 exam 102 objectives
PPTX
Mass storage systemsos
PPT
101 1.2 boot the system
PPTX
Mass storage device
PPTX
Mass Storage Structure
PPTX
Massstorage
PPTX
PPT
Chapter 12 - Mass Storage Systems
PPTX
Hard disk_
PPT
Disk management
PPTX
How to design a file system
DOCX
Solid state disk
PDF
Disk Management
PPTX
Mass storage structure
PPT
DB_ch11
PPTX
Disk scheduling & Disk management
PDF
Mass Storage Devices
PPTX
Storage memory
PPT
Chapter 12 Model Answers
PPTX
User and groups administrator
Lpi lição 01 exam 102 objectives
Mass storage systemsos
101 1.2 boot the system
Mass storage device
Mass Storage Structure
Massstorage
Chapter 12 - Mass Storage Systems
Hard disk_
Disk management
How to design a file system
Solid state disk
Disk Management
Mass storage structure
DB_ch11
Disk scheduling & Disk management
Mass Storage Devices
Storage memory
Chapter 12 Model Answers
User and groups administrator
Ad

Viewers also liked (10)

PPTX
File handling
PPTX
Error handling and debugging in vb
PDF
Error handling and debugging
PPTX
File Structure Concepts
PPT
OS Process Synchronization, semaphore and Monitors
PPT
Ch7 OS
 
PPT
Processes Control Block (Operating System)
PPT
File management ppt
PPTX
Basic controls of Visual Basic 6.0
PPTX
Operating Systems - File Management
File handling
Error handling and debugging in vb
Error handling and debugging
File Structure Concepts
OS Process Synchronization, semaphore and Monitors
Ch7 OS
 
Processes Control Block (Operating System)
File management ppt
Basic controls of Visual Basic 6.0
Operating Systems - File Management
Ad

Similar to OS - File Handling (20)

PPT
PPT
Ch11 OS
 
PPT
PPT
Chapter 10 - File System Interface
PPTX
File Management & Access Control
PDF
File Systems
PDF
File system
PPTX
PPT
operating system File - System Interface
PPT
Unit 3 file management
PPT
Unit 3 chapter 1-file management
PDF
oslectureset7.pdf
PPTX
(file systems)12312321321321312312312.pptx
PPT
os unit-5-part2.ppt,Disk management file
PPTX
File management53(1)
PDF
Ch10 file system interface
PDF
Unit ivos - file systems
Ch11 OS
 
Chapter 10 - File System Interface
File Management & Access Control
File Systems
File system
operating system File - System Interface
Unit 3 file management
Unit 3 chapter 1-file management
oslectureset7.pdf
(file systems)12312321321321312312312.pptx
os unit-5-part2.ppt,Disk management file
File management53(1)
Ch10 file system interface
Unit ivos - file systems

More from vinay arora (20)

PDF
Search engine and web crawler
DOCX
Use case diagram (airport)
DOCX
Use case diagram
DOCX
Lab exercise questions (AD & CD)
PDF
SEM - UML (1st case study)
PPT
6 java - loop
PPT
4 java - decision
PPT
3 java - variable type
PPT
2 java - operators
PPT
1 java - data type
PPT
Uta005 lecture3
PPT
Uta005 lecture1
PPT
Uta005 lecture2
PPT
Security & Protection
PPT
Process Synchronization
PDF
CG - Output Primitives
PDF
CG - Display Devices
PDF
CG - Input Output Devices
PDF
CG - Introduction to Computer Graphics
PDF
C Prog. - Strings (Updated)
Search engine and web crawler
Use case diagram (airport)
Use case diagram
Lab exercise questions (AD & CD)
SEM - UML (1st case study)
6 java - loop
4 java - decision
3 java - variable type
2 java - operators
1 java - data type
Uta005 lecture3
Uta005 lecture1
Uta005 lecture2
Security & Protection
Process Synchronization
CG - Output Primitives
CG - Display Devices
CG - Input Output Devices
CG - Introduction to Computer Graphics
C Prog. - Strings (Updated)

Recently uploaded (20)

PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
Pharma ospi slides which help in ospi learning
PDF
RMMM.pdf make it easy to upload and study
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
Institutional Correction lecture only . . .
PDF
Insiders guide to clinical Medicine.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Sports Quiz easy sports quiz sports quiz
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Complications of Minimal Access Surgery at WLH
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
Cell Structure & Organelles in detailed.
PPTX
Cell Types and Its function , kingdom of life
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
TR - Agricultural Crops Production NC III.pdf
Pharma ospi slides which help in ospi learning
RMMM.pdf make it easy to upload and study
Anesthesia in Laparoscopic Surgery in India
VCE English Exam - Section C Student Revision Booklet
Institutional Correction lecture only . . .
Insiders guide to clinical Medicine.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
Sports Quiz easy sports quiz sports quiz
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
Microbial disease of the cardiovascular and lymphatic systems
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Complications of Minimal Access Surgery at WLH
human mycosis Human fungal infections are called human mycosis..pptx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Cell Structure & Organelles in detailed.
Cell Types and Its function , kingdom of life

OS - File Handling

  • 1. File Handling Organized By: Vinay Arora Assistant Professor CSED, TU V.A. CSED,TU
  • 2. Disclaimer This is NOT A COPYRIGHT MATERIAL Content has been taken mainly from the following books: Operating Systems Concepts By Silberschatz & Galvin, Operating Systems: Internals and Design Principles By William Stallings www.os-book.com www.cs.jhu.edu/~yairamir/cs418/os2/sld001.htm www.personal.kent.edu/~rmuhamma/OpSystems/os.html http://msdn.microsoft.com/en-us/library/ms685096(VS.85).aspx http://www.computer.howsttuffworks.com/operating-system6.htm http://williamstallings.com/OS/Animations.html http://msdn.microsoft.com/en-us/library/aa450566.aspx www.os-book.com http://www.yolinux.com/TUTORIALS/ForkExecProcesses.html Etc… VA. CSED,TU
  • 3. File Concept Contiguous Logical Address Space Types: Data numeric character Binary Program VA. CSED,TU
  • 4. 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 VA. CSED,TU
  • 5. File Operations Create Write Read Reposition within File 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 VA. CSED,TU
  • 6. 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 VA. CSED,TU
  • 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 VA. CSED,TU
  • 9. Sequential Access VA. CSED,TU
  • 10. Index & Relative Files VA. CSED,TU
  • 11. Directory Structure A collection of nodes containing information about all files VA. CSED,TU
  • 13. Operations performed on Directory Search for a File Create a File Delete a File List a Directory Rename a File Traverse the File System VA. CSED,TU
  • 14. Organize directory 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, …) VA. CSED,TU
  • 15. Single-level Directory VA. CSED,TU
  • 16. Two-level Directory VA. CSED,TU
  • 18. Acyclic Graph Directory VA. CSED,TU
  • 19. General Graph Directory VA. CSED,TU
  • 20. File Sharing VA. CSED,TU
  • 21. File Sharing VA. CSED,TU
  • 22. File Security VA. CSED,TU
  • 23. Thnx… VA. CSED,TU