# Recent questions tagged page-fault

1
The total number of page faults for the reference string $1,2,3,4,5,6,7,8,9,10$ using FIFO page replacement policy for a process, if $3$ frames are allocated to it are $9$ $10$ $8$ $11$
2
Consider the following page reference string. $1\ 2\ 3\ 4\ 2\ 1\ 5\ 6\ 2\ 1\ 2\ 3\ 7\ 6\ 3\ 2\ 1\ 2\ 3\ 6\$ What are the minimum number of frames required to get a single page fault for the above sequence assuming LRU replacement strategy? $7$ $4$ $6$ $5$
3
Write a program that simulates a toy paging system that uses the $\text{WSClock}$ algorithm. The system is a toy in that we will assume there are no write references (not very realistic), and process termination and creation are ignored (eternal life). The ... per $1000$ memory references. Explain what is needed to extend the program to handle a page reference stream that also includes writes.
4
Write a program that simulates a paging system using the aging algorithm. The number of page frames is a parameter. The sequence of page references should be read from a file. For a given input file, plot the number of page faults per $1000$ memory references as a function of the number of page frames available.
5
We consider a program which has the two segments shown below consisting of instructions in segment $0,$ and read/write data in segment $1.$ Segment $0$ has read/execute protection, and segment $1$ has just read/write protection. The memory system is a demand- paged virtual memory system ... $16$ Fetch from segment $1,$ page $4,$ offset $28$ Jump to location in segment $1,$ page $3,$ offset $32$
6
A machine-language instruction to load a $32-bit$ word into a register contains the $32-bit$ address of the word to be loaded. What is the maximum number of page faults this instruction can cause?
7
It has been observed that the number of instructions executed between page faults is directly proportional to the number of page frames allocated to a program. If the available memory is doubled, the mean interval between page faults is also doubled. Suppose that a normal instruction ... which time it gets $15,000$ page faults, how long would it take to run if twice as much memory were available?
8
You have been hired by a cloud computing company that deploys thousands of servers at each of its data centers. They have recently heard that it would be worthwhile to handle a page fault at server A by reading the page from the RAM memory of some other server rather than its local disk drive. How could that be done? Under what conditions would the approach be worthwhile? Be feasible?
9
If an instruction takes $1\: nsec$ and a page fault takes an additional $n\: nsec,$ give a formula for the effective instruction time if page faults occur every $k$ instructions.
10
To calculate EMAT in case of page fault we used: EMAT= page fault rate*(page fault service time) + (1-page fault rate)*(memory access time) My doubt is: In case of NO PAGE FAULT, why we considered only one memory access time . Why not two memory ... , You considered (VA -> PA time) + memory access time. Then why not we consider address translation time in questions involving only pagefault?
11
Consider a system using demand paging architecture it takes $3ms.$ to service page fault if either empty frame is available or replaced page is not to be modified takes $10ms.$ if replaced page is modified. Main Memory access time is $1ms.$ and page to be replaced ... $60$% of time. The maximum acceptable page fault rate to get effective memory access time not more than $4ms.$ is_________(%)
12
13
Consider the following page reference string: $7, 2, 3, 1, 2, 5, 3, 4, 6, 7, 7, 1, 0, 5, 4, 6, 2, 3, 0 , 1.$ Assuming demand paging with three frames, how many page faults would occur for the following replacement algorithms ? $•$ $LRU$ $replacement$ $•$ $FIFO$ $replacement$ $•$ $Optimal$ $replacement$
14
When a page fault occurs, the process requesting the page must block while waiting for the page to be brought from disk into physical memory. Assume that there exists a process with five user-level threads and that the mapping of user threads to kernel threads is one to ... be affected by the page fault-that is, would they also have to wait for the faulting page to be brought into memory? Explain.
15
Assume that we have a demand-paged memory. The page table is held in registers. It takes $8$ milliseconds to service a page fault if an empty frame is available or if the replaced page is not modified and $20$ milliseconds if the replaced page is modified. ... percent of the time. What is the maximum acceptable page-fault rate for an effective access time of no more than $200$ nanoseconds ?
16
Suppose: TLB lookup time = 20 ns TLB hit ratio = 80% Memory access time = 75 ns Swap page time = 500,000 ns 50% of pages are dirty OS uses a single level page table What is the effective access time (EAT) if we assume the page fault rate is 10%? Assume the cost toupdate the TLB, the page table, and the frame table (if needed) is negligible.
17
Consider the $2$ dimensional array $A$: int A[][]=new int[100][100]; where $A[0][0]$ is at location $800$ in a paged memory system with pages of size $800 bytes$ ... the process and other $2$ are initially empty? for (int i=0;i<100;i++) for (int j=0;j<100; j++) A[j][i]=1;
1 vote
18
For page fault Some where I see EMAT=page fault (page fault service time) +(1-page fault)(memory access time) BUT somewhere it's like EMAT=page fault (page fault service time + memory access time) +(1-page fault)(memory access time) Which one is correct and why this difference?
19
Page fault rate = p Main memory access time = m Page fault service time = PS EMAT = (1-p) (m) + (p) (PS + m) OR EMAT = (1-p) (m) + (p) (PS) which one is right ...if page fault occurs should we consider [ Page fault service time + MM ] OR [ Page fault service time only ]
20
21
In Page Fault and Demand Paging concept what is the difference between Effective Memory access time and average memory access time? The formulae are known but i am confused with the concept.
22
I studied from book william stalling ,it was written there if we increase the size of page then pagefault first increases and then when pagesize become size of process then pagefault decreases. Can someone explain with an example why this happens?
23
1 vote
24
Consider the following extract from a program, written in a C-like language, that computes the transpose of a matrix. for (i=0; i<N; i++) for (j=0; j<N; j++) B[i,j]=A[i,j]; $A$ and $B$ are $N \times N$ matrices with floating point entries that are ... bytes Each of $A$ and $B$ is stored starting from the beginning of a page None of the pages allocated to $A$ and $B$ are initially in memory.
25
https://gateoverflow.in/2122/gate2011-20-ugcnet-june2013-ii-48 in the solution why memory access is not considered along with page fault service time when a page fault occurs? Because after page fault the page has to be brought into the memory which needs memory access
1 vote
26
Consider a demand paged memory system, page table is held in registers. It takes 800 nsec to service a page fault if empty page is available or replaced page is not modified and 950 nsec if the replaced page is modified, main memory access time is 120 nsec. If page to be replaced is modified 85% of time and page faultrate is 20% then average memory access time is ________. (Upto 1 decimal place)
27
I have read that EMAT when the page fault occurs is =p(PS+MA)+(1-p)(MA) p is the probability of page fault i-p is the probability that page is present in Main Memory PS is the Page fault service time MA is the memory access time but according to me first it should check that page ... MM which is going to take one Memory access So,EMAT should be equals=p(MA+PS+MA)+(1-p)(MA+MA). why it is not so??