Reference no: EM132128957
SEGMENTATION
Assume virtual memory hardware that uses segmentation, and divides the address space in two by using the top bit of the virtual address. Each segment is thus relocated independently. What we'll be drawing in this question is what physical memory looks given some different parameters. We'll also label where a particular memory reference ends up.
For all questions, assume a virtual address space of size 16 bytes and a physical memory of size 64 bytes. Thus, if we had a virtual address space placed in physical memory, it might look like this (with spaces between every 8 physical bytes):
0000FFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFF1111
In this example, the segment 0 base register is 0, segment 1 base is 64 (it grows backwards), and both length registers are 4. 0's are used to record where segment is in memory; 1's are for segment 1; F means free.
(a) What would physical memory look like if we had the following values instead? (Draw a picture below) seg0 (base): 12 seg0 (limit): 6 seg1 (base): 10 seg1 (limit): 3
(b) In your picture above, CIRCLE which byte of memory is accessed when the process generates a byte load of virtual address 4 (or DRAW AN X on the physical-memory address if the access is illegal)
(c) What would physical memory look like if we had the following values instead? (Draw a picture below) seg0 (base): 40 seg0 (limit): 4 seg1 (base): 50 seg1 (limit): 4
(d)In your picture above, CIRCLE which byte of memory is accessed when the process generates a byte load of virtual address 14 (or DRAW AN X on the physical-memory address if the access is illegal)
(e) In your picture above, CIRCLE which byte of memory is accessed when the process generates a byte load of virtual address 4 (or DRAW AN X on the physical-memory address if the access is illegal)