in Operating System
292 views
0 votes
0 votes

can somebody please explain solution to this question?

in Operating System
292 views

2 Answers

3 votes
3 votes
Best answer

Hope it's clear now.for the part 3)..the (1,265)..segment 1, cell 265..is it possible ?..total cells in segment 1 is 211...and the query is for a cell that is not even present in segment 1..hence it will be a Trap situation .

selected by
by

2 Comments

thank u
1
1
Welcome :)
0
0
1 vote
1 vote
Segmentation is a flat address conversion mechanism used to map logical address for each segment to physical address space of underlying memory system.These segments may correspond to logical entities like code,stack,heaps etc and for convenience of programmer using these logical entities -he may treat entire system as his own starting from memory addr 0 to some MAX value allocated to that segment, but that addr. has to be converted to actual physical address when accessing that location so that is done using segment table (which has base value - the starting address of that segment in physical memory and limit -the range of memory allocated to that segment) Notice that since it is flat addressing the whole chunk of contigous memory is allocated .
So for given logical address (a,b) which corresponds to (seg.no,offset in that segment) convert it to an addr. location using the table as :- base + offset .
However an additional check needs to be made by OS to ensure that a segment does not illegally access other segments using any arbitrary values for offset so to assert this
base < =  (base + offset )  < =   (base + limit )    should be ensured

2 Comments

thank u
1
1
u r welcome :-)
0
0