SlideShare ist ein Scribd-Unternehmen logo
1 von 6
1
FILE SYSTEM IMPLEMENTATION
FILE SYSTEM STRUCTURE:
When talking about “the file system”, you are making a statement about both the rules used
for file access, and about the algorithms used to implement those rules. Here’s a breakdown
of those algorithmic pieces.
Application Programs The code that's making a file request.
Logical File System This is the highest level in the OS; it does protection, and
security. Uses the directory structure to do name resolution.
File-organization Module Here we read the file control block maintained in the directory so
we know about files and the logical blocks where information
about that file is located.
Basic File System Knowing specific blocks to access, we can now make generic
requests to the appropriate device driver.
IO Control These are device drivers and interrupt handlers. They cause
the device to transfer information between that device and CPU
memory.
Devices The disks / tapes / etc.
2
a) Accessing the file requires a minimum of
head movement.
b) Easy to calculate block location: block i of
a file, starting at disk address b, is b + i.
c) Difficulty is in finding the contiguous
space, especially for a large file. Problem
is one of dynamic allocation (first fit, best
fit, etc.) which has external fragmentation.
If many files are created/deleted,
compaction will be necessary.
• It's hard to estimate at create time what the
size of the file will ultimately be. What
happens when we want to extend the file ---
we must either terminate the owner of the file,
or try to find a bigger hole.
CONTIGUOUS ALLOCATION
• Method: Lay down the entire file on contiguous sectors of the disk. Define by a
dyad <first block location, length >.
Allocation Methods
3
LINKED ALLOCATION
Each file is a linked list of disk blocks,
scattered anywhere on the disk.
At file creation time, simply tell the directory
about the file. When writing, get a free block
and write to it, enqueueing it to the file header.
There's no external fragmentation since each
request is for one block.
Method can only be effectively used for
sequential files.
Allocation Methods
4
LINKED ALLOCATION
Pointers use up space in each block.
Reliability is not high because any loss of a
pointer loses the rest of the file.
A File Allocation Table is a variation of this.
It uses a separate disk area to hold the
links.
This method doesn't use space in data
blocks. Many pointers may remain in
memory.
A FAT file system is used by MS-DOS.
Allocation Methods
5
INDEXED ALLOCATION
• Each file uses an index block on disk to contain
addresses of other disk blocks used by the file.
• When the i th block is written, the address of a
free block is placed at the i th position in the
index block.
• Method suffers from wasted space since, for
small files, most of the index block is wasted.
What is the optimum size of an index block?
• If the index block is too small, we can:
a) Link several together
b) Use a multilevel index
• UNIX keeps 12 pointers to blocks in its header. If
a file is longer than this, then it uses pointers to
single, double, and triple level index blocks.
Allocation Methods
6
PERFORMANCE ISSUES FOR THESE METHODS
It's difficult to compare mechanisms because usage is different. Let's calculate, for each
method, the number of disk accesses to read block i from a file:
contiguous: 1 access from location start + i.
linked: i + 1 accesses, reading each block in turn. (is this a fair example?)
index: 2 accesses, 1 for index, 1 for data.
Allocation Methods

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Deadlock ppt
Deadlock ppt Deadlock ppt
Deadlock ppt
 
Demand paging
Demand pagingDemand paging
Demand paging
 
Process synchronization in Operating Systems
Process synchronization in Operating SystemsProcess synchronization in Operating Systems
Process synchronization in Operating Systems
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
DeadLock in Operating-Systems
DeadLock in Operating-SystemsDeadLock in Operating-Systems
DeadLock in Operating-Systems
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentation
 
Virtual memory ppt
Virtual memory pptVirtual memory ppt
Virtual memory ppt
 
File Management in Operating System
File Management in Operating SystemFile Management in Operating System
File Management in Operating System
 
contiguous memory allocation.pptx
contiguous memory allocation.pptxcontiguous memory allocation.pptx
contiguous memory allocation.pptx
 
Dead Lock in operating system
Dead Lock in operating systemDead Lock in operating system
Dead Lock in operating system
 
Semophores and it's types
Semophores and it's typesSemophores and it's types
Semophores and it's types
 
Processes and threads
Processes and threadsProcesses and threads
Processes and threads
 
Memory management
Memory managementMemory management
Memory management
 
cpu scheduling
cpu schedulingcpu scheduling
cpu scheduling
 
Directory structure
Directory structureDirectory structure
Directory structure
 
Sorting
SortingSorting
Sorting
 
deadlock handling
deadlock handlingdeadlock handling
deadlock handling
 
First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)
 
Os Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual MemoryOs Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual Memory
 
Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
 

Ähnlich wie File Allocation Methods.ppt

Storage Mediums and Fragmentation
Storage Mediums and FragmentationStorage Mediums and Fragmentation
Storage Mediums and FragmentationJonathan Reid
 
Allocation method - Operating System.pptx
Allocation method - Operating System.pptxAllocation method - Operating System.pptx
Allocation method - Operating System.pptxIndhu Periys
 
File system in operating system e learning
File system in operating system e learningFile system in operating system e learning
File system in operating system e learningLavanya Sharma
 
Report blocking ,management of files in secondry memory , static vs dynamic a...
Report blocking ,management of files in secondry memory , static vs dynamic a...Report blocking ,management of files in secondry memory , static vs dynamic a...
Report blocking ,management of files in secondry memory , static vs dynamic a...NoorMustafaSoomro
 
Chapter 3 part 1
Chapter 3 part 1Chapter 3 part 1
Chapter 3 part 1rohassanie
 
Filesharing 180214044607
Filesharing 180214044607Filesharing 180214044607
Filesharing 180214044607kirupasuchi1996
 
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
 
Poking The Filesystem For Fun And Profit
Poking The Filesystem For Fun And ProfitPoking The Filesystem For Fun And Profit
Poking The Filesystem For Fun And Profitssusera432ea1
 
file management_part2_os_notes.ppt
file management_part2_os_notes.pptfile management_part2_os_notes.ppt
file management_part2_os_notes.pptHelalMirzad
 
Directory implementation and allocation methods
Directory implementation and allocation methodsDirectory implementation and allocation methods
Directory implementation and allocation methodssangrampatil81
 
Ch11 file system implementation
Ch11   file system implementationCh11   file system implementation
Ch11 file system implementationWelly Dian Astika
 

Ähnlich wie File Allocation Methods.ppt (20)

Chapter 3
Chapter 3Chapter 3
Chapter 3
 
Files
FilesFiles
Files
 
File System operating system operating system
File System  operating system operating systemFile System  operating system operating system
File System operating system operating system
 
Ch12_OS_Lecture 5.pdf
Ch12_OS_Lecture 5.pdfCh12_OS_Lecture 5.pdf
Ch12_OS_Lecture 5.pdf
 
Storage Mediums and Fragmentation
Storage Mediums and FragmentationStorage Mediums and Fragmentation
Storage Mediums and Fragmentation
 
Allocation method - Operating System.pptx
Allocation method - Operating System.pptxAllocation method - Operating System.pptx
Allocation method - Operating System.pptx
 
File system in operating system e learning
File system in operating system e learningFile system in operating system e learning
File system in operating system e learning
 
Report blocking ,management of files in secondry memory , static vs dynamic a...
Report blocking ,management of files in secondry memory , static vs dynamic a...Report blocking ,management of files in secondry memory , static vs dynamic a...
Report blocking ,management of files in secondry memory , static vs dynamic a...
 
Chapter 3 part 1
Chapter 3 part 1Chapter 3 part 1
Chapter 3 part 1
 
File sharing
File sharingFile sharing
File sharing
 
Filesharing 180214044607
Filesharing 180214044607Filesharing 180214044607
Filesharing 180214044607
 
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
 
Poking The Filesystem For Fun And Profit
Poking The Filesystem For Fun And ProfitPoking The Filesystem For Fun And Profit
Poking The Filesystem For Fun And Profit
 
file management_part2_os_notes.ppt
file management_part2_os_notes.pptfile management_part2_os_notes.ppt
file management_part2_os_notes.ppt
 
Directory implementation and allocation methods
Directory implementation and allocation methodsDirectory implementation and allocation methods
Directory implementation and allocation methods
 
Ext filesystem4
Ext filesystem4Ext filesystem4
Ext filesystem4
 
Operating system
Operating systemOperating system
Operating system
 
File organisation
File organisationFile organisation
File organisation
 
Ch11 file system implementation
Ch11   file system implementationCh11   file system implementation
Ch11 file system implementation
 

Mehr von BharathiLakshmiAAssi (17)

VB.net&OOP.pptx
VB.net&OOP.pptxVB.net&OOP.pptx
VB.net&OOP.pptx
 
VB.netIDE.pptx
VB.netIDE.pptxVB.netIDE.pptx
VB.netIDE.pptx
 
VB.Net-Introduction.ppt
VB.Net-Introduction.pptVB.Net-Introduction.ppt
VB.Net-Introduction.ppt
 
Demand Paging.pptx
Demand Paging.pptxDemand Paging.pptx
Demand Paging.pptx
 
Virtual Memory.pptx
Virtual Memory.pptxVirtual Memory.pptx
Virtual Memory.pptx
 
Knowing about Computer SS.pptx
Knowing about Computer SS.pptxKnowing about Computer SS.pptx
Knowing about Computer SS.pptx
 
Parallel Computing--Webminar.ppsx
Parallel Computing--Webminar.ppsxParallel Computing--Webminar.ppsx
Parallel Computing--Webminar.ppsx
 
MAPEM.ppsx
MAPEM.ppsxMAPEM.ppsx
MAPEM.ppsx
 
Iterative Algorithms.ppsx
Iterative Algorithms.ppsxIterative Algorithms.ppsx
Iterative Algorithms.ppsx
 
Intensity Transformation.ppsx
Intensity Transformation.ppsxIntensity Transformation.ppsx
Intensity Transformation.ppsx
 
MAtrix Multiplication Parallel.ppsx
MAtrix Multiplication Parallel.ppsxMAtrix Multiplication Parallel.ppsx
MAtrix Multiplication Parallel.ppsx
 
Web Designing.ppsx
Web Designing.ppsxWeb Designing.ppsx
Web Designing.ppsx
 
Graphics Designing-Intro.ppsx
Graphics Designing-Intro.ppsxGraphics Designing-Intro.ppsx
Graphics Designing-Intro.ppsx
 
Intensity Transformation & Spatial Filtering.ppsx
Intensity Transformation & Spatial Filtering.ppsxIntensity Transformation & Spatial Filtering.ppsx
Intensity Transformation & Spatial Filtering.ppsx
 
DIP Slide Share.ppsx
DIP Slide Share.ppsxDIP Slide Share.ppsx
DIP Slide Share.ppsx
 
Class Timetable.ppsx
Class Timetable.ppsxClass Timetable.ppsx
Class Timetable.ppsx
 
MAPEM.ppsx
MAPEM.ppsxMAPEM.ppsx
MAPEM.ppsx
 

Kürzlich hochgeladen

Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...amilabibi1
 
Dreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIIDreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIINhPhngng3
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoKayode Fayemi
 
My Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle BaileyMy Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle Baileyhlharris
 
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...David Celestin
 
Dreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video TreatmentDreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video Treatmentnswingard
 
SOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdf
SOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdfSOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdf
SOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdfMahamudul Hasan
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaKayode Fayemi
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfSenaatti-kiinteistöt
 
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfAWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfSkillCertProExams
 
Digital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of DrupalDigital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of DrupalFabian de Rijk
 
lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lodhisaajjda
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar TrainingKylaCullinane
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxraffaeleoman
 

Kürzlich hochgeladen (15)

Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
 
Dreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIIDreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio III
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
 
My Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle BaileyMy Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle Bailey
 
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
 
Dreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video TreatmentDreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video Treatment
 
SOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdf
SOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdfSOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdf
SOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdf
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
 
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfAWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
 
Digital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of DrupalDigital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of Drupal
 
lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.
 
ICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdfICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdf
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar Training
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
 

File Allocation Methods.ppt

  • 1. 1 FILE SYSTEM IMPLEMENTATION FILE SYSTEM STRUCTURE: When talking about “the file system”, you are making a statement about both the rules used for file access, and about the algorithms used to implement those rules. Here’s a breakdown of those algorithmic pieces. Application Programs The code that's making a file request. Logical File System This is the highest level in the OS; it does protection, and security. Uses the directory structure to do name resolution. File-organization Module Here we read the file control block maintained in the directory so we know about files and the logical blocks where information about that file is located. Basic File System Knowing specific blocks to access, we can now make generic requests to the appropriate device driver. IO Control These are device drivers and interrupt handlers. They cause the device to transfer information between that device and CPU memory. Devices The disks / tapes / etc.
  • 2. 2 a) Accessing the file requires a minimum of head movement. b) Easy to calculate block location: block i of a file, starting at disk address b, is b + i. c) Difficulty is in finding the contiguous space, especially for a large file. Problem is one of dynamic allocation (first fit, best fit, etc.) which has external fragmentation. If many files are created/deleted, compaction will be necessary. • It's hard to estimate at create time what the size of the file will ultimately be. What happens when we want to extend the file --- we must either terminate the owner of the file, or try to find a bigger hole. CONTIGUOUS ALLOCATION • Method: Lay down the entire file on contiguous sectors of the disk. Define by a dyad <first block location, length >. Allocation Methods
  • 3. 3 LINKED ALLOCATION Each file is a linked list of disk blocks, scattered anywhere on the disk. At file creation time, simply tell the directory about the file. When writing, get a free block and write to it, enqueueing it to the file header. There's no external fragmentation since each request is for one block. Method can only be effectively used for sequential files. Allocation Methods
  • 4. 4 LINKED ALLOCATION Pointers use up space in each block. Reliability is not high because any loss of a pointer loses the rest of the file. A File Allocation Table is a variation of this. It uses a separate disk area to hold the links. This method doesn't use space in data blocks. Many pointers may remain in memory. A FAT file system is used by MS-DOS. Allocation Methods
  • 5. 5 INDEXED ALLOCATION • Each file uses an index block on disk to contain addresses of other disk blocks used by the file. • When the i th block is written, the address of a free block is placed at the i th position in the index block. • Method suffers from wasted space since, for small files, most of the index block is wasted. What is the optimum size of an index block? • If the index block is too small, we can: a) Link several together b) Use a multilevel index • UNIX keeps 12 pointers to blocks in its header. If a file is longer than this, then it uses pointers to single, double, and triple level index blocks. Allocation Methods
  • 6. 6 PERFORMANCE ISSUES FOR THESE METHODS It's difficult to compare mechanisms because usage is different. Let's calculate, for each method, the number of disk accesses to read block i from a file: contiguous: 1 access from location start + i. linked: i + 1 accesses, reading each block in turn. (is this a fair example?) index: 2 accesses, 1 for index, 1 for data. Allocation Methods