public inbox for linux-8086@vger.kernel.org
 help / color / mirror / Atom feed
From: "Mario Premke" <premke@ess-ag.de>
To: David Given <dg@cowlark.com>, linux-8086@vger.kernel.org
Subject: AW: AW: [Fwd: Re: EDE - Personal Suggestions and Ideas]
Date: Wed, 26 May 2004 13:34:36 +0200	[thread overview]
Message-ID: <EDECLJGBBDNMPACDPHMCEEKICCAA.premke@ess-ag.de> (raw)
In-Reply-To: <200405261109.41177.dg@cowlark.com>

> The problem with using far pointers is that you end up having to encode
> segment IDs into the pointers themselves, which makes things
> really painful.
> Particularly, on systems that don't have an MMU, the segment ID
> controls the
> address of the segment; so on the 8086 and 8088 you won't be able to move
> your application's segments around while the program's running.
>
> (Brief tutorial on segments: the 8086, 8088 and 80286 are *not* 32-bit
> processors. They are 16-bit processors. They can address a total
> of 64kB of
> memory. However, they have a feature where you can select which 64kB of
> memory you want to use out of a much larger memory region. Each area is
> called a segment, and is referred to by segment ID. The processor can use
> different segments for accessing code, data and stack, so you can
> put your
> code in a different 64kB area than your data. The 8086 and 8088 have a
> hard-coded MMU where all segments are 64kB long and the physical
> address of
> each segment is (segmentID * 16); physical memory is 1MB wide.
> The 286 and
> above have a programmable MMU where you can vary the length and physical
> address of any segment at run time, and physical memory is 16MB wide.)

AFAIK the difference of a 286 and 8086 is that in x86 real mode the 'segment
ID' is part of a real hardware address whereas the 286 has memory protection
in protested mode and is able to hold a 64kB local descriptor table for each
process which holds the segment ID's in memory ... as far as I remember each
desriptor being 8 bytes long this results in 8192 adressable segments per
process ?!?

>
> Also, far pointers are slow and cause bloated and annoying code.
> One of the
> problems is that now your pointers are 32 bits wide, but your
> integers are 16
> --- and while this shouldn't affect well-written code, there's a lot of
> badly-written code out there.
>
> I'm of the opinion that a program that won't fit in a 64/64
> address space is
> too big to run well on an 8086-class system, anyway.
>
> (Incidentally, I dug out of storage an old laptop of mine: a
> 386SX/16 with one
> whole megabyte of memory. I installed Minix on it, telling Minix
> that it was
> a 286, and it runs fine! Recompiled the kernel and everything! It's a bit

I did the same on my 286 w. 5Mb Ram - I expected the Minix kernel
compilation to endure a while, but it finished (successful) after only ~15
min.

I only wanted to state that coding a 16bit OS and leaving out multiple
segments for code and data especially on a 286 with MMU and protection
capabilities would give away some (good) features. On the other hand more
than 64kB text and 64kB data might be rarely needed ...

Mario


  parent reply	other threads:[~2004-05-26 11:34 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-25 14:23 [Fwd: Re: EDE - Personal Suggestions and Ideas] Miguel Bolanos
2004-05-25 17:10 ` David Given
2004-05-26  6:20   ` AW: " Mario Premke
2004-05-26 10:09     ` David Given
2004-05-26 10:30       ` Gábor Lénárt
2004-05-26 11:43         ` AW: " Mario Premke
2004-05-26 11:57           ` Gábor Lénárt
2004-05-26 12:39             ` AW: " Mario Premke
2004-05-26 13:06               ` Gábor Lénárt
2004-05-26 14:17                 ` David Given
2004-05-26 15:10                   ` Gábor Lénárt
2004-05-26 16:00                     ` Andrey Romanenko
2004-05-26 16:49                     ` David Given
2004-05-26 17:19                       ` Eduardo Pereira Habkost
2004-05-27  9:09                         ` Gábor Lénárt
2004-05-26 17:42                       ` Andrey Romanenko
2004-05-26 23:19                         ` David Given
2004-05-27  6:07                           ` EDE - Personal Suggestions and Ideas sandeep
2004-05-27 15:51                             ` Eduardo Pereira Habkost
2004-05-28  8:09                               ` sandeep
2004-05-28  8:10                                 ` Gábor Lénárt
2004-05-28 10:11                                   ` David Given
2004-05-28 11:23                                     ` Andrey Romanenko
2004-05-28 12:14                                       ` David Given
2004-05-29  5:28                                         ` Dan Olson
2004-05-28 10:30                                   ` sandeep
2004-05-26 22:34                       ` AW: [Fwd: Re: EDE - Personal Suggestions and Ideas] Harry Kalogirou
2004-05-27  9:00                       ` Gábor Lénárt
2004-05-27  6:04         ` Dan Olson
2004-05-27  7:14           ` Andrey Romanenko
2004-05-27  9:32             ` David Given
2004-05-27 10:19               ` Gábor Lénárt
2004-05-27 21:07               ` Tommy McCabe
2004-05-28  7:39                 ` Gábor Lénárt
2004-06-01 13:46                 ` Gabucino
2004-06-02  9:03                   ` AW: [Fwd: Re: EDE - Personal Suggestions and Ideas][OT] Javier Sedano
2004-05-26 11:34       ` Mario Premke [this message]
2004-05-26 12:09         ` AW: [Fwd: Re: EDE - Personal Suggestions and Ideas] Gábor Lénárt
2004-05-27  5:56     ` Dan Olson
2004-05-26 22:42   ` Harry Kalogirou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=EDECLJGBBDNMPACDPHMCEEKICCAA.premke@ess-ag.de \
    --to=premke@ess-ag.de \
    --cc=dg@cowlark.com \
    --cc=linux-8086@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox