search
Log In
1 vote
112 views
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.
in Operating System 112 views

2 Answers

0 votes
$\underline{\textbf{Answer:}\Rightarrow}$

$\underline{\textbf{Explanation:}\Rightarrow}$

Assume $\mathbf k$ instructions:

$\mathbf{k-1}$ instructions execution without page fault $ = 1 \times (\mathrm k-1) \;\text{nsec}$

$1$ instruction with page fault $ = (1+n) \times 1\;\text{nsec}$

$\therefore $ Average is given by the formula $ = {(1\times (\mathrm k-1) + 10 +n) \times 1)}{k}\; \mathbf{ =1 + \dfrac{n}{k} \;\text{nsec}}$

edited by
1
It should be 1 instead of 10... i think.
1
your answer need correction bro
0
0

Thanks 

0 votes

Answer:

Assume k instructions:

k−1 instructions execution without page fault =(k−1)nsec

1 instruction with page fault =(1+n)nsec

∴Average is given by the formula =(k−1+1+n) / k=1+n/nsec

Related questions

0 votes
0 answers
1
79 views
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.
asked Oct 26, 2019 in Operating System Lakshman Patel RJIT 79 views
0 votes
0 answers
2
107 views
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.
asked Oct 26, 2019 in Operating System Lakshman Patel RJIT 107 views
0 votes
0 answers
3
183 views
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$
asked Oct 26, 2019 in Operating System Lakshman Patel RJIT 183 views
0 votes
0 answers
4
...