Linked Allocation

Linked  Allocation  :

  •  Each  file  is  a  linked-list  of  disk-blocks.
  •  The  disk-blocks  may  be  scattered  anywhere  on  the  disk.    
  •  The  directory  contains  a  pointer  to  the  first  to  the   first and  the last  blocks  of  the  file.
  •  To  create  a  new  file, just create  a  new  entry  in  the  directory:

                   1) A   write   to  the  file  causes  a  free block to  be  found. This  new  block  is  then written  to  and linked  to  the                          end  of  file. 

                    2) A  read   to  the  file  causes  moving  the  pointers  from  block  to  block.

Advantages  of   Linked  Allocation  :

  •  There  is  no  external  fragmentation  and  in  these  free block  on  the  free-space  list can  be used  to  satisfy   a  request.
  •  The  size  of  the  file  doesn't  need  to  be  declared  on  creation.
  •  There  is  no  necessary  to  compact  disk-free.

Disadvantages  of  Linked  Allocation  :

  •  It  can  be  used  effectively  only  for  sequential-access  files.
  •  There is  need  of  space that  is  required  for  the  pointers.
  •  There  is  problems  of  reliability i.e  if  the pointer  is  lost.

           

Posted on by