Click here to Skip to main content
15,888,733 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Now, let’s see if we understand this tiny address space we’ve constructed (using the parameters from the question above). What is
the highest legal virtual address in segment 0? What about the lowest legal virtual address in segment 1? What are the lowest and
highest illegal addresses in this entire address space? Finally, how
would you run segmentation.py with the -A flag to test if you
are right?


very unsure, of this of operation systm

What I have tried:

I am self learinng runing that question online very unsure
What is
the highest legal virtual address in segment 0?

(decimal 4692)

 What about the lowest legal virtual address in segment 1? 

4,442

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

4693

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

I am unsure. 

 

to understand the offset for the negative growing address 1k base it 1024  (grows negative) : 0x00001254 (decimal 4692)

 

~/ostep-homework/vm-segmentation/ (master) $ ./segmentation.py -c

ARG seed 0

ARG address space size 1k

ARG phys mem size 16k

 

Segment register information:

 

  Segment 0 base  (grows positive) : 0x00001aea (decimal 6890)

  Segment 0 limit                  : 472

 

  Segment 1 base  (grows negative) : 0x00001254 (decimal 4692)

  Segment 1 limit                  : 450

 

Virtual Address Trace

  VA  0: 0x0000020b (decimal:  523) --> SEGMENTATION VIOLATION (SEG1)

  VA  1: 0x0000019e (decimal:  414) --> VALID in SEG0: 0x00001c88 (decimal: 7304)

  VA  2: 0x00000322 (decimal:  802) --> VALID in SEG1: 0x00001176 (decimal: 4470)

  VA  3: 0x00000136 (decimal:  310) --> VALID in SEG0: 0x00001c20 (decimal: 7200)

  VA  4: 0x000001e8 (decimal:  488) --> SEGMENTATION VIOLATION (SEG0)

bash: segmentation.py: command not found
~/ostep-homework/vm-segmentation/ (master) $ ./segmentation.py -A 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
ARG seed 0
ARG address space size 1k
ARG phys mem size 16k

Segment register information:

  Segment 0 base  (grows positive) : 0x00001aea (decimal 6890)
  Segment 0 limit                  : 472

  Segment 1 base  (grows negative) : 0x00001254 (decimal 4692)
  Segment 1 limit                  : 450

Virtual Address Trace
  VA  0: 0x00000000 (decimal:    0) --> PA or segmentation violation?
Traceback (most recent call last):
  File "./segmentation.py", line 143, in <module>
    vaddr = int(vstr)
ValueError: invalid literal for int() with base 10: '
Posted
Updated 6-Oct-22 5:35am
Comments
Richard MacCutchan 6-Oct-22 5:22am    
There is considerable information missing here. You need to consult your course notes for the answer.

1 solution

Nobody can answer this for you. Every question is entirely dependent on your course material, which we don't have, nor want.
 
Share this answer
 
Comments
Lissette Velec 8-Oct-22 12:06pm    
what course I am not student. Very CLEAR I stated, plus you can not make statments of other if they want or not want to answer.
Dave Kreskowiak 8-Oct-22 13:53pm    
Let's be real here. NOBODY EVER asks these questions outside of an educational environment.

And again, your questions are not answerable using the very limited information you provided.
Lissette Velec 8-Oct-22 13:59pm    
yes there are many people asking questions out side of academically, you dont need to be enroll in a system to learn out side of it. stop barking its not the end of the world in the end its not problem good luck

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900