How to Determine Physical Addresses from Logical Addresses in Segmentation?

  • Thread starter whitehorsey
  • Start date
In summary, the segmentation table gives the base length for each segment and by adding the logical address to the base length, you can get the physical address. The length is used as an indicator for validity based on the maximum size of the segment.
  • #1
whitehorsey
192
0
1. Given a segmentation table:
Segment Base Length
0 100 200
1 123 75
2 50 150
3 21 14

What are the physical addresses for the following logical addresses (indicate if it's invalid)?
a. (0, 120)
b. (1, 700)
c. (2, 150)

3. a. 120 + 100 = 220
b. Invalid
c. 50 + 150 = 200 Is this valid because it's equal to the size?

So, by adding these numbers we get the physical address? Could you also explain length (like why is it use as an indicator for whether it is invalid or not)?
 
Physics news on Phys.org
  • #2
Yes, by adding the logical address to the base length you can get the physical address. The length is used as an indicator for validity because it represents the maximum size of the segment. If a logical address is larger than the length, then it is invalid because it cannot be mapped to a physical address.
 

FAQ: How to Determine Physical Addresses from Logical Addresses in Segmentation?

What is segmentation logical address?

Segmentation logical address is a type of memory addressing scheme used by a computer system to manage and access data in memory. It divides the memory into segments and assigns a unique logical address to each segment, making it easier for the system to retrieve and manipulate data.

How does segmentation logical address differ from other memory addressing schemes?

Unlike other memory addressing schemes, such as linear and hierarchical addressing, segmentation logical address allows for non-contiguous memory allocation. This means that a program can be split into multiple segments and stored in different locations in memory, making more efficient use of available memory space.

What is the purpose of using segmentation logical address?

The main purpose of using segmentation logical address is to provide a more flexible and efficient way of managing memory. It allows for larger programs to be run on a system with limited memory and also enables the sharing of memory between multiple programs.

How does the system determine the physical address from a segmentation logical address?

The system uses a segment table, which contains the starting address and size of each segment, to determine the physical address from a segmentation logical address. The segment table is maintained by the operating system and is used to translate the logical address to a physical address when needed.

What are the potential drawbacks of using segmentation logical address?

One potential drawback is the added complexity in managing memory. The system needs to keep track of the segment table and perform additional calculations to translate logical addresses to physical addresses. Additionally, if not properly managed, fragmentation can occur, leading to wasted memory space and decreased performance.

Similar threads

Replies
14
Views
4K
Replies
7
Views
3K
Replies
3
Views
1K
Replies
21
Views
2K
Replies
3
Views
7K
Replies
19
Views
35K
Back
Top