Chapter 11 File System Implementation
Exercise 11.1 Consider a file system that uses a modified contiguous-allocation scheme with support for extents. A file is a collection of extents, with each extent corresponding to a contiguous set of blocks. A key issue in such systems is the degree of variability in the size of extents. What are the advantages and disadvantages of the following schemes?
Exercise 11.1.a All extents are of the same size, and the size is predetermined.
Answer 11.1.a If all extents are of the same size, and the size is predetermined, then it simplifies the block allocation scheme. A simple bit map for extents would suffice.  Simple
Exercise 11.1.b b. Extents can be of any size and are allocated dynamically.
Answer 11.1.b If extents can be of any size and dynamically allocated, then more complex allocation schemes are required.  It might be difficult to find an extent of the appropriate size  external fragmentation. Very complex
Exercise 11.1.c c. Extents can be a few fixed sizes, and these are predetermined.
Answer 11.1.c If  the extents can be of a few fixed sizes, and these sizes are predetermined, the we would need to maintain a separate bit map for each possible size.  This scheme is of intermediate difficulty and flexibility
Exercise 11.4 Some file systems allow disk storage to be allocated at different levels of granularity. For instance, a file system could allocate 4 KB of disk space as a single 4-KB block or as eight 512-byte blocks.  How could we take advantage of this flexibility to improve performance?  What modifications would have to be made to the free-space management scheme in order to support this feature?
Answer 11.4 For example, if a file is 5 KB then it would be allocated a 4-KB block and two contiguous 512-byte blocks.  What will this block allocation scheme help decrease?
Answer 11.4 cont. Modification are required. We should maintain: a bitmap of free blocks an extra state regarding which of the sub blocks are currently being used inside a block.  Therefore, the allocator would have to examine that extra state to allocate sub blocks and coalesce the sub blocks to obtain the larger block when all of the sub blocks are free.
Exercise 11.6 Consider a file system on a disk that has both logical and physical block sizes of 512 bytes. Assume that the information about each file is already in memory. For each of the three allocation strategies (contiguous, linked, and indexed), answer these question:
Exercise 11.6.a How is the logical-to-physical address mapping accomplished in this system? For indexed allocation, assume that a file is always less than 512 blocks long.
Answer 11.6.a The CPU will generate a logical address L and we need to convert it to a physical address P P is a disk address represented by a block number and an offset Assume the following S is the starting block B is the block O is the offset
Answer 11.6.a (Contiguous) Contiguous allocation: B = L / 512 O = L modulus 512 Physical block number = S + B O is the offset into that block So: S + B + O = physical address
Answer 11.6.a (Linked) Linked allocation: B = L / 511 O = L modulus 511 Follow the linked list for (B+1) blocks (O+1) should be the offset into the last physical block
Answer 11.6.a (Indexed) Indexed allocation: B = L / 512 O = L modulus 512 At the beginning, we need to load the index block from disk The physical address is stored at in the index block B. O is the offset into the physical block pointed to by index block B.
Exercise 11.6.b b. If we are currently at logical block 10 (the last block accessed was block 10) and want to access logical block 4, how many physical blocks must be read from the disk?
Answer 11.6.b Contiguous: 1 physical block  Linked: 4 physical blocks  Indexed: 2 physical blocks

More Related Content

DOCX
Copy and save a configuration file from a router or switch using a laptop
PPT
Contigious
PPT
File system
PPT
Linked allocation 48
PPT
Index allocation 48 1
PPT
Allocation methods continuous method.47
PDF
File organisation
PPT
File organisation
Copy and save a configuration file from a router or switch using a laptop
Contigious
File system
Linked allocation 48
Index allocation 48 1
Allocation methods continuous method.47
File organisation
File organisation

Viewers also liked (8)

PPT
CCNA Discovery 4 - Chapter 1
PPTX
File Organization
PDF
Router and Switches Cisco
PDF
CCNAv5 - S4: Chapter 1 Hierarchical Network Design
PPTX
CCNA 1 Routing and Switching v5.0 Chapter 11
PPTX
CCNA 1 Routing and Switching v5.0 Chapter 4
PPTX
File management
PPTX
Operating Systems - File Management
CCNA Discovery 4 - Chapter 1
File Organization
Router and Switches Cisco
CCNAv5 - S4: Chapter 1 Hierarchical Network Design
CCNA 1 Routing and Switching v5.0 Chapter 11
CCNA 1 Routing and Switching v5.0 Chapter 4
File management
Operating Systems - File Management
Ad

Similar to Chapter 11 (20)

PPT
Operating systems presentation part 1 2025
PPT
11.file system implementation
PPT
Chapter 11 - File System Implementation
PDF
File implementation
PPT
File Allocation Methods.ppt
PDF
Operating%20 system iii_201
PDF
Filesystem
PPT
PPT
file management_part2_os_notes.ppt
PDF
Ch12_OS_Lecture 5.pdf
PPT
chapter5-file system implementation.ppt
PDF
Lect09
PPTX
Ch11 file system implementation
PDF
Ch11 file system implementation
PPTX
File System and File allocation tables
PDF
lecture 8 b main memory
PPTX
Lecture 5 memory management in operating systems.pptx
PPTX
HW29kkkkkkkkkkkkkkkkkkkmmmmkkmmkkk454.pptx
PPT
Unit 4_ Memory Management Memory ManagementMemory ManagementMemory Management...
PPT
Os7
Operating systems presentation part 1 2025
11.file system implementation
Chapter 11 - File System Implementation
File implementation
File Allocation Methods.ppt
Operating%20 system iii_201
Filesystem
file management_part2_os_notes.ppt
Ch12_OS_Lecture 5.pdf
chapter5-file system implementation.ppt
Lect09
Ch11 file system implementation
Ch11 file system implementation
File System and File allocation tables
lecture 8 b main memory
Lecture 5 memory management in operating systems.pptx
HW29kkkkkkkkkkkkkkkkkkkmmmmkkmmkkk454.pptx
Unit 4_ Memory Management Memory ManagementMemory ManagementMemory Management...
Os7
Ad

Recently uploaded (20)

PDF
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
STKI Israel Market Study 2025 version august
PPTX
Modernising the Digital Integration Hub
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PPTX
Microsoft Excel 365/2024 Beginner's training
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
A proposed approach for plagiarism detection in Myanmar Unicode text
PDF
Comparative analysis of machine learning models for fake news detection in so...
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PPTX
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
PDF
A review of recent deep learning applications in wood surface defect identifi...
PPTX
Configure Apache Mutual Authentication
PPTX
The various Industrial Revolutions .pptx
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PDF
Zenith AI: Advanced Artificial Intelligence
PPTX
2018-HIPAA-Renewal-Training for executives
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
Consumable AI The What, Why & How for Small Teams.pdf
Custom Battery Pack Design Considerations for Performance and Safety
STKI Israel Market Study 2025 version august
Modernising the Digital Integration Hub
The influence of sentiment analysis in enhancing early warning system model f...
Microsoft Excel 365/2024 Beginner's training
Module 1.ppt Iot fundamentals and Architecture
A proposed approach for plagiarism detection in Myanmar Unicode text
Comparative analysis of machine learning models for fake news detection in so...
Convolutional neural network based encoder-decoder for efficient real-time ob...
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
A review of recent deep learning applications in wood surface defect identifi...
Configure Apache Mutual Authentication
The various Industrial Revolutions .pptx
sbt 2.0: go big (Scala Days 2025 edition)
Zenith AI: Advanced Artificial Intelligence
2018-HIPAA-Renewal-Training for executives

Chapter 11

  • 1. Chapter 11 File System Implementation
  • 2. Exercise 11.1 Consider a file system that uses a modified contiguous-allocation scheme with support for extents. A file is a collection of extents, with each extent corresponding to a contiguous set of blocks. A key issue in such systems is the degree of variability in the size of extents. What are the advantages and disadvantages of the following schemes?
  • 3. Exercise 11.1.a All extents are of the same size, and the size is predetermined.
  • 4. Answer 11.1.a If all extents are of the same size, and the size is predetermined, then it simplifies the block allocation scheme. A simple bit map for extents would suffice. Simple
  • 5. Exercise 11.1.b b. Extents can be of any size and are allocated dynamically.
  • 6. Answer 11.1.b If extents can be of any size and dynamically allocated, then more complex allocation schemes are required. It might be difficult to find an extent of the appropriate size external fragmentation. Very complex
  • 7. Exercise 11.1.c c. Extents can be a few fixed sizes, and these are predetermined.
  • 8. Answer 11.1.c If the extents can be of a few fixed sizes, and these sizes are predetermined, the we would need to maintain a separate bit map for each possible size. This scheme is of intermediate difficulty and flexibility
  • 9. Exercise 11.4 Some file systems allow disk storage to be allocated at different levels of granularity. For instance, a file system could allocate 4 KB of disk space as a single 4-KB block or as eight 512-byte blocks. How could we take advantage of this flexibility to improve performance? What modifications would have to be made to the free-space management scheme in order to support this feature?
  • 10. Answer 11.4 For example, if a file is 5 KB then it would be allocated a 4-KB block and two contiguous 512-byte blocks. What will this block allocation scheme help decrease?
  • 11. Answer 11.4 cont. Modification are required. We should maintain: a bitmap of free blocks an extra state regarding which of the sub blocks are currently being used inside a block. Therefore, the allocator would have to examine that extra state to allocate sub blocks and coalesce the sub blocks to obtain the larger block when all of the sub blocks are free.
  • 12. Exercise 11.6 Consider a file system on a disk that has both logical and physical block sizes of 512 bytes. Assume that the information about each file is already in memory. For each of the three allocation strategies (contiguous, linked, and indexed), answer these question:
  • 13. Exercise 11.6.a How is the logical-to-physical address mapping accomplished in this system? For indexed allocation, assume that a file is always less than 512 blocks long.
  • 14. Answer 11.6.a The CPU will generate a logical address L and we need to convert it to a physical address P P is a disk address represented by a block number and an offset Assume the following S is the starting block B is the block O is the offset
  • 15. Answer 11.6.a (Contiguous) Contiguous allocation: B = L / 512 O = L modulus 512 Physical block number = S + B O is the offset into that block So: S + B + O = physical address
  • 16. Answer 11.6.a (Linked) Linked allocation: B = L / 511 O = L modulus 511 Follow the linked list for (B+1) blocks (O+1) should be the offset into the last physical block
  • 17. Answer 11.6.a (Indexed) Indexed allocation: B = L / 512 O = L modulus 512 At the beginning, we need to load the index block from disk The physical address is stored at in the index block B. O is the offset into the physical block pointed to by index block B.
  • 18. Exercise 11.6.b b. If we are currently at logical block 10 (the last block accessed was block 10) and want to access logical block 4, how many physical blocks must be read from the disk?
  • 19. Answer 11.6.b Contiguous: 1 physical block Linked: 4 physical blocks Indexed: 2 physical blocks