{"id":6353,"date":"2025-11-04T10:31:35","date_gmt":"2025-11-04T05:01:35","guid":{"rendered":"https:\/\/study.madeeasy.in\/?p=6353"},"modified":"2025-11-13T12:03:15","modified_gmt":"2025-11-13T06:33:15","slug":"file-allocation-methods","status":"publish","type":"post","link":"https:\/\/www.madeeasy.in\/study\/cs-it\/file-allocation-methods","title":{"rendered":"FILE ALLOCATION METHODS"},"content":{"rendered":"<p style=\"text-align: justify;\">The main problem is how to allocate space to a file so that disk space is utilized effectively and file can be accessed quickly. There are three major methods of allocating disk space:<\/p>\n<p style=\"text-align: justify;\">1. Contiguous allocation<br \/>\n2. Linked allocation<br \/>\n3. Indexed allocation<\/p>\n<p style=\"text-align: justify;\">Other methods are<br \/>\n4. Clustering<br \/>\n5. FAT<br \/>\n6. Linked indexed allocation<br \/>\n7. Multilevel indexed allocation<br \/>\n8. Inode<\/p>\n<p style=\"text-align: justify;\"><strong>Contiguous Allocation<\/strong><\/p>\n<ul style=\"text-align: justify;\">\n<li>Each file is allocated a set of contiguous disk blocks.<\/li>\n<li>The contiguous allocation method requires each file to occupy a set of contiguous blocks on the disk.<\/li>\n<li>Disk addresses define a linear ordering on the disk. With this ordering, accessing block b + 1 after block b normally requires no head movement.<\/li>\n<li>Contiguous allocation of a file is defined by the disk address of the first block and length (in block units).<\/li>\n<li>If the file is n blocks long, and starts at location b, then it occupies blocks b, b + 1, b + 2,.. b + n \u20131<\/li>\n<li>For sequential access:\u00a0seek to b and read and read next.<\/li>\n<li>For direct access:\u00a0if we want block i of a file that starts at block b, seek to block b + i and read.<\/li>\n<li>The directory entry for each file indicates the address of the starting block and the length of the area allocated for this file.<\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><strong> What happens if we want to allocate more blocks to a file?<\/strong><\/p>\n<p>We could copy the file to a space that would allow growth. If we allocate a maximum blocks to allow growth, we waste blocks. Some operating systems use a modified contiguous allocation scheme.<\/p>\n<ul>\n<li style=\"text-align: justify;\">A chunk of contiguous space is allocated initially.<\/li>\n<li style=\"text-align: justify;\">When that isn\u2019t enough, another chunk of contiguous space is allocated<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>The main problem is how to allocate space to a file so that disk space is utilized effectively and file<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,94],"tags":[],"class_list":["post-6353","post","type-post","status-publish","format-standard","hentry","category-cs-it","category-operating-system"],"_links":{"self":[{"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/posts\/6353","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/comments?post=6353"}],"version-history":[{"count":0,"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/posts\/6353\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/media?parent=6353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/categories?post=6353"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/tags?post=6353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}