Paging and segmentation
Paging and segmentation are similar, but different.
Let’s compare the two by answering some questions:
1. Here’s an instruction that we want to execute
Copyright By PowCoder代写 加微信 powcoder
· movl 21, %eax
· Assuming that the PCB has been set up for the translation (the process has values for segment registers with segmentation, or the process has a linear page table set up for linear paging), how many memory accesses are necessary for each to complete a translation?
· Answer this question in two different ways:
· Relatively (segmentation has fewer or more than linear paging).
· Absolutely (segmentation is exactly , linear paging is exactly ).
1. How much memory does each of segmentation and paging actually require? Similar to the last question, answer this in two different ways:
· Relatively (segmentation requires more or less memory than paging).
· Absolutely (segmentation requires approximately , paging requires approximately )
· Think in terms of “registers” and “page table entries”.
1. In terms of segmentation and paging:
· What responsibilities does an OS have?
· What responsibilities does the hardware have?
· What responsibilities does a user program have?
1. What kind of features are enabled by each of paging and segmentation? For example, can you do “code sharing” with paging in the same way that we could with segmentation? What features of segmentation were required to do that? Do page table entries have similar features?
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com