Hello i am studying for my operating system programming exam, we been provided with a sample exam but no answers have been given.
i answered this question but not sure if i am right, it would be much appreciated if you could check if i am right and if i am wrong could you explain how to get the right answer.
Consider a virtual memory system with the following parameters:
- 32-bit virtual address
- 4-kbyte virtual page size
- 32-bit page table entry (PTE)
- 2-gbyte physical memory
(a) draw a diagram of the 32-bit address showing the length and placement of all bit fields i.e. the offset in the page(O), and the page number(P).
page number | offset
32-bit virtual address
PPPPPPPPPPPPPPPPPPPP|OOOOOOOOOOOO(b) how many virtual pages are available in this system?
2^20 = 1 048 576 virtual pages
(c) how many physical frames are available in this system?
2^12 = 4096*2028 = 8 306 688 physical frames
(d) name TWO fields of the page table entry.
- page frame number
- valid bit(set if page is in memory)
- other flags: modified(dirty), referenced, protection bits
any help would be appreciated