Question

It is known that there are different kinds of Virtual-address translations (x86) with the help of MMU such as Segmentation, Paging, Combined Segmentation-Paging (Paged segmentation, Segmented Paging), etc. Each having its own advantages and disadvantages.

My Questions: 1) Are general Operating systems like Linux/Windows use only one particular technique (like Paging)? 2) If 2 or more techniques are available for a given OS, when & where each one will be used? Can we customize according to our needs? 3) If 'Paging' only is used, then x86's segment registers are used in what ways?

No correct solution

OTHER TIPS

In general, modern operating systems on x86 use paging and not segmentation. This means the base address of segment registers is set to zero and the segment limit is set to the maximum. Paging is used to map virtual addresses to physical addresses, this gives the OS fine grained control of the address space of a process, protection between processes, and protection between privileged (kernel) and user address space. Segments are still used in x86 for special purposes:

  • to run legacy operating systems and applications in a virtual environment
  • to efficiently access thread local storage for each thread in a multithreaded application (with thanks to @PaulA.Clayton for pointing this out).

Microsoft Windows switched from segmentation to a flat, linear memory model with Windows 95.

http://technet.microsoft.com/en-us/library/cc751120.aspx

Windows 95 addresses this issue by using the 32-bit capabilities of the 80386 (and above) processor architecture to support a flat, linear memory model for 32-bit operating system functionality and Win32-based applications. A linear addressing model simplifies the development process for application vendors, and removes the performance penalties imposed by the segmented memory architecture.

In order to run old Win16 applications (Windows 3.1) Windows 95 ran a 16-bit virtual machine where all Win16 applications ran. Newer, 32-bit applications ran in separate address spaces using the paging facility of the MMU.

Here's the relevant description from the link above

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top