Printer-Friendly
Version
|
Next: Single-Address-Space Operating Systems
Up: 12-mungi
Previous: Single-Address-Space Operating Systems
Subsections
Traditional OS use a separate address space for each process.
- Each address space has own virtualphysical mapping.
- Advantages:
- Maximises available address space
- Isolates processes (provide protection)
- Drawbacks:
- Meaning of virtual address depends on process context
- Isolation inhibits sharing
- Via files:
- One process writes data to a file, another reads file
- Similarly pipes, sockets, ...
- Via message passing (IPC):
- One process sends message, another receives
- Via shared memory:
- both establish shared memory arena (mmap())
- shared buffers are mapped to the same physical memory locations
- both can access the same data directly
All require OS intervention.
- pointers are bound to an address space
- they are meaningless outside
... requires copying and conversions
- implies loss of typing
- increases code complexity (order of 30% of app code!)
- increases run-time overhead
|
memory data: |
| file data: |
|
item_t a, *x; |
| item_t a; |
|
|
| int x; |
|
|
| FILE *f; |
|
... |
| ... |
|
a = *x; |
| f = fopen("f","r"); |
|
|
| fseek (f, x, SEEK_SET); |
|
|
| fread (*a, sizeof(item_t), 1, f); |
|
address is *x |
| address is ("f",*x)
|
Inconsistent naming of persistent and volatile data
- $.$
- The problems are with pointers
- pointer problems result from per-address-space mappings
- result from the desire to maximise the available address
space
- results from limitations on address bits
- $.$
- But we have 64-bit architectures now!
- $.$
- Why not abolish private mappings????
- all address spaces are merged into one
- each process has same virtualphysical mapping
- all memory objects (text, data, stack, libraries) are allocated at
unique addresses
- is big enough to include ``files'' as memory objects
==>
- single-address-space system
Next: Single-Address-Space Operating Systems
Up: 12-mungi
Previous: Single-Address-Space Operating Systems
Gernot Heiser
2002-10-24
|