Consider the given segment map table with segment base addresses and lengths: Segment Base...
Qualcomm technical mcq question, verified with a worked answer. Free to practise - no sign-up.
Consider the given segment map table with segment base addresses and lengths:
| Segment | Base | Length |
|---|---|---|
| 0 | 90 | 600 |
| 1 | 1992 | 14 |
| 2 | 569 | 256 |
| 3 | 2669 | 123 |
| 4 | 912 | 569 |
Given logical addresses: (0, 430), (1, 236), (2, 200), (4, 100). Which request is invalid?
Show answer & explanation
In segmented memory addressing, a logical address (segment, offset) is valid only if the offset is within the segment's allocated length. For (1, 236): segment 1 has length 14, but offset 236 exceeds this limit (236 > 14), causing a segmentation fault. All other addresses have offsets within their segment bounds.
Step-by-step Derivation:
Validation rule: For logical address (segment_id, offset), the address is valid if offset < segment_length.
• (0, 430): Segment 0 has length 600. Check: 430 < 600 ✓ VALID
• (1, 236): Segment 1 has length 14. Check: 236 < 14 ✗ INVALID (236 exceeds 14)
• (2, 200): Segment 2 has length 256. Check: 200 < 256 ✓ VALID
• (4, 100): Segment 4 has length 569. Check: 100 < 569 ✓ VALID
The invalid request is (1, 236) because the offset 236 exceeds the segment 1 length of 14.