Awesome q2a theme
0 votes
25 views

Consider a system with a 6 bit virtual address space, and 16 byte pages/frames. The mapping from virtual page numbers to physical frame numbers of a process is (0,8), (1,3), (2,11), and (3,1). Translate the following virtual addresses to physical addresses. Note that all addresses are in decimal. You may write your answer in decimal or binary.

(a) 20

(b) 40

Source:https://www.cse.iitb.ac.in/~mythili/os/ps/memory/ps-memory.pdf (Question-19)

in Operating System by (25 points) | 25 views

1 Answer

+1 vote
Best answer

Virtual Address Space is 6 bit. 

16 byte pages/frames →  Page Size = 16 Byte. So Page Offset requires 4 bits.

Page Number bits = 6 – 4 = 2 bit → $2^2=4$ pages

From Given,

(a) 20 represented in Binary as 010100 from that First 2 bit is Page Number which is 01. If we see frame number mapped to 01 is 3 in Binary 11 and Page Offset is same as Frame Offset. So Physical Address is 11 0100 In Decimal it will be 52. 

Answer: 52

(b) 40 In Binary 101000. Page Number = 10. According to 10 Frame Number is 11 (Decimal) In Binary it will be 1011. Physical Address is 1011 1000 In Decimal 184.

Answer: 184

by (163 points)
selected by
+1
Thanks, very well explained.
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.
9,092 questions
3,152 answers
14,579 comments
95,936 users