Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

7. Virtual Memory (10 points) Assume an architecture allows each of its processe

ID: 3736181 • Letter: 7

Question

7. Virtual Memory (10 points) Assume an architecture allows each of its processes to divided in pages of size IKB. However, there are only 512MB of physical memory available. Also note that multiple programs may be in use at once process maintains its own page table, which is stored in memory, and every virtual page is in use. Show all calculations whenever needed. access IGB of virtual memory (o) (3 points) List two advatages of wsing virtual memory. Explain the purpose of using a page table. (b) (2 points) What is a page fault? How is it handled? (e) (5 points) How many bits are neded for each of the following i. Complete virtual address? ii. Complete physical address? ii. Page offset? iv. Virtual page number (VPN)? v. Physical page number (PPN)?

Explanation / Answer

1)Advantages of Virtual memory::-The size of program can be more than the size of main memory still we can run that program by using the concept of virtual memory.we can reduce the internal farmentation using segmented paging and eiminates external fragmentation.

Purpose of Page tabe:-The number of entries in the page table is equal to the number of pages for that process and every process will maintain 1 page table and each pagetable entry will contain frame number and some valid and invalid bit and dirty bit etc.so when ever a cpu generates logical address we can divide into page number and page offset.so in logical address we will take out the page number and by using page number we can get into the page table and take out frame number and we will add page offset to that frame number and finally we will get physical address of coresponding cpu generated logical address.

Page fault:- the address generated by cpu is called as logical address and it can be divided into pagenumber and page offset by using pagenumber we can get into page table and we will see for that page number if no entry is available in that page table then that leads to pagefault that means the cpu wants to access a particular page that is not present in main memory then that is called as page fault in such case we will refer to secondary memory and get back that page back to main memory.

C)Physical address space=512MB (29 bits in physical address)==>Divided into (framenumber)+(frame offset)

(19) (10)

Logical address space=1GB (30 bits in logical address) ===>Divided into (Pagenumber)+(page offset)

(20) (10)

Page Size=1KB (10 bits in pages offset)

virtual page number(bits)=20 bits

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote