in Operating System edited by
1,268 views
0 votes
0 votes

Question: Consider a system using  a segmented paging architecture. The segment is divided into 8k pages each of size 2k words . The segment table is divided into 256 k pages each of size 512 words. The page table entry size requires 64 bits . The frame number requires 22 bits then calculate logical address (LA). Note: 1 Word = 1 Byte

Options Are:

 

         A. 51 bits
         B. 61 bits
         C. 33 bits
         D. 64 bits  

 

in Operating System edited by
1.3k views

4 Comments

"The frame number requires 22 bits" what does it mean?
0
0

@Ritik tiwari

To address each frame uniquely, we require 22 bits. Lets say the computer system contains 8 frames, then to address these 8 frames(23 frames) uniquely, we need just 3 bits(ceil(log28)) as follows:

Frame 0 – 000

Frame 1 – 001

Frame 2 – 010

Frame 3 – 011

Frame 4 – 100

Frame 5 – 101

Frame 6 – 110

Frame 7 – 111

Similarly, if the system contains 222 frames, we need 22 bits to uniquely identify each frame.

1
1

 

Hii @palashbehra5        

For finding segment no in your answer why you are taking physical address space it should be logical address space.since virtual address is divides into fragments.please correct me if i’m wrong ??

@girish13++

0
0

1 Answer

5 votes
5 votes

Correct Answer : (A) 51 bits

This question is using both segmented paging and paged segmentation. 

Segmented Paging – Perform paging on each segment as the segment size may be too large, i.e. offset within the segment is divided into two parts ==> page identity and page offset.

Paged Segmentation – Perform paging on segment table as the segment table size may be too large, i.e. segment identity is divided into two parts ==> page identity and page offset.

Now, lets look at how the logical address will look in each case differently:

Now, in the question we are given following:

  • “The segment is divided into 8k pages each of size 2k words” – This refers to Segmented Paging.
  • “The segment table is divided into 256 k pages each of size 512 words” – This refers to Paged Segmentation.

Now, we are given that each segment is divided into 8K pages, so page identity(P2) = 13 and size of each page is 2K words, so offset within page(d2) = 11

Also, we are given that segment table is divided into 256K pages, so page identity(P1) = 18 and size of each page is 512 words, so offset within page(d1) = 9

Now, the structure of Logical address will look as follows:

1 comment

Why is offset in page segmentation 9 bits ? Shouldn't it be no of segment table entries in a page ?
0
0