Virtual Memory

Question 2. Consider a system where the virtual memory page size is 1KB (1024 bytes), and main memory consists of 4 page frames, which are empty initially. Now consider a process, which requires 8 pages of storage. At some point during its execution, the page table is as shown below:
Virtual page # |
Physical page # |
Valid Flag |
0 |
No |
|
1 |
No |
|
2 |
2 |
Yes |
3 |
3 |
Yes |
4 |
No |
|
5 |
No |
|
6 |
0 |
Yes |
7 |
1 |
Yes |
1. List the virtual address ranges that will result in a page fault.
2. Give the following ordered references to the virtual addresses (i) 4500, (ii) 8000, (iii) 3000, (iv) 1100, please calculate the main memory (physical) addresses. If there is a page fault, please use LRU based page replacement to replace the page. How which page will be affected and compute the physical addresses after the page fault. We assume the reference string is … 2 4 7 3 0 4 3 0 7 5 0 7 6 0 2 3 6 4 7 6 3 2 before the new reference.
Question 3. Given a computer system with the following paging based addressing for virtual addresses. Please answer the following questions:
2 bits |
5 bits |
5 bits |
5 bits |
7 bits |
1. What is the size of the virtual address space?
2. What is the page size?
3. What is the maximum number of pages for a process?
4. Given the system has a TLB hit ratio of 99% and page fault rate of 1%. Please formulate the effective memory access time.
