Understanding Virtual Address and Segment Offset
18 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

The hardware uses the top two bits of the virtual address to determine the ______ register to use

segment

The bottom 12 bits of the virtual address serve as the ______ into the segment

offset

By adding the base register to the offset, the hardware calculates the final ______ address

physical

If the offset is greater than or equal to the bounds of the segment, a ______ fault is raised

<p>protection</p> Signup and view all the answers

The SEG_MASK value would be set to ______

<p>0x3000</p> Signup and view all the answers

The OFFSET_MASK value would be set to ______

<p>0xFFF</p> Signup and view all the answers

What is the highest legal virtual address in segment 0?

<p>511</p> Signup and view all the answers

What about the lowest legal virtual address in segment 1?

<p>512</p> Signup and view all the answers

What are the lowest and highest illegal addresses in this entire address space?

<p>0, 1023</p> Signup and view all the answers

Finally, how would you run segmentation.py with the -A flag to test if you are right?

<p>0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15</p> Signup and view all the answers

What base and bounds would you set up so as to get the simulator to generate the following translation results for the specified address stream: valid, valid, violation,..., violation, valid, valid?

<p>--b0 ?, --l0 ?, --b1 ?, --l1 ?</p> Signup and view all the answers

How should you configure the simulator to generate roughly 90% of valid virtual addresses?

<p>Set the parameters accordingly</p> Signup and view all the answers

The hardware uses segment registers during ______.

<p>translation</p> Signup and view all the answers

One common approach is to chop up the address space into segments based on the top few bits of the virtual ______.

<p>address</p> Signup and view all the answers

If we use the top two bits of our 14-bit virtual address to select the segment, our virtual address looks like this: 13 12 11 10 9 ______.

<p>Segment</p> Signup and view all the answers

If the top two bits are 00, the hardware knows the virtual address is in the ______ segment.

<p>code</p> Signup and view all the answers

If the top two bits are 01, the hardware knows the address is in the ______.

<p>heap</p> Signup and view all the answers

The hardware knows the address is in the heap, and thus uses the heap base and ______.

<p>bounds</p> Signup and view all the answers

More Like This

Use Quizgecko on...
Browser
Browser