Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  Page fault occurs whena)When a requested page... Start Learning for Free
Page fault occurs when
  • a)
    When a requested page is in memory
  • b)
    When a requested page is not in memory
  • c)
    When a page is currupted
  • d)
    When an exception is thrown
Correct answer is option 'B'. Can you explain this answer?
Verified Answer
Page fault occurs whena)When a requested page is in memoryb)When a req...
Page fault occurs when a requested page is mapped in virtual address space but not present in memory.
View all questions of this test
Most Upvoted Answer
Page fault occurs whena)When a requested page is in memoryb)When a req...
Page fault occurs when a requested page is not in memory

Page fault is a type of exception that occurs when a program requests a page from memory that is not currently present. It happens when the memory management unit (MMU) tries to access a page that has been mapped into the virtual address space of a process but is not present in physical memory.

Explanation:

When a program is executed, it is loaded into the main memory (RAM) for execution. The operating system divides the program into fixed-size units called pages. These pages are then mapped into the virtual address space of the process. The virtual address space is a range of memory addresses that a process can use for its execution.

When a program tries to access a memory location, the MMU translates the virtual address into a physical address and checks if the corresponding page is present in physical memory. If the page is not present, a page fault occurs.

Causes of Page Fault:
- Demand Paging: In demand paging, pages are loaded into memory only when they are needed. If a requested page is not in memory, a page fault occurs.
- Page Replacement: When the physical memory becomes full and a new page needs to be brought in, the operating system selects a page to be replaced. If the page to be replaced is dirty (modified), it needs to be written back to the disk before bringing in the new page. This process also results in a page fault.
- Copy-on-Write: In copy-on-write mechanism, when a process forks, the parent and child processes share the same memory pages. If either process modifies a shared page, a copy of that page is created, and a page fault occurs.

Handling Page Fault:
When a page fault occurs, the operating system needs to handle it. The steps involved in handling a page fault are as follows:
1. The operating system receives a page fault interrupt.
2. It checks the page table to find the location of the requested page.
3. If the page is not in memory, it triggers a page replacement algorithm to make space for the new page.
4. The required page is then loaded from the disk into the free frame in memory.
5. The page table is updated to reflect the new mapping.
6. Finally, the program is restarted from the instruction that caused the page fault.

In summary, a page fault occurs when a requested page is not in memory. It is a mechanism used by the operating system to handle memory management efficiently and provide virtual memory to processes.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Page fault occurs whena)When a requested page is in memoryb)When a requested page is not in memoryc)When a page is curruptedd)When an exception is thrownCorrect answer is option 'B'. Can you explain this answer?
Question Description
Page fault occurs whena)When a requested page is in memoryb)When a requested page is not in memoryc)When a page is curruptedd)When an exception is thrownCorrect answer is option 'B'. Can you explain this answer? for Computer Science Engineering (CSE) 2025 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about Page fault occurs whena)When a requested page is in memoryb)When a requested page is not in memoryc)When a page is curruptedd)When an exception is thrownCorrect answer is option 'B'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2025 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Page fault occurs whena)When a requested page is in memoryb)When a requested page is not in memoryc)When a page is curruptedd)When an exception is thrownCorrect answer is option 'B'. Can you explain this answer?.
Solutions for Page fault occurs whena)When a requested page is in memoryb)When a requested page is not in memoryc)When a page is curruptedd)When an exception is thrownCorrect answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of Page fault occurs whena)When a requested page is in memoryb)When a requested page is not in memoryc)When a page is curruptedd)When an exception is thrownCorrect answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Page fault occurs whena)When a requested page is in memoryb)When a requested page is not in memoryc)When a page is curruptedd)When an exception is thrownCorrect answer is option 'B'. Can you explain this answer?, a detailed solution for Page fault occurs whena)When a requested page is in memoryb)When a requested page is not in memoryc)When a page is curruptedd)When an exception is thrownCorrect answer is option 'B'. Can you explain this answer? has been provided alongside types of Page fault occurs whena)When a requested page is in memoryb)When a requested page is not in memoryc)When a page is curruptedd)When an exception is thrownCorrect answer is option 'B'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Page fault occurs whena)When a requested page is in memoryb)When a requested page is not in memoryc)When a page is curruptedd)When an exception is thrownCorrect answer is option 'B'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev