title: Memory Segmentation on modern OSes: why do you need 4 segments?
body: <p>From wikipedia:</p>
  
  <blockquote>
    <p>"Segmentation cannot be turned off on
    x86 processors, so many operating
    systems use a flat memory model to
    make segmentation unnoticeable to
    programs. For instance, the Linux
    kernel sets up only 4 segments"</p>
  </blockquote>
  
  <p>I mean since protection is already taken care of by the virtual memory subsystem (PTEs have a protection bit) why would you need 4 segments (instead of 2: i.e. data/code with DPL 3 since you can execute code residing in a lower privileged segment)?</p>
  
  <p>Thanks.</p>