operating-system


How two virtual address spaces can be mapped to the same physical address range?


I think that they might override each other's data.
I understand that two same virtual address spaces can be mapped to physical memory.
A. Most multiprocessing systems support the creation of shared memory where the block of physical memory can be mapped to multiple processes. Usually, the mapping can be to different virtual addresses.
B. All virtual memory systems share the same physical memory. However, the same page of physical memory cannot be mapped to multiple processes at the same time in user mode.
c. The kernel mode address space is usually the same for all processes. The operating system maintains that area of memory to prevent overwriting.
The question is not quite clear.
Assuming standard hardware, a virtual address space is determined by its page translation table.
Thus if there are two translation tables, and they have entries with the same physical page number,
then you have pages in both virtual spaces using the same physical page.
If the above situation holds for all entries in the translation tables you get two address spaces mapped to the same physical range.
The question is why would one want that.
If you want two different processes to actually work in this configuration, then they can't run in parallel (i.e., on two CPUs). Worse, before, say, proccess1 is scheduled one must make sure
the contents of process1 memory are in place.
This might require copying out process2 memory contents (to different memory addresses, disk, or whatever) and copying the contents of process1 memory back in.

Related Links

About CPU operation and I/O processing
cloning an active filesystem in a physical environment
How to see the stdout of a child process?
Producer consumer with semaphores
SAS: What is the difference between an X Statement and an X Command?
Calculating the size of an inverted page table
porting pintOS to Raspberry-pi
How does Test and Set Instruction provide Bounded Waiting in below code?
How does Virtualization works internally?
Software support multi-user in OS
MMU and Page Table
how virtual memory increases context switching overhead?
Which x64 Bit Host OS that can be equivalent to Bare Metal hypervisor and can run VirtualBox as well as VMWare software
Is the valid invalid bit a waste with respect to protection?
How many total number of processes are there?
Can Child Process and Parent Process run deterministically?

Categories

HOME
openshift
oracle
class
tomcat
jms
typeerror
semantic-web
mongoid
ipv6
share
save
telegraf
yahoo
android-externalstorage
pm2
multi-step
xbap
xbox360
pinterest
user-defined-types
android-contacts
adobe-illustrator
spyder
unity-container
sqlplus
sybase-ase
router
web-config-transform
cellular-network
acrobat
xenapp
jslint
fastlane
elastica
recovery
netapp
plane
klee
get-event-store
expandablelistview
nuclio
roracle
android-5.0-lollipop
beeline
nonlinear-functions
password-hash
hibernate-ogm
renderman
subforms
mongodb-aggregation
connect-direct
business-rules
front-camera
perl-data-structures
nclam
s-function
jsonix
jsf-2.3
nvda
dpkg
powerpoint-2013
sharepoint-apps
jsr363
openshift-cartridge
mixins
compositetype
azure-xplat-cli
fiware-bosun
operands
juttle
comctl32
rebar
stripe.net
incognito-mode
xulrunner
assetic
smips
san
revmob
dojo-1.9
boost-foreach
datacontracts
ognl
explicit
aggregator
uninstaller
pinax
reliability
resharper-5.0
mysqli-multi-query
gui-designer

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App