• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 321
  • Last Modified:

segmentation

I have a segment table below and a code the following.. my question is where is 240 in physical memory?
segment    base        bounds    RW
0               4000          6FF         10
1                 0              4FF         11
2               3000          FFF         11
3               -----          --------      00
 
 
240:   li a0, 1108
244:   jal foo
248:   .......

Open in new window

0
kuntilanak
Asked:
kuntilanak
  • 3
  • 2
1 Solution
 
Infinity08Commented:
Most likely in the code segment, if your architecture has one.
0
 
kuntilanakAuthor Commented:
but it's impossible to determine the exact physical address based on the segmentation table given above?
0
 
Infinity08Commented:
Depends on the platform and on the way you obtained the 240 address. If it's a relative address, then you need to know to which segment it belongs (the code segment). If it's an absolute address, then you already know the absolute address.

BUT : the absolute address is not necessarily a physical address. On most platforms, a process is assigned a virtual address space (starting at virtual address 0), which is mapped to a physical address space by the OS as needed.
0
 
kuntilanakAuthor Commented:
how do you know which segment if belongs to? and how do you know it's the code segment
0
 
Infinity08Commented:
That depends on the platform :) Check your platform documentation.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now