Kagamin wrote:
Walter Bright Wrote:
Actually, you can have a segmented model on a 32 bit machine rather than a
flat model, with separate segments for code, data, and stack. The Digital
Mars DOS Extender actually does this. The advantage of it is you cannot
execute data on the stack.
AFAIK you inevitably have segments in flat model, x86 just doesn't work in
other way. On windows stack segment seems to be the same as data segment,
code segment is different. Are they needed for access check? I thought access
modes are checked in page tables.
Operating systems choose to set the segment registers to all the same value
which results in the 'flat' model, but many other models are possible with the
x86 hardware.