Operating SystemComputer Science & Information Technology

What is Page Fault?

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.

What is File Allocation Methods and its types?

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:

  1. Contiguous allocation
  2. Linked allocation
  3. Indexed allocation

Contiguous Allocation

  • Each file is allocated a set of contiguous disk blocks.
  • The contiguous allocation method requires each file to occupy a set of contiguous blocks on the disk.

Linked Allocation

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.

Indexed Allocation

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.

Since, FAT needs to be cached, therefore it is impossible to have this many space in cache.

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.

<< Previous | Next >>
Must Read: What is an operating system and its types?

 

Dear Aspirants,
Your preparation for GATE, ESE, PSUs, and AE/JE is now smarter than ever — thanks to the MADE EASY YouTube channel.
This is not just a channel, but a complete strategy for success, where you get toppers strategies, PYQ–GTQ discussions, current affairs updates, and important job-related information, all delivered by the country’s best teachers and industry experts.
If you also want to stay one step ahead in the race to success, subscribe to MADE EASY on YouTube and stay connected with us on social media.
MADE EASY — where preparation happens with confidence.

MADE EASY

MADE EASY is a well-organized institute, complete in all aspects, and provides quality guidance for both written and personality tests. MADE EASY has produced top-ranked students in ESE, GATE, and various public sector exams. The publishing team regularly writes exam-related blogs based on conversations with the faculty, helping students prepare effectively for their exams.

Leave a Reply

Your email address will not be published. Required fields are marked *