Linked Allocation
•   Also known as chained allocation

• Each block contains pointer to next link in the

    chain

• Reallocation is possible, it is more common to

    allocate blocks as needed


                                                    1
                    http://raj-os.blogspot.in/      1
Linked Allocation


• Each file is stored as a linked list of disk blocks
   – the disk blocks may be anywhere on the disk

• Any free block can be added to a chain




                                                        2
                       http://raj-os.blogspot.in/       2
Linked Allocation


• Simple – need only starting address
• Free-space management system – no waste of
  space
• No random access
• No external fragmentation




                                              3
                 http://raj-os.blogspot.in/   3
Linked Allocation

• To select an individual block of a file requires

  tracing through the chain to the desired block

• The file allocation table needs a single entry for each

  file showing starting block and length of the file




                                                        4
                       http://raj-os.blogspot.in/       4
Linked Allocation




   http://raj-os.blogspot.in/   5
Linked Allocation Advantages

• It is simple

• Solves the problems with contiguous allocation
   – the space allocation problem


• No disk compaction is required
  -because of non contiguous nature of allocation, the linking
  does not produce any external fragmentation


                                                                 6
                        http://raj-os.blogspot.in/               6
Linked Allocation Disadvantages

• Slow
     to find out nth block of a file we must start at the
  beginning of that file space requirements for pointers


• Not reliable
     disk blocks are linked by pointers, a single damaged
  pointer can make thousands of disk blocks inaccessible




                                                            7
                         http://raj-os.blogspot.in/         7
Linked Allocation Disadvantages

• Slow
     to find out nth block of a file we must start at the
  beginning of that file space requirements for pointers


• Not reliable
     disk blocks are linked by pointers, a single damaged
  pointer can make thousands of disk blocks inaccessible




                                                            8
                         http://raj-os.blogspot.in/         8

Linked allocation 48

  • 1.
    Linked Allocation • Also known as chained allocation • Each block contains pointer to next link in the chain • Reallocation is possible, it is more common to allocate blocks as needed 1 http://raj-os.blogspot.in/ 1
  • 2.
    Linked Allocation • Eachfile is stored as a linked list of disk blocks – the disk blocks may be anywhere on the disk • Any free block can be added to a chain 2 http://raj-os.blogspot.in/ 2
  • 3.
    Linked Allocation • Simple– need only starting address • Free-space management system – no waste of space • No random access • No external fragmentation 3 http://raj-os.blogspot.in/ 3
  • 4.
    Linked Allocation • Toselect an individual block of a file requires tracing through the chain to the desired block • The file allocation table needs a single entry for each file showing starting block and length of the file 4 http://raj-os.blogspot.in/ 4
  • 5.
    Linked Allocation http://raj-os.blogspot.in/ 5
  • 6.
    Linked Allocation Advantages •It is simple • Solves the problems with contiguous allocation – the space allocation problem • No disk compaction is required -because of non contiguous nature of allocation, the linking does not produce any external fragmentation 6 http://raj-os.blogspot.in/ 6
  • 7.
    Linked Allocation Disadvantages •Slow to find out nth block of a file we must start at the beginning of that file space requirements for pointers • Not reliable disk blocks are linked by pointers, a single damaged pointer can make thousands of disk blocks inaccessible 7 http://raj-os.blogspot.in/ 7
  • 8.
    Linked Allocation Disadvantages •Slow to find out nth block of a file we must start at the beginning of that file space requirements for pointers • Not reliable disk blocks are linked by pointers, a single damaged pointer can make thousands of disk blocks inaccessible 8 http://raj-os.blogspot.in/ 8