6,448 views
7 votes
7 votes

Using the page table shown below, translate the physical address 25 to virtual address. The address length is 16 bits and page size is 2048 words while the size of the physical memory is four frames.

 
Page      Present (1-ln, 0-0ut)            Frame
0                   1                                        3
1                   1                                        2
2                   1                                        0
3                   0                                        –
 
  1. 25
  2. 6169
  3. 2073
  4. 4121

3 Answers

Best answer
26 votes
26 votes

Virtual Address is given=16 bit

Physical Address= 4(physical frame) *2048=13 bit

No of pages= 2^16/2048= 2^5

Physical Address 25 =  0000000011001 (binary in 13 bit)

in which 2 bit are represent frame no and 11 bit are word i.e 00 00000011001

in given table 00 frame is mapped in page no 2

page no 2 is represented by 00010 (b/c total pages is 32)

Now convert 25 physical address(13 bit) to virtual address(16 bit) is

00010 00000011001 (16 bit)=4121

selected by
9 votes
9 votes

PA BITS=13 AS(4 FRAMES =>2BIT,,,,,2048 WORDS=>11BIT)

REPRESENT PHYSICAL ADDRESS 25 IN BINARY HAVING 13 BITHAT IS

00 00000011001 

FIRST 2 BITS ARE FRAME NUMBER=FRAME # 0.

NOW IT PAGE TABLE FRAME #  0 CORRESPONDS TO PAGE  # 2...

AND 2 IN BINARY =00010(TAKEN 5 BIT COZ LA IS 16 BIT:IN WHICH 11 BIT IS FOR WORD SO 5 BIT FOR PAGE)

THEREFORE THE BINARY REPRESENTATION :

00010  00000011001 =4096+25=4121

0 votes
0 votes

Physical address: 

Frame No.(a) Frame Offset (b)

Virtual Address:

Page No. (c) Page Offset (b)

Page offset (b) = 11

 

Physical Address = 25 = 0000 0000 0001 1001

 

Virtual Address: ......000 0001 1001 //(last 11 bits same, as Frame offset = Page offset)

 

c = 2, because Page Number 2 corresponds to Frame Number 0. We know frame Number is 0 because in the Physical Address the "a" portion is 0.

 

So, Virtual address: 0010 000 0001 1001 //(First "c" then "b" = Virtual Address)

 

= 4121.

 

Option D

Answer:

Related questions

4 votes
4 votes
4 answers
1
go_editor asked Jul 1, 2016
5,596 views
Dirty bit is used to indicate which of the following?A page fault has occurredA page has corrupted dataA page has been modified after being loaded into cacheAn illegal ac...
4 votes
4 votes
3 answers
2
6 votes
6 votes
5 answers
3
neha singh asked Jun 21, 2016
8,531 views
What is the size of the physical address space in a paging system which has a page table containing 64 entries of 11 bit each (including valid and invalid bit) and a page...
8 votes
8 votes
3 answers
4
go_editor asked Jul 1, 2016
4,647 views
Which of the following is not an optimization criterion in the design of a CPU scheduling algorithm?Minimum CPU utilizationMaximum throughputMinimum turnaround timeMinimu...