Department of Information Technology, G H Patel College of Engineering and Technology,
Academic Year – 2017-18 (Even)
2140702 – Operating Systems
File concept, Access methods, File types,
File operation, Directory structure, File
System structure, Allocation methods
(contiguous , linked, indexed)
Prepared By
Tejoy Vachhrajani (160110116057)
Khyati Valera (160110116059)
Vashi Bhavik (160110116061)
Department of Information Technology, G H Patel College of Engineering and Technology 2
File Concept
• Files are the building blocks of any operation system. Permanent
storage of information & data is a file.
• OS is not interested in what information is stored in file . OS maps
files with physical devices.
• User prepare a program (file ), File represent program and data.
The output of program is executable file.
Department of Information Technology, G H Patel College of Engineering and Technology 3
Access Methods
• File access mechanism refers to the manner in which the records
of a file may be accessed. There are several ways to access files
• Sequential access
• Direct/Random access
• Indexed sequential access
Department of Information Technology, G H Patel College of Engineering and Technology 4
Access Methods : Sequential access
• A sequential access is that in which the records are accessed in
some sequence, i.e., the information in the file is processed in
order, one record after the other.
• This access method is the most primitive one.
Example: Compilers usually access files in this fashion.
Department of Information Technology, G H Patel College of Engineering and Technology 5
Access Methods : Direct/Random access
• Random access file organization provides, accessing the records
directly.
• Each record has its own address on the file with by the help of
which it can be directly accessed for reading or writing.
• The records need not be in any sequence within the file and they
need not be in adjacent locations on the storage medium.
Department of Information Technology, G H Patel College of Engineering and Technology 6
Access Methods: Indexed sequential access
• This mechanism is built up on base of sequential access.
• An index is created for each file which contains pointers to various
blocks.
• Index is searched sequentially and its pointer is used to access the
file directly.
Department of Information Technology, G H Patel College of Engineering and Technology 7
File types
• File type refers to the ability of the operating system to distinguish
different types of file such as text files source files and binary files
etc. Many operating systems support many types of files.
Operating system like MS-DOS and UNIX have the following types
of files.
• Ordinary files
• Directory files
• Special files
Department of Information Technology, G H Patel College of Engineering and Technology 8
File types : Ordinary files
• These are the files that contain user information.
• These may have text, databases or executable program.
• The user can apply various operations on such files like add,
modify, delete or even remove the entire file.
Department of Information Technology, G H Patel College of Engineering and Technology 9
File types : Directory files
• These files contain list of file names and other information related
to these files.
Department of Information Technology, G H Patel College of Engineering and Technology 10
File types : Special files
• These files are also known as device files.
• These files represent physical device like disks, terminals, printers,
networks, tape drive etc.
• These files are of two types −
• Character special files − data is handled character by character as in case
of terminals or printers.
• Block special files − data is handled in blocks as in the case of disks and
tapes.
Department of Information Technology, G H Patel College of Engineering and Technology 11
File Operations
• File Create Operation : The file is created with no data.
• File Delete Operation : File must has to be deleted when it is no
longer needed just to free up the disk space.
• File Open Operation : The process must open the file before
using it.
• File Close Operation : The file must be closed to free up the
internal table space, when all the accesses are finished and the
attributes and the disk addresses are no longer needed.
• File Read Operation : The file read operation is performed just to
read the data that are stored in the required file.
Department of Information Technology, G H Patel College of Engineering and Technology 12
File Operations
• File Write Operation : The file write operation is used to write the data to the file,
again, generally at the current position.
• File Append Operation : The file append operation is same as the file write
operation except that the file append operation only add the data at the end of the
file.
• File Seek Operation : For random access files, a method is needed just to specify
from where to take the data. Therefore, the file seek operation performs this task.
• File Get Attribute Operation : The file get attributes operation are performed by
the processes when they need to read the file attributes to do their required work.
• File Set Attribute Operation : The file set attribute operation used to set some of
the attributes (user settable attributes) after the file has been created.
• File Rename Operation : The file rename operation is used to change the name of
the existing file.
Department of Information Technology, G H Patel College of Engineering and Technology 13
Directory structure
• Directory is a symbol table of files that stores all the related
information about the file it hold with the contents. Directory is a
list of files. Each entry of a directory define a file information like a
file name, type, its version number, size ,owner of file, access
rights, date of creation and date of last backup.
• Types:-
• 1. Single level directory
• 2. Two level directory
• 3. Tree structured directory
• 4. Acyclic graph directory
• 5. General graph directory
Department of Information Technology, G H Patel College of Engineering and Technology 14
Directory structure
1.Single level directory: -
• In a single level directory system, all the files are placed in one
directory
Department of Information Technology, G H Patel College of Engineering and Technology 15
Directory structure
2.Two level directory: -
• In the two-level directory system, the system maintains a master
block that has one entry for each user.
Department of Information Technology, G H Patel College of Engineering and Technology 16
Directory structure
3.Tree structured directory:-
• In the tree-structured directory, the directory themselves are files.
This leads to the possibility of having sub-directories that can
contain files and sub-subdirectories.
Department of Information Technology, G H Patel College of Engineering and Technology 17
Directory structure
4. Acyclic graph directory:-
• The acyclic directory structure is an extension of the tree-
structured directory structure.
Department of Information Technology, G H Patel College of Engineering and Technology 18
Directory structure
5. General graph directory: -
• The general graph directory is formed by adding links into an
existing tree structure. It overcomes the problem of acyclic graph
by allows the cycles in a directory.
Department of Information Technology, G H Patel College of Engineering and Technology 19
File System Structure
• File system is mounted and maintained by the secondary storage
which provides by disk.
• Characteristics of disk : same place is used for reading , writing ,
modification , user can access disk directly for any block of
information
• Concept of file system is used for the efficient and convenient
access to the disk.
• File system stricter allows to data to store , locate , retrieved data.
Department of Information Technology, G H Patel College of Engineering and Technology 20
Department of Information Technology, G H Patel College of Engineering and Technology 21
File System Structure
IO control interface:-
• It consists of device driver & interrupt hander.
• Transfer data : main memory to disk system.
Basic file system layer:-
• Generate command for device driver.
• Also manage buffer memory & cache.
File Organization Module layer:-
• Maintain information about files
Department of Information Technology, G H Patel College of Engineering and Technology 22
File System Structure
Logical file System Layer :-
• Manages the meta data information.
Application Program Layer :-
• User creates application program.
Physical hardware device layer:-
• Contain actual hardware device.
Department of Information Technology, G H Patel College of Engineering and Technology 23
File System Structure
OS File System Format
Windows FAT , FAT32 , NTFS
UNIX UNIX File System
Standard LINUX Extended File System
Department of Information Technology, G H Patel College of Engineering and Technology 24
Department of Information Technology, G H Patel College of Engineering and Technology 25
Allocation methods
• Files are allocated disk spaces by operating system. Operating
systems deploy following three main ways to allocate disk space to
files.
• Contiguous Allocation
• Linked Allocation
• Indexed Allocation
Department of Information Technology, G H Patel College of Engineering and Technology 26
Allocation methods : Contiguous Allocation
• Each file occupies a contiguous address space on disk.
• Assigned disk address is in linear order.
• Easy to implement.
• External fragmentation is a major issue with this type of allocation
technique.
Department of Information Technology, G H Patel College of Engineering and Technology 27
Allocation methods : Linked Allocation
• Each file carries a list of links to disk blocks.
• Directory contains link / pointer to first block of a file.
• No external fragmentation
• Effectively used in sequential access file.
• Inefficient in case of direct access file.
Department of Information Technology, G H Patel College of Engineering and Technology 28
Allocation methods : Indexed Allocation
• Provides solutions to problems of contiguous and linked
allocation.
• A index block is created having all pointers to files.
• Each file has its own index block which stores the addresses of
disk space occupied by the file.
• Directory contains the addresses of index blocks of files.
Department of Information Technology, G H Patel College of Engineering and Technology 29

More Related Content

PPT
Ch 8 data base
PDF
Chap01 (ics12)
PDF
File system in operating system e learning
PPTX
M2 211-unix fs-rl_2.1.1
PPT
Chapter 3 part 1
PPT
Chapter 3 part 2
PPTX
Week 9
PPT
File access methods.54
Ch 8 data base
Chap01 (ics12)
File system in operating system e learning
M2 211-unix fs-rl_2.1.1
Chapter 3 part 1
Chapter 3 part 2
Week 9
File access methods.54

What's hot (19)

PPTX
Database File operation
PPT
File protection.59 to 60
PPTX
Introduction to Object Oriented databases
PPT
Ch 1-final-file organization from korth
PPTX
Introduction to files and db systems 1.0
PDF
File structure
PPTX
Introduction to File System
PPTX
Arinda oktaviana 11353204810 vii lokal g
PPT
Database systems
PPT
Lecture 3 multimedia databases
PDF
Indexing and Retrieval of Audio
PDF
Database Management System And Design Questions
PDF
Database v1
PPTX
Multimedia Database
PPTX
Computer Software | Lecture 4A
PPTX
Database Management Systems - Management Information System
PPT
Database Systems Concepts, 5th Ed
PPT
Database Chapter 1
PPT
Database File operation
File protection.59 to 60
Introduction to Object Oriented databases
Ch 1-final-file organization from korth
Introduction to files and db systems 1.0
File structure
Introduction to File System
Arinda oktaviana 11353204810 vii lokal g
Database systems
Lecture 3 multimedia databases
Indexing and Retrieval of Audio
Database Management System And Design Questions
Database v1
Multimedia Database
Computer Software | Lecture 4A
Database Management Systems - Management Information System
Database Systems Concepts, 5th Ed
Database Chapter 1
Ad

Similar to File management in OS (20)

PPTX
File Management
PPTX
(file systems)12312321321321312312312.pptx
PPTX
File System operating system operating system
PPTX
8 File Management system project .pptx
PPT
operating systems and File Management.ppt
PPT
network and system admistration by Chapter 4.ppt
PPTX
File Management & Access Control
PPT
detailed explanation on unix file system
PPTX
Unit 6 OSY.pptx aaaaaaaaaaaaaaaaaaaaaaaa
PPTX
PPTX
File Management in Operating System
PDF
File Systems
PPTX
Computer Software | Lecture 4D
PPTX
Computer Software - Lecture D
PPTX
File Concept.pptx fa s fasfasfasfsfsfasfasfas
PPTX
File_IO_Embedded_Systems_Presentation.pptx
PPTX
Operating System Unit 4(RTU Syllabus).pptx
PPTX
OS Unit 4.pptx
PPTX
Chapter 3
PPTX
Unit-1-Lecture-9.pptx file structure semester
File Management
(file systems)12312321321321312312312.pptx
File System operating system operating system
8 File Management system project .pptx
operating systems and File Management.ppt
network and system admistration by Chapter 4.ppt
File Management & Access Control
detailed explanation on unix file system
Unit 6 OSY.pptx aaaaaaaaaaaaaaaaaaaaaaaa
File Management in Operating System
File Systems
Computer Software | Lecture 4D
Computer Software - Lecture D
File Concept.pptx fa s fasfasfasfsfsfasfasfas
File_IO_Embedded_Systems_Presentation.pptx
Operating System Unit 4(RTU Syllabus).pptx
OS Unit 4.pptx
Chapter 3
Unit-1-Lecture-9.pptx file structure semester
Ad

More from Bhavik Vashi (20)

PPTX
Aws ec2
PPTX
MACRO PROCESSOR
PPTX
Cloud computing
PPTX
Linear Sorting
PPTX
Colormodels
PPTX
Kruskal Algorithm
PPTX
Runge Kutta Method
PDF
Rate monotonic scheduling- Operating System
PDF
Data Structure Radix Sort
PPTX
Types of Constructor in C++
PPTX
Parallel processing (simd and mimd)
PPT
Ethernet and switches
PPTX
Fiscal Policy & Monetary Policy
PPTX
Diwali Light
PPT
Heat transfer
PPTX
Projection of lines
PPTX
Most Successful People & Personality
PPTX
Global Need of the World
PPTX
Functions of stdio conio
PPTX
Impact of social media
Aws ec2
MACRO PROCESSOR
Cloud computing
Linear Sorting
Colormodels
Kruskal Algorithm
Runge Kutta Method
Rate monotonic scheduling- Operating System
Data Structure Radix Sort
Types of Constructor in C++
Parallel processing (simd and mimd)
Ethernet and switches
Fiscal Policy & Monetary Policy
Diwali Light
Heat transfer
Projection of lines
Most Successful People & Personality
Global Need of the World
Functions of stdio conio
Impact of social media

Recently uploaded (20)

PPTX
Unit IImachinemachinetoolopeartions.pptx
PDF
[jvmmeetup] next-gen integration with apache camel and quarkus.pdf
PPTX
Agentic Artificial Intelligence (Agentic AI).pptx
PDF
Cryptography and Network Security-Module-I.pdf
PPTX
Micro1New.ppt.pptx the main themes if micro
PPTX
chapter 1.pptx dotnet technology introduction
PPTX
Wireless sensor networks (WSN) SRM unit 2
PDF
MACCAFERRY GUIA GAVIONES TERRAPLENES EN ESPAÑOL
PPTX
AI-Reporting for Emerging Technologies(BS Computer Engineering)
PDF
Unit I -OPERATING SYSTEMS_SRM_KATTANKULATHUR.pptx.pdf
PPTX
Environmental studies, Moudle 3-Environmental Pollution.pptx
PDF
MLpara ingenieira CIVIL, meca Y AMBIENTAL
PPTX
Module1.pptxrjkeieuekwkwoowkemehehehrjrjrj
PPTX
BBOC407 BIOLOGY FOR ENGINEERS (CS) - MODULE 1 PART 1.pptx
PDF
IAE-V2500 Engine Airbus Family A319/320
PDF
Lesson 3 .pdf
PPTX
INTERNET OF THINGS - EMBEDDED SYSTEMS AND INTERNET OF THINGS
PPTX
CS6006 - CLOUD COMPUTING - Module - 1.pptx
PDF
Principles of operation, construction, theory, advantages and disadvantages, ...
PDF
VTU IOT LAB MANUAL (BCS701) Computer science and Engineering
Unit IImachinemachinetoolopeartions.pptx
[jvmmeetup] next-gen integration with apache camel and quarkus.pdf
Agentic Artificial Intelligence (Agentic AI).pptx
Cryptography and Network Security-Module-I.pdf
Micro1New.ppt.pptx the main themes if micro
chapter 1.pptx dotnet technology introduction
Wireless sensor networks (WSN) SRM unit 2
MACCAFERRY GUIA GAVIONES TERRAPLENES EN ESPAÑOL
AI-Reporting for Emerging Technologies(BS Computer Engineering)
Unit I -OPERATING SYSTEMS_SRM_KATTANKULATHUR.pptx.pdf
Environmental studies, Moudle 3-Environmental Pollution.pptx
MLpara ingenieira CIVIL, meca Y AMBIENTAL
Module1.pptxrjkeieuekwkwoowkemehehehrjrjrj
BBOC407 BIOLOGY FOR ENGINEERS (CS) - MODULE 1 PART 1.pptx
IAE-V2500 Engine Airbus Family A319/320
Lesson 3 .pdf
INTERNET OF THINGS - EMBEDDED SYSTEMS AND INTERNET OF THINGS
CS6006 - CLOUD COMPUTING - Module - 1.pptx
Principles of operation, construction, theory, advantages and disadvantages, ...
VTU IOT LAB MANUAL (BCS701) Computer science and Engineering

File management in OS

  • 1. Department of Information Technology, G H Patel College of Engineering and Technology, Academic Year – 2017-18 (Even) 2140702 – Operating Systems File concept, Access methods, File types, File operation, Directory structure, File System structure, Allocation methods (contiguous , linked, indexed) Prepared By Tejoy Vachhrajani (160110116057) Khyati Valera (160110116059) Vashi Bhavik (160110116061)
  • 2. Department of Information Technology, G H Patel College of Engineering and Technology 2 File Concept • Files are the building blocks of any operation system. Permanent storage of information & data is a file. • OS is not interested in what information is stored in file . OS maps files with physical devices. • User prepare a program (file ), File represent program and data. The output of program is executable file.
  • 3. Department of Information Technology, G H Patel College of Engineering and Technology 3 Access Methods • File access mechanism refers to the manner in which the records of a file may be accessed. There are several ways to access files • Sequential access • Direct/Random access • Indexed sequential access
  • 4. Department of Information Technology, G H Patel College of Engineering and Technology 4 Access Methods : Sequential access • A sequential access is that in which the records are accessed in some sequence, i.e., the information in the file is processed in order, one record after the other. • This access method is the most primitive one. Example: Compilers usually access files in this fashion.
  • 5. Department of Information Technology, G H Patel College of Engineering and Technology 5 Access Methods : Direct/Random access • Random access file organization provides, accessing the records directly. • Each record has its own address on the file with by the help of which it can be directly accessed for reading or writing. • The records need not be in any sequence within the file and they need not be in adjacent locations on the storage medium.
  • 6. Department of Information Technology, G H Patel College of Engineering and Technology 6 Access Methods: Indexed sequential access • This mechanism is built up on base of sequential access. • An index is created for each file which contains pointers to various blocks. • Index is searched sequentially and its pointer is used to access the file directly.
  • 7. Department of Information Technology, G H Patel College of Engineering and Technology 7 File types • File type refers to the ability of the operating system to distinguish different types of file such as text files source files and binary files etc. Many operating systems support many types of files. Operating system like MS-DOS and UNIX have the following types of files. • Ordinary files • Directory files • Special files
  • 8. Department of Information Technology, G H Patel College of Engineering and Technology 8 File types : Ordinary files • These are the files that contain user information. • These may have text, databases or executable program. • The user can apply various operations on such files like add, modify, delete or even remove the entire file.
  • 9. Department of Information Technology, G H Patel College of Engineering and Technology 9 File types : Directory files • These files contain list of file names and other information related to these files.
  • 10. Department of Information Technology, G H Patel College of Engineering and Technology 10 File types : Special files • These files are also known as device files. • These files represent physical device like disks, terminals, printers, networks, tape drive etc. • These files are of two types − • Character special files − data is handled character by character as in case of terminals or printers. • Block special files − data is handled in blocks as in the case of disks and tapes.
  • 11. Department of Information Technology, G H Patel College of Engineering and Technology 11 File Operations • File Create Operation : The file is created with no data. • File Delete Operation : File must has to be deleted when it is no longer needed just to free up the disk space. • File Open Operation : The process must open the file before using it. • File Close Operation : The file must be closed to free up the internal table space, when all the accesses are finished and the attributes and the disk addresses are no longer needed. • File Read Operation : The file read operation is performed just to read the data that are stored in the required file.
  • 12. Department of Information Technology, G H Patel College of Engineering and Technology 12 File Operations • File Write Operation : The file write operation is used to write the data to the file, again, generally at the current position. • File Append Operation : The file append operation is same as the file write operation except that the file append operation only add the data at the end of the file. • File Seek Operation : For random access files, a method is needed just to specify from where to take the data. Therefore, the file seek operation performs this task. • File Get Attribute Operation : The file get attributes operation are performed by the processes when they need to read the file attributes to do their required work. • File Set Attribute Operation : The file set attribute operation used to set some of the attributes (user settable attributes) after the file has been created. • File Rename Operation : The file rename operation is used to change the name of the existing file.
  • 13. Department of Information Technology, G H Patel College of Engineering and Technology 13 Directory structure • Directory is a symbol table of files that stores all the related information about the file it hold with the contents. Directory is a list of files. Each entry of a directory define a file information like a file name, type, its version number, size ,owner of file, access rights, date of creation and date of last backup. • Types:- • 1. Single level directory • 2. Two level directory • 3. Tree structured directory • 4. Acyclic graph directory • 5. General graph directory
  • 14. Department of Information Technology, G H Patel College of Engineering and Technology 14 Directory structure 1.Single level directory: - • In a single level directory system, all the files are placed in one directory
  • 15. Department of Information Technology, G H Patel College of Engineering and Technology 15 Directory structure 2.Two level directory: - • In the two-level directory system, the system maintains a master block that has one entry for each user.
  • 16. Department of Information Technology, G H Patel College of Engineering and Technology 16 Directory structure 3.Tree structured directory:- • In the tree-structured directory, the directory themselves are files. This leads to the possibility of having sub-directories that can contain files and sub-subdirectories.
  • 17. Department of Information Technology, G H Patel College of Engineering and Technology 17 Directory structure 4. Acyclic graph directory:- • The acyclic directory structure is an extension of the tree- structured directory structure.
  • 18. Department of Information Technology, G H Patel College of Engineering and Technology 18 Directory structure 5. General graph directory: - • The general graph directory is formed by adding links into an existing tree structure. It overcomes the problem of acyclic graph by allows the cycles in a directory.
  • 19. Department of Information Technology, G H Patel College of Engineering and Technology 19 File System Structure • File system is mounted and maintained by the secondary storage which provides by disk. • Characteristics of disk : same place is used for reading , writing , modification , user can access disk directly for any block of information • Concept of file system is used for the efficient and convenient access to the disk. • File system stricter allows to data to store , locate , retrieved data.
  • 20. Department of Information Technology, G H Patel College of Engineering and Technology 20
  • 21. Department of Information Technology, G H Patel College of Engineering and Technology 21 File System Structure IO control interface:- • It consists of device driver & interrupt hander. • Transfer data : main memory to disk system. Basic file system layer:- • Generate command for device driver. • Also manage buffer memory & cache. File Organization Module layer:- • Maintain information about files
  • 22. Department of Information Technology, G H Patel College of Engineering and Technology 22 File System Structure Logical file System Layer :- • Manages the meta data information. Application Program Layer :- • User creates application program. Physical hardware device layer:- • Contain actual hardware device.
  • 23. Department of Information Technology, G H Patel College of Engineering and Technology 23 File System Structure OS File System Format Windows FAT , FAT32 , NTFS UNIX UNIX File System Standard LINUX Extended File System
  • 24. Department of Information Technology, G H Patel College of Engineering and Technology 24
  • 25. Department of Information Technology, G H Patel College of Engineering and Technology 25 Allocation methods • Files are allocated disk spaces by operating system. Operating systems deploy following three main ways to allocate disk space to files. • Contiguous Allocation • Linked Allocation • Indexed Allocation
  • 26. Department of Information Technology, G H Patel College of Engineering and Technology 26 Allocation methods : Contiguous Allocation • Each file occupies a contiguous address space on disk. • Assigned disk address is in linear order. • Easy to implement. • External fragmentation is a major issue with this type of allocation technique.
  • 27. Department of Information Technology, G H Patel College of Engineering and Technology 27 Allocation methods : Linked Allocation • Each file carries a list of links to disk blocks. • Directory contains link / pointer to first block of a file. • No external fragmentation • Effectively used in sequential access file. • Inefficient in case of direct access file.
  • 28. Department of Information Technology, G H Patel College of Engineering and Technology 28 Allocation methods : Indexed Allocation • Provides solutions to problems of contiguous and linked allocation. • A index block is created having all pointers to files. • Each file has its own index block which stores the addresses of disk space occupied by the file. • Directory contains the addresses of index blocks of files.
  • 29. Department of Information Technology, G H Patel College of Engineering and Technology 29