{"id":396,"date":"2024-06-28T13:08:06","date_gmt":"2024-06-28T13:08:06","guid":{"rendered":"https:\/\/study.madeeasy.in\/?p=396"},"modified":"2025-07-16T14:44:41","modified_gmt":"2025-07-16T09:14:41","slug":"what-is-page-fault-in-os-operating-system","status":"publish","type":"post","link":"https:\/\/www.madeeasy.in\/study\/cs-it\/operating-system\/what-is-page-fault-in-os-operating-system","title":{"rendered":"What is Page Fault?"},"content":{"rendered":"\r\n<p style=\"text-align: justify;\">Each page table entry has a valid bit, it indicates whether the corresponding page is currently in memory. If the page is not in memory, a page fault has occurred and the control is trapped to the OS. During address translation, if valid\/invalid bit in page table entry is 0, a page fault has occurred.<\/p>\r\n<h2 style=\"text-align: justify;\"><span lang=\"EN\">What is File Allocation Methods and its types?<\/span><\/h2>\r\n<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>\r\n<ol style=\"text-align: justify;\">\r\n<li>Contiguous allocation<\/li>\r\n<li>Linked allocation<\/li>\r\n<li>Indexed allocation<\/li>\r\n<\/ol>\r\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_79_1 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.madeeasy.in\/study\/cs-it\/operating-system\/what-is-page-fault-in-os-operating-system\/#Contiguous-Allocation\" >Contiguous Allocation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.madeeasy.in\/study\/cs-it\/operating-system\/what-is-page-fault-in-os-operating-system\/#Linked-Allocation\" >Linked Allocation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.madeeasy.in\/study\/cs-it\/operating-system\/what-is-page-fault-in-os-operating-system\/#Indexed-Allocation\" >Indexed Allocation<\/a><\/li><\/ul><\/nav><\/div>\n<h3 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Contiguous-Allocation\"><\/span>Contiguous Allocation<span class=\"ez-toc-section-end\"><\/span><\/h3>\r\n<ul style=\"text-align: justify;\">\r\n<li>Each file is allocated a set of contiguous disk blocks.<\/li>\r\n<li>The contiguous allocation method requires each file to occupy a set of contiguous blocks on the disk.<\/li>\r\n<\/ul>\r\n<h3 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Linked-Allocation\"><\/span>Linked Allocation<span class=\"ez-toc-section-end\"><\/span><\/h3>\r\n<p style=\"text-align: justify;\">Linked allocation solves all problems of contiguous allocation. Each file is a linked list of disk blocks. The disk blocks may be scattered anywhere on the disk. Each disk block has a pointer to the next disk block in the file as well as some file data.<\/p>\r\n<h3 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Indexed-Allocation\"><\/span>Indexed Allocation<span class=\"ez-toc-section-end\"><\/span><\/h3>\r\n<p style=\"text-align: justify;\">FAT tries to solve as many problems as possible but has its own drawback. The more the number of blocks, the mor will be the size of FAT. Hence, more space needs to be allocated to FAT.<\/p>\r\n<p style=\"text-align: justify;\">Since, FAT needs to be cached, therefore it is impossible to have this many space in cache.<\/p>\r\n<p style=\"text-align: justify;\">Instead of maintaining a FAT of all the disk pointers, indexed allocation scheme stores all the disk pointers in one of the blocks called as indexed block or node. Index nodes does not hold data, but it holds pointers to all the disk blocks allocated to that particular file. Directory entry only contains index node address.<\/p>\r\n\r\n\r\n\r\n<p style=\"text-align: center;\"><a class=\"btn btn-danger\" role=\"button\" href=\"https:\/\/study.madeeasy.in\/cs-it\/operating-system\/what-is-paging-in-os-operating-system\/\" target=\"_blank\" rel=\"noopener\">&lt;&lt; Previous<\/a> | <a class=\"btn btn-success\" role=\"button\" href=\"https:\/\/study.madeeasy.in\/cs-it\/operating-system\/what-is-i-o-system-in-operating-system\/\" target=\"_blank\" rel=\"noopener\"> Next &gt;&gt;<\/a> <br \/><strong> Must Read: <\/strong> <a href=\"https:\/\/study.madeeasy.in\/subjects\/what-is-an-operating-system-and-its-types\/\" target=\"_blank\" rel=\"noopener\"><strong>What is an operating system and its types?<\/strong><\/a><\/p>\r\n<p>&nbsp;<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>Each page table entry has a valid bit, it indicates whether the corresponding page is currently in memory. If the<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[94,3],"tags":[115,116],"class_list":["post-396","post","type-post","status-publish","format-standard","hentry","category-operating-system","category-cs-it","tag-file-allocation-methods","tag-what-is-page-fault"],"_links":{"self":[{"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/posts\/396","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=396"}],"version-history":[{"count":0,"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/posts\/396\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/media?parent=396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/categories?post=396"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/tags?post=396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}