ALL > Computer and Education > courses > university courses > undergraduate courses > Operating System > zstu-(2021-2022)-1 >
homework 10 PATIENCE FERO 2019529628044 Version 0
👤 Author: by feropatienceoutlookcom 2021-12-29 04:52:36
 

Question:

Given your own example for segment table and logical  addresses, calculate the physical addresses

Problem:
A simple segmentation system has the following segment table


Starting Address                             Length(bytes)
660  -   -      -     -     -     -     -     -       248
1752  -   -      -     -     -     -     -     -        422
222  - -   -      -     -     -     -     -     -       198
996   -   -      -     -     -     -     -     -       504
Determine the physical address for the following logical addresses: indicate segment faults.


Answer:
First, you have to check if(offset<segment limit)for the problem. If it is, add offset + base address for the physical address. if it is not a segment fault will occur

a)(0,198) we will check 198< 248.which is true so we will calculate Physical address=660+198=858

b)(2,156) we will check 156< 198,which is true so we will calculate Physical address =222+ 156= 378.

c)(1,530) we will check 530* 422.which is false so segment fault occur

d)(3,444) we will check 444<604.which is true so we will calculate Physical address = 996+ 444= 1440

e)(0,222) we will check 222< 248,which is true so we will calculate Physical address =660+ 222=882

Please login to reply. Login

Reversion History

Loading...
No reversions found.