SlideShare une entreprise Scribd logo
1  sur  29
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

Contenu connexe

Tendances

File protection.59 to 60
File protection.59 to 60File protection.59 to 60
File protection.59 to 60myrajendra
 
Introduction to Object Oriented databases
Introduction to Object Oriented databasesIntroduction to Object Oriented databases
Introduction to Object Oriented databasesDr. C.V. Suresh Babu
 
Ch 1-final-file organization from korth
Ch 1-final-file organization from korthCh 1-final-file organization from korth
Ch 1-final-file organization from korthRupali Rana
 
Introduction to files and db systems 1.0
Introduction to files and db systems 1.0Introduction to files and db systems 1.0
Introduction to files and db systems 1.0Dr. C.V. Suresh Babu
 
Introduction to File System
Introduction to File SystemIntroduction to File System
Introduction to File SystemSanthiNivas
 
Arinda oktaviana 11353204810 vii lokal g
Arinda oktaviana 11353204810   vii lokal gArinda oktaviana 11353204810   vii lokal g
Arinda oktaviana 11353204810 vii lokal gArinda oktaviana
 
Database systems
Database systemsDatabase systems
Database systemsDhani Ahmad
 
Lecture 3 multimedia databases
Lecture 3   multimedia databasesLecture 3   multimedia databases
Lecture 3 multimedia databasesRanjana N Jinde
 
Database Management System And Design Questions
Database Management System And Design QuestionsDatabase Management System And Design Questions
Database Management System And Design QuestionsSamir Sabry
 
Computer Software | Lecture 4A
Computer Software | Lecture 4AComputer Software | Lecture 4A
Computer Software | Lecture 4ACMDLMS
 
Database Management Systems - Management Information System
Database Management Systems - Management Information SystemDatabase Management Systems - Management Information System
Database Management Systems - Management Information SystemNijaz N
 

Tendances (19)

Database File operation
Database File operationDatabase File operation
Database File operation
 
File protection.59 to 60
File protection.59 to 60File protection.59 to 60
File protection.59 to 60
 
Introduction to Object Oriented databases
Introduction to Object Oriented databasesIntroduction to Object Oriented databases
Introduction to Object Oriented databases
 
Ch 1-final-file organization from korth
Ch 1-final-file organization from korthCh 1-final-file organization from korth
Ch 1-final-file organization from korth
 
Introduction to files and db systems 1.0
Introduction to files and db systems 1.0Introduction to files and db systems 1.0
Introduction to files and db systems 1.0
 
File structure
File structureFile structure
File structure
 
Introduction to File System
Introduction to File SystemIntroduction to File System
Introduction to File System
 
Arinda oktaviana 11353204810 vii lokal g
Arinda oktaviana 11353204810   vii lokal gArinda oktaviana 11353204810   vii lokal g
Arinda oktaviana 11353204810 vii lokal g
 
Database systems
Database systemsDatabase systems
Database systems
 
Lecture 3 multimedia databases
Lecture 3   multimedia databasesLecture 3   multimedia databases
Lecture 3 multimedia databases
 
Indexing and Retrieval of Audio
Indexing and Retrieval of AudioIndexing and Retrieval of Audio
Indexing and Retrieval of Audio
 
Database Management System And Design Questions
Database Management System And Design QuestionsDatabase Management System And Design Questions
Database Management System And Design Questions
 
Database v1
Database v1Database v1
Database v1
 
Multimedia Database
Multimedia DatabaseMultimedia Database
Multimedia Database
 
Computer Software | Lecture 4A
Computer Software | Lecture 4AComputer Software | Lecture 4A
Computer Software | Lecture 4A
 
Database Management Systems - Management Information System
Database Management Systems - Management Information SystemDatabase Management Systems - Management Information System
Database Management Systems - Management Information System
 
Database Systems Concepts, 5th Ed
Database Systems Concepts, 5th EdDatabase Systems Concepts, 5th Ed
Database Systems Concepts, 5th Ed
 
Database Chapter 1
Database Chapter 1Database Chapter 1
Database Chapter 1
 
En ch23
En ch23En ch23
En ch23
 

Similaire à File management in OS

File Management & Access Control
File Management & Access Control File Management & Access Control
File Management & Access Control YuvrajWadavale
 
File Management in Operating System
File Management in Operating SystemFile Management in Operating System
File Management in Operating SystemJanki Shah
 
Computer Software - Lecture D
Computer Software - Lecture DComputer Software - Lecture D
Computer Software - Lecture DCMDLearning
 
Computer Software | Lecture 4D
Computer Software | Lecture 4DComputer Software | Lecture 4D
Computer Software | Lecture 4DCMDLMS
 
File organization and introduction of DBMS
File organization and introduction of DBMSFile organization and introduction of DBMS
File organization and introduction of DBMSVrushaliSolanke
 
fileorganizationandintroductionofdbms-210313163900.pdf
fileorganizationandintroductionofdbms-210313163900.pdffileorganizationandintroductionofdbms-210313163900.pdf
fileorganizationandintroductionofdbms-210313163900.pdfFraolUmeta
 
UNIT7-FileMgmt.pptx
UNIT7-FileMgmt.pptxUNIT7-FileMgmt.pptx
UNIT7-FileMgmt.pptxNavyaKumar22
 

Similaire à File management in OS (20)

File Management
File ManagementFile Management
File Management
 
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 & Access Control
File Management & Access Control File Management & Access Control
File Management & Access Control
 
File system
File systemFile system
File system
 
File Management in Operating System
File Management in Operating SystemFile Management in Operating System
File Management in Operating System
 
File Systems
File SystemsFile Systems
File Systems
 
Computer Software - Lecture D
Computer Software - Lecture DComputer Software - Lecture D
Computer Software - Lecture D
 
Computer Software | Lecture 4D
Computer Software | Lecture 4DComputer Software | Lecture 4D
Computer Software | Lecture 4D
 
OS Unit 4.pptx
OS Unit 4.pptxOS Unit 4.pptx
OS Unit 4.pptx
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
File Management
File ManagementFile Management
File Management
 
Ch10 file system interface
Ch10   file system interfaceCh10   file system interface
Ch10 file system interface
 
Chapter 12.pptx
Chapter 12.pptxChapter 12.pptx
Chapter 12.pptx
 
File System.pptx
File System.pptxFile System.pptx
File System.pptx
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
 
File organization and introduction of DBMS
File organization and introduction of DBMSFile organization and introduction of DBMS
File organization and introduction of DBMS
 
fileorganizationandintroductionofdbms-210313163900.pdf
fileorganizationandintroductionofdbms-210313163900.pdffileorganizationandintroductionofdbms-210313163900.pdf
fileorganizationandintroductionofdbms-210313163900.pdf
 
file management
file managementfile management
file management
 
File organisation
File organisationFile organisation
File organisation
 
UNIT7-FileMgmt.pptx
UNIT7-FileMgmt.pptxUNIT7-FileMgmt.pptx
UNIT7-FileMgmt.pptx
 

Plus de Bhavik Vashi

Runge Kutta Method
Runge Kutta Method Runge Kutta Method
Runge Kutta Method Bhavik Vashi
 
Rate monotonic scheduling- Operating System
Rate monotonic scheduling- Operating SystemRate monotonic scheduling- Operating System
Rate monotonic scheduling- Operating SystemBhavik Vashi
 
Data Structure Radix Sort
Data Structure Radix SortData Structure Radix Sort
Data Structure Radix SortBhavik Vashi
 
Types of Constructor in C++
Types of Constructor in C++Types of Constructor in C++
Types of Constructor in C++Bhavik Vashi
 
Parallel processing (simd and mimd)
Parallel processing (simd and mimd)Parallel processing (simd and mimd)
Parallel processing (simd and mimd)Bhavik Vashi
 
Ethernet and switches
Ethernet and switchesEthernet and switches
Ethernet and switchesBhavik Vashi
 
Fiscal Policy & Monetary Policy
Fiscal Policy & Monetary PolicyFiscal Policy & Monetary Policy
Fiscal Policy & Monetary PolicyBhavik Vashi
 
Projection of lines
Projection of linesProjection of lines
Projection of linesBhavik Vashi
 
Most Successful People & Personality
Most Successful People & Personality Most Successful People & Personality
Most Successful People & Personality Bhavik Vashi
 
Global Need of the World
Global Need of the WorldGlobal Need of the World
Global Need of the WorldBhavik Vashi
 
Functions of stdio conio
Functions of stdio   conio Functions of stdio   conio
Functions of stdio conio Bhavik Vashi
 
Impact of social media
Impact of social mediaImpact of social media
Impact of social mediaBhavik Vashi
 

Plus de Bhavik Vashi (20)

Aws ec2
Aws ec2Aws ec2
Aws ec2
 
MACRO PROCESSOR
MACRO PROCESSORMACRO PROCESSOR
MACRO PROCESSOR
 
Cloud computing
Cloud computingCloud computing
Cloud computing
 
Linear Sorting
Linear SortingLinear Sorting
Linear Sorting
 
Colormodels
ColormodelsColormodels
Colormodels
 
Kruskal Algorithm
Kruskal AlgorithmKruskal Algorithm
Kruskal Algorithm
 
Runge Kutta Method
Runge Kutta Method Runge Kutta Method
Runge Kutta Method
 
Rate monotonic scheduling- Operating System
Rate monotonic scheduling- Operating SystemRate monotonic scheduling- Operating System
Rate monotonic scheduling- Operating System
 
Data Structure Radix Sort
Data Structure Radix SortData Structure Radix Sort
Data Structure Radix Sort
 
Types of Constructor in C++
Types of Constructor in C++Types of Constructor in C++
Types of Constructor in C++
 
Parallel processing (simd and mimd)
Parallel processing (simd and mimd)Parallel processing (simd and mimd)
Parallel processing (simd and mimd)
 
Ethernet and switches
Ethernet and switchesEthernet and switches
Ethernet and switches
 
Fiscal Policy & Monetary Policy
Fiscal Policy & Monetary PolicyFiscal Policy & Monetary Policy
Fiscal Policy & Monetary Policy
 
Diwali Light
Diwali LightDiwali Light
Diwali Light
 
Heat transfer
Heat transferHeat transfer
Heat transfer
 
Projection of lines
Projection of linesProjection of lines
Projection of lines
 
Most Successful People & Personality
Most Successful People & Personality Most Successful People & Personality
Most Successful People & Personality
 
Global Need of the World
Global Need of the WorldGlobal Need of the World
Global Need of the World
 
Functions of stdio conio
Functions of stdio   conio Functions of stdio   conio
Functions of stdio conio
 
Impact of social media
Impact of social mediaImpact of social media
Impact of social media
 

Dernier

Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...drmkjayanthikannan
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdfKamal Acharya
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersMairaAshraf6
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdfKamal Acharya
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwaitjaanualu31
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARKOUSTAV SARKAR
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxNadaHaitham1
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesRAJNEESHKUMAR341697
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxchumtiyababu
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 

Dernier (20)

Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to Computers
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptx
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 

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