0

While I was reading this Wikipedia article, http://en.wikipedia.org/wiki/Memory_management_unit#How_it_works, I came across that divide virtual address space (range of address used by processor) into pages. But I have learnt that only the physical memory (RAM) is divided into pages. So how is the division of virtual address space of a process done?

Also, here the definition of virtual address space goes as range of address used by processor. Range of address used by processor means the length of address bus in processor, right? So if I am having a processor of address bus of 32 bits, and a RAM of 4 GB (2^32), is my physical and virtual address space same?

Bear with me if the questions are too naive.. I am still not getting a very clear visualization of address space. Thanks in advance.

shar
  • 1,988
  • 2
  • 18
  • 25

1 Answers1

1

The answer is specific to each OS, but in general terms it means that though each process gets say 32 bits worth of addressable memory, this memory space is divided in to ranges or pages of a certain size.

Simplistically speaking when your process accesses an address, that location will be in a certain page. The OS will ensure that there is physical memory that is mapped to that location. However it may not be in the same address in physical ram.

When some other process addresses that location then the OS will map in a page of physical ram at that so that location too will be addressable.

All the time the physical memory pages are being mapped to and from disk (so that you can have memory greater than 32 bits worth_\, and the virtual memory pages are being mapped to physical pages just described.

I really recommend reading the links in this question https://stackoverflow.com/questions/1437914/best-book-on-operating-systems

Community
  • 1
  • 1
Preet Sangha
  • 64,563
  • 18
  • 145
  • 216