Contiguous
Allocation
1
Contiguous Allocation of Disk Space
Linked Allocation
File-Allocation Table (DOS, others)
•Section of disk at
start of partition
•Table with one entry
per disk block
•Indexed by block#
•Each entry contains
link to next block
•Special code for
EOF
•“0” means empty
block
Indexed Allocation
 Brings all pointers (for one file) together into an
index block.
 Supports both sequential and random access
• (Index into table, pointer to block)
 Wasteful for small files (use entire block for index)
• But no external fragmentation
 Logical view.
index table
Example of Indexed Allocation
Indexed Allocation – Multilevel Index
(Supports very large file size)

outer-index
index table file
Combined Scheme: UNIX inode
(Example with 4K bytes per block)
1212
linklink
Size:blocks, bytes
One inode table
per partition
64 bytes per inode
Directory entries
point to inode
Link count
Direct index
supports 48k file
Double indirect
supports huge
files (>4 GB)
Maximum File Size with inodes
 Assume 12 direct blocks, 4K blocks, 4 byte block
pointer
 Estimate maximum addressable up to the double
indirect blocks:
• Direct blocks (12) 48k
• Single indirect (4096/4=1024 ptrs to blocks) 4096k
• Double indirect (1024 of these) 4194304k
• Total 4198448k
• (> 4 GB)
 Didn’t even use triple indirect!
File Access With Unix inodes
 “Superblock” and
other structures
not shown
 “root” directory is
inode #2
 Directories contain
pointers to inodes
 Access path
shown to
/usr/bin/wc
 Notice 8 disk
accesses to get
first block of wc!
inodes
(root)
root
directory
usr
directory
bin
directory
wc
(file)
Data blocks
usr
bin
wc
#2
0
n
In-Memory File System Structures Re-Visited:
(Unix Case)
Opening
A file
Reading
A file
inode
Copy of
inode
Pointer to
Memory copy
Of inode
Free-Space Management
 Bit vector (n blocks)
…
0 1 2 n-1
bit[i] =

1 ⇒ block[i] free
0 ⇒ block[i] occupied
To find a free block: find the first non-zero
word, locate first 1-bit.
Block number (of first free block) is:
umber of bits per word) * (number of 0-value words) + offset of first 1
Bit Vector (Cont.)
 Bit map requires extra space. Example:
block size = 212
bytes
disk size = 230
bytes (1 gigabyte)
n = 230
/212
= 218
bits (or 32K bytes)
 Easy to get contiguous files
• Just look for consecutive 1’s in bit map
Linked List of Free Space on Disk
Free List Approach
 Linked list
• Hard to find contiguous space easily
• But no waste of space
 Grouping
• Store addresses of n free blocks in the first block
• Last of these addresses is to a block that contains
addresses of another n free blocks
• So many free blocks can be found at one time
 Counting
• Clusters of contiguous free blocks recorded together
• Keep list of first block address, count of contiguous
free ones

More Related Content

PPTX
Free Space Management, Efficiency & Performance, Recovery and NFS
PDF
File implementation
PPT
Chapter 11 - File System Implementation
PPT
PDF
ITFT_File system interface in Operating System
PPTX
File system implementation
PPT
PDF
10 File System
Free Space Management, Efficiency & Performance, Recovery and NFS
File implementation
Chapter 11 - File System Implementation
ITFT_File system interface in Operating System
File system implementation
10 File System

What's hot (19)

PPTX
File System Implementation
ODP
NTFS and Inode
PPTX
File System and File allocation tables
PPT
Op Sy 03 Ch 41
PDF
Operating Systems - Implementing File Systems
PDF
File management
PPTX
Examining Linux File Structures
PPTX
Linux and windows file system
PPTX
File System Interface
PPTX
Ch11 file system implementation
PPT
Free space managment46
PPTX
File system Os
PDF
File
PPT
Chapter 06
PPT
PPTX
File management
PPT
Ch12 OS
 
PPT
Xfs file system for linux
PPTX
file system in operating system
File System Implementation
NTFS and Inode
File System and File allocation tables
Op Sy 03 Ch 41
Operating Systems - Implementing File Systems
File management
Examining Linux File Structures
Linux and windows file system
File System Interface
Ch11 file system implementation
Free space managment46
File system Os
File
Chapter 06
File management
Ch12 OS
 
Xfs file system for linux
file system in operating system
Ad

Viewers also liked (20)

PPT
Index allocation 48 1
PPT
Allocation methods continuous method.47
PPTX
Allocation Methods-R.D.Sivakumar
PPT
Allocation Method
PPT
Linked allocation 48
PPT
File system
PPTX
memory allocation methods
PPT
Chapter 11
ODP
Continguous Memory Allocator in the Linux Kernel
PPT
Memory management early_systems
PPT
File system
PPTX
PPT
Scan scheduling 50 1
PPT
C scan scheduling 50 2
PPT
C look scheduling 51 1
PPT
Look scheduling.51
PPT
Sstf scheduling.50
PPT
Chapter 8 - Main Memory
PPT
Fcfs scheduling
PPT
Chapter 10 - File System Interface
Index allocation 48 1
Allocation methods continuous method.47
Allocation Methods-R.D.Sivakumar
Allocation Method
Linked allocation 48
File system
memory allocation methods
Chapter 11
Continguous Memory Allocator in the Linux Kernel
Memory management early_systems
File system
Scan scheduling 50 1
C scan scheduling 50 2
C look scheduling 51 1
Look scheduling.51
Sstf scheduling.50
Chapter 8 - Main Memory
Fcfs scheduling
Chapter 10 - File System Interface
Ad

Similar to Contigious (20)

PDF
Ch11 file system implementation
PPTX
Allocation and free space management
PPT
Internal representation of files ppt
PPT
Files Allocation.ppt
PPT
Operating systems presentation part 1 2025
PPT
file management_part2_os_notes.ppt
PPTX
File System Implementation.pptx
PDF
Internal representation of file chapter 4 Sowmya Jyothi
PPTX
osd - co1 session7.pptx
PPT
chapter5-file system implementation.ppt
PPT
Unix file systems 2 in unix internal systems
PPTX
Operating System File System IMpl lecture19.pptx
PPTX
OS Unit5.pptx
PPT
Unit 4 File Management System.ppt (File Services)
PPT
File Management.ppt
PDF
oslectureset7.pdf
PPTX
Allocation methods (1).pptx
PDF
Ch12_OS_Lecture 4.pdf
PDF
Unit ivos - file systems
Ch11 file system implementation
Allocation and free space management
Internal representation of files ppt
Files Allocation.ppt
Operating systems presentation part 1 2025
file management_part2_os_notes.ppt
File System Implementation.pptx
Internal representation of file chapter 4 Sowmya Jyothi
osd - co1 session7.pptx
chapter5-file system implementation.ppt
Unix file systems 2 in unix internal systems
Operating System File System IMpl lecture19.pptx
OS Unit5.pptx
Unit 4 File Management System.ppt (File Services)
File Management.ppt
oslectureset7.pdf
Allocation methods (1).pptx
Ch12_OS_Lecture 4.pdf
Unit ivos - file systems

More from Ramasubbu .P (20)

PPT
PPT
PPT
Milling 2
PPT
MIlling 1
PPT
Drillings
PPT
Holding
PPT
Saftey
PPT
Harvesting
PPT
Plough
PPT
Tractor PTO
PPT
Tractor Components
PPT
PPT
PPT
PPT
PPT
Hacker
PPT
Denail of Service
PPT
RAID CONCEPT
PPT
Network Security
PPT
Milling 2
MIlling 1
Drillings
Holding
Saftey
Harvesting
Plough
Tractor PTO
Tractor Components
Hacker
Denail of Service
RAID CONCEPT
Network Security

Recently uploaded (20)

PDF
Environmental Education MCQ BD2EE - Share Source.pdf
PDF
What if we spent less time fighting change, and more time building what’s rig...
PPTX
Virtual and Augmented Reality in Current Scenario
PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
PDF
My India Quiz Book_20210205121199924.pdf
PDF
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
PDF
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
PDF
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
PDF
Journal of Dental Science - UDMY (2021).pdf
PPTX
Core Concepts of Personalized Learning and Virtual Learning Environments
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PPTX
Computer Architecture Input Output Memory.pptx
PDF
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
PPTX
Module on health assessment of CHN. pptx
PDF
LIFE & LIVING TRILOGY - PART (3) REALITY & MYSTERY.pdf
PPTX
Education and Perspectives of Education.pptx
PDF
Hazard Identification & Risk Assessment .pdf
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PDF
LEARNERS WITH ADDITIONAL NEEDS ProfEd Topic
Environmental Education MCQ BD2EE - Share Source.pdf
What if we spent less time fighting change, and more time building what’s rig...
Virtual and Augmented Reality in Current Scenario
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
My India Quiz Book_20210205121199924.pdf
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
Journal of Dental Science - UDMY (2021).pdf
Core Concepts of Personalized Learning and Virtual Learning Environments
Paper A Mock Exam 9_ Attempt review.pdf.
Computer Architecture Input Output Memory.pptx
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
Module on health assessment of CHN. pptx
LIFE & LIVING TRILOGY - PART (3) REALITY & MYSTERY.pdf
Education and Perspectives of Education.pptx
Hazard Identification & Risk Assessment .pdf
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
LEARNERS WITH ADDITIONAL NEEDS ProfEd Topic

Contigious

  • 4. File-Allocation Table (DOS, others) •Section of disk at start of partition •Table with one entry per disk block •Indexed by block# •Each entry contains link to next block •Special code for EOF •“0” means empty block
  • 5. Indexed Allocation  Brings all pointers (for one file) together into an index block.  Supports both sequential and random access • (Index into table, pointer to block)  Wasteful for small files (use entire block for index) • But no external fragmentation  Logical view. index table
  • 6. Example of Indexed Allocation
  • 7. Indexed Allocation – Multilevel Index (Supports very large file size)  outer-index index table file
  • 8. Combined Scheme: UNIX inode (Example with 4K bytes per block) 1212 linklink Size:blocks, bytes One inode table per partition 64 bytes per inode Directory entries point to inode Link count Direct index supports 48k file Double indirect supports huge files (>4 GB)
  • 9. Maximum File Size with inodes  Assume 12 direct blocks, 4K blocks, 4 byte block pointer  Estimate maximum addressable up to the double indirect blocks: • Direct blocks (12) 48k • Single indirect (4096/4=1024 ptrs to blocks) 4096k • Double indirect (1024 of these) 4194304k • Total 4198448k • (> 4 GB)  Didn’t even use triple indirect!
  • 10. File Access With Unix inodes  “Superblock” and other structures not shown  “root” directory is inode #2  Directories contain pointers to inodes  Access path shown to /usr/bin/wc  Notice 8 disk accesses to get first block of wc! inodes (root) root directory usr directory bin directory wc (file) Data blocks usr bin wc #2 0 n
  • 11. In-Memory File System Structures Re-Visited: (Unix Case) Opening A file Reading A file inode Copy of inode Pointer to Memory copy Of inode
  • 12. Free-Space Management  Bit vector (n blocks) … 0 1 2 n-1 bit[i] =  1 ⇒ block[i] free 0 ⇒ block[i] occupied To find a free block: find the first non-zero word, locate first 1-bit. Block number (of first free block) is: umber of bits per word) * (number of 0-value words) + offset of first 1
  • 13. Bit Vector (Cont.)  Bit map requires extra space. Example: block size = 212 bytes disk size = 230 bytes (1 gigabyte) n = 230 /212 = 218 bits (or 32K bytes)  Easy to get contiguous files • Just look for consecutive 1’s in bit map
  • 14. Linked List of Free Space on Disk
  • 15. Free List Approach  Linked list • Hard to find contiguous space easily • But no waste of space  Grouping • Store addresses of n free blocks in the first block • Last of these addresses is to a block that contains addresses of another n free blocks • So many free blocks can be found at one time  Counting • Clusters of contiguous free blocks recorded together • Keep list of first block address, count of contiguous free ones