307 views
0 votes
0 votes
Small doubt,
We know that, when a page fault(required page is missing in main memory) occurs, the respective process will be blocked (Process is removed from Main memory. Does the page table of this process is removed from main memory?? If so, once the page which was not present earlier in main memory, and process has to execute again for that the required page is loaded into main memory?Once this page is present in main memory, the page table entry for this will have valid bit set to 1. To execute process, again Page Table has to be loaded back.(If it is removed once a process is blocked). Is my understanding correct? Please help me

1 Answer

1 votes
1 votes

When a process is blocked, it is not removed from the memory. It is in a blocked state waiting for I/O completion interrupt. The CPU, meanwhile, is assigned to some other process from the ready queue.

The page table is stored as part of the PCB. Since, the process is not removed so the page table stays, but gets updated.

As to when a process does get removed from memory? When it is swapped out by the middle term scheduler.

http://www.cs.uni.edu/~fienup/cs240f03/lectures/OS_virtual_memory.htm

Related questions

2 votes
2 votes
0 answers
1
gatejr asked Jun 10, 2016
768 views
Consider, 2 level paging , with Process P, Inner page table PTi, and outer page table PTo.Now we know that P and PTi are divided in various pages but PTo is in 1 page on...