[CSE]  Advanced Operating Systems 
 COMP9242 2002/S2 
UNSW

PRINTER Printer-Friendly Version
Administration               
- Notices
- Course Intro
- Consultations
# On-line Survey (closed)
- Survey Results
 
Work
- Lectures
- Milestone 0
- Project Admin
- Project Spec
- Project FAQ
- Exam
 
Documentation
- ASysT Lab
- L4 source browser
- Sulima ISA Simulator
R4x00 ISA Summary 
MIPS R4700 ReferenceMIPS R4000 User Manual 
- Network Driver
- GT64111
 
Related Info
- Aurema OS Prize
- OS Hall of Fame
 
History
- 2000
- 1999
- 1998
 
Staff
- Gernot Heiser (LiC)

 
Valid HTML 4.0!
next up previous
Next: Single-Address-Space Operating Systems Up: 12-mungi Previous: Single-Address-Space Operating Systems

Subsections

Address Spaces

Traditional OS use a separate address space for each process.

MASOS-new

Multiple address spaces:

  • Each address space has own virtual\(\rightarrow\)physical mapping.
  • Advantages:
    • Maximises available address space
    • Isolates processes (provide protection)
  • Drawbacks:
    • Meaning of virtual address depends on process context
    • Isolation inhibits sharing

How do processes share data?

  • 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.

Sharing between address spaces

MASOS-new

Problems with sharing: Pointers!

ptr-ds
  • pointers are bound to an address space
  • they are meaningless outside

Sharing across address spaces

... requires copying and conversions
flat-ds
  • implies loss of typing
  • increases code complexity (order of 30% of app code!)
  • increases run-time overhead

Other problems with address spaces

      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

Why do we have problems with sharing?

 $.$
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 virtual\(\rightarrow\)physical mapping
  • all memory objects (text, data, stack, libraries) are allocated at unique addresses
  • \(2^{64}\) is big enough to include ``files'' as memory objects
==>
single-address-space system


next up previous
Next: Single-Address-Space Operating Systems Up: 12-mungi Previous: Single-Address-Space Operating Systems
Gernot Heiser 2002-10-24