search
Log In
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
0 votes
37 views
Using a page size of 4 bytes and a physical memory of 32 bytes (8
pages)! we show how the user's view of memory can be mapped into physical
memory. Logical address 0 is page O! offset O. Indexing into the page table! we
find that page 0 is in frame 5. Thus! logical address 0 maps to physical address
20 (= (5 x 4) + 0). Logical address 3 (page 0, offset 3) maps to physical address
23 (= (5 x 4) + 3). Logical address 4 is page 1, offset 0; according to the page
table, page 1 is mapped to frame 6. Thus, logical address 4 maps to physical
address 24 (= (6 x 4) + 0).

This is from Galvin please xpln
in Operating System 7 points 37 views

1 Answer

1 vote
633 points
1

@afroze

 

Size of the page table However, the part of the process which is being executed by the CPU must be present in the main memory during that time period...

The page table must also be present in the main memory all the time because it has the entry for all the pages. The size of the page table depends upon the number of entries in the table and the bytes stored in one entry....

 

Let's consider, Logical Address = 24 bits

Logical Address space = 2 ^ 24 bytes Let's say,

Page size = 4 KB = 2 ^ 12 Bytes

Page offset = 12

Number of bits in a page = Logical Address - Page Offset = 24 - 12 = 12 bits

Number of pages = 2 ^ 12 = 2 X 2 X 10 ^ 10 = 4 KB Let's say,

Page table entry = 1 Byte Therefore, the size of the page table = 4 KB X 1 Byte = 4 KB

 

1. http://www.uobabylon.edu.iq/eprints/publication_3_28232_1410.pdf  

 

2. https://gateoverflow.in/490/gate-cse-2008-question-67  

 

3. https://gateoverflow.in/490/gate-cse-2008-question-67?show=4124#a4124  

 

4. https://www.cs.utexas.edu/~lorenzo/corsi/cs372/06F/hw/3sol.html 

0
Thnx for answering u clrd my many doubts.

it means

 if offset=5 then a page has 32 offset values 0-31 isn't it?
0

@afroze

If offset=5 then a page has 32 offset values 0-31 ...

it isn't ...

 

https://gateoverflow.in/3478/gate-it-2007-question-43 

 

https://gateoverflow.in/765/gate-cse-2005-question-72

...