Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7584701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:59:08+00:00 2026-05-30T18:59:08+00:00

I was reading about how Virtual Memory and Memory management works in an Operating

  • 0

I was reading about how Virtual Memory and Memory management works in an Operating System. I understood how each process has its own contiguous logical address space. This address space need not be contiguous in physical memory. For this purpose, paging is used. The page tables are used to do the mapping from logical address to a physical address. The logical address is divided in two parts, first part gives the logical page number, which using the page table is translated to the physical page number, and the second part is offset into that page. Thus the contents from memory are retrieved.
Virtual memory is an extension of this, where all the pages need not be in main memory, and can be brought there through page faults.

Using my understanding I solved the 4th question on this page: http://www.ics.uci.edu/~bic/courses/JaverOS/ch8-ex.pdf

I got my answers wrong, and I have no clue what the right answers are.
This is the way I did it:

From the diagram in the question, Page table for Process P1 will look like this according to me:
0-4
1-5
2-6
3-7

So when process P1 makes a reference to 0 i.e is 0000 in 4 bit binary, we divide 
it as 00|00. 
Thus logical page no = 00 and offset = 00.
From the page table, we can see 0 is mapped to 4th physical frame. 
Offset is also 00 here. So I get the 0th entry(offset) in the 4th frame. 
The content at this memory location(i.e Frame No. 4, offset 0) is 0.

Why is this wrong?
Can anyone help?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T18:59:09+00:00Added an answer on May 30, 2026 at 6:59 pm

    I’ll start with virtual address 8, it should illustrate things better.

    8 = 2×4 + 0. The physical address is stored at offset 0 of page 2 of the process. We look up the second page. For P1, page 2’s address is stored at PA 4 + 2, and it is 28. We look up the contents of PA 28, and get value 0. For P2, page 2’s address is stored at PA 12 + 2, it is 24, the contents of PA 24 are 5.

    Now with virtual address 15, which illustrates the exceptional cases.

    15 = 3×4 + 3. The physical address is stored at offset 3 of the process’s page 3. For P1, page 3’s address is stored at PA 4 + 3, which contains -2. The sign bit indicates the page is outside physical memory, which means there will be a hard page fault (a situation the OS handles exceptionally, but not an error). For P2, page 3’s address is stored at PA 12 + 3, which some special mechanism (a poison value, an external frame table?) tells us is invalid. This is an error, and gets reported as a segmentation fault.

    One last example with VA 7 and P1 to explain offsets:

    7 = 1×4 + 3. The physical address is stored at offset 3 of P1’s page 1. Page 1 is at PA 8, offset 3 of page 1 is at PA 8+3.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm reading the Modern Operating System book. And I'm confused about the Page Size.
After reading a few enlightening articles about memory in the .NET technology, Out of
I'm reading in my text book about virtual functions in C++ and my book
I found this in a website while reading about virtual inheritance in c++ When
I am reading about CIL and I keep seeing reference to a virtual execution
I'm reading an article about Xen, a virtual machine monitor. They say that an
Reading about the G.729 codec , I found this interesting tidbit about Comfort Noise
Reading about the Dispose pattern , I see the documentation repeatedly refer to cleaning
Reading about Kohana templates and saw something I've never seen before: $this->template->title = __('Welcome
Reading about Django, I saw this: http://docs.djangoproject.com/en/1.1/ref/contrib/admin/#ref-contrib-admin - the fancy simple to use admin

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.