Question on Logical Address & Physical Address | Operating System - M05 P10

Question on Logical Address & Physical Address | Operating System - M05 P10

ยท

3 min read

This is a multipart blog article series, and in this series I am going to explain you the concepts of operating system. This article series is divided into multiple modules and this is the fifth module which consists of 26 articles.

In this article we will see a question on logical address and physical address space and try to gain better understanding on this topic.

Question: We have given LAS = 4 GB, PAS = 64 MB, Page size = 4 KB, and we have to find number of process, number of frames, number of entries in page table, size if page table. (LAS = logical address space) the memory is byte addressable.

Answer: Logical address = 22 x 230 = 232 The logical address is of 32 bits.

4 KB = 22 x 210 = 212

The page size is of 12 bits and total size of page table is 32 bits

Therefore, No of pages = 232 โ€“ 212 = 220

PA = 26 x 220 = 226 bits

Size of physical address = 26 bits

We know that frame offset = page offset

Therefore, frame offset = 4 KB = 22 x 210 = 212

Number of frames = 214

Number of entries in page table = Number of pages in a process

Therefore number of entries in page table = 220

Size of page table = 220 x 14 bits (To represent one frame 16 bits are required and there are 220 entries in page table therefore the size of page table will be 220 x 14)

So this was a question based on logical address and physical address space. Hope you liked it and learned something new from it.

If you have any doubt, question, quires related to this topic or just want to share something with me, than please feel free to contact me.

๐Ÿ“ฑ Contact Me

Twitter, LinkedIn, Telegram, Instagram,

๐Ÿ“ง Write a mail

rahulmishra102000@gmail.com

GitHub, HackerRank