From: Tommy McCabe <rocketjet314@yahoo.com>
To: linux-8086@vger.kernel.org
Subject: Re: Swapping
Date: Fri, 28 May 2004 07:56:10 -0700 (PDT) [thread overview]
Message-ID: <20040528145610.49690.qmail@web51302.mail.yahoo.com> (raw)
In-Reply-To: <20040528075244.GW15905@vega.vega.lgb.hu>
--- Gábor Lénárt <lgb@lgb.hu> wrote:
> Re,
>
> On Thu, May 27, 2004 at 07:45:07PM +0100, Alan Cox
> wrote:
> > Firstly older processors could not restart a
> faulting instruction
> > perfectly. Eg if you did
> >
> > "move block of 32 bytes from x to y"
> >
> > you didn't know how much was copied when it
> faulted. Worse still
> > instructions that did the post increment/decrement
> might or might
> > not have changed the values. The 8086 is in this
> category, the 80286
> > is [with sufficient care] not.
I think he means "on the 8086, if you're copying X
bytes from A to B, and there's some error, you can't
tell how much of it has been copied".
> I don't understand this.
>
> mov cx,32
> push ds
> pop es
> mov si,0x100
> mov di,0x200
> rep movsb
>
> This code (in intel asm syntax) copies 32 bytes from
> offset 0x100 to
> 0x200 withing the data segment. If you interrupt rep
> prefixed movsb
> register cx should inform you the state of the
> prefixed movsb.
>
> Or simply I've ignored something :)
>
> > The other difference is by fixed v variable size).
> Paging traditionally
> > means fixed size blocks and not loading all the
> program into memory at
> > once. Works a treat on a 386, not useful on a 286.
> In the 286 world
> > instead you have to work with variable sized
> segments being written to
> > or from disk, but you could in 286PM but not on
> 8086 load only some
> > segments into memory and load others on the fault.
>
> Also it's important to declare here than on 386,
> paging and segmenting
> works in parallel (if you enable paging of course).
> On 286 you have got
> only segmenting but you have got special meaning of
> segment registers in
> protected mode ie conatining selectors which are
> "only" indices inside a
> desciptor table. Segmenting is similar in 386
> protected mode but there
> you have the possibility to use page granulity
> instead of bytes, so instead
> of maximum of 64K segment size, you can use maximum
> segment size 4G. Since
> paging and segmenting can works in parallel most
> modern OSes (like Linux)
> uses "flat" addressing mode, ie setting segment
> sizes to 4G, and let paging
> do the hw level protecting and other related stuffs
> on per page basis.
>
> And another interesting things for 386 is the so
> called 'flat real
> addressing mode). It's an ugly trick and only works
> in real mode so not
> in virtual 8086 mode. You can change into 32 bit
> protected mode on 386,
> and you can build a descriptor table with using 4G
> wide segment limits.
> Now you can load selectors into the segment
> registers. And NOW. If you
> switch back into real mode, size of the segments are
> 4G (!) instead of 64K,
> though meaning of segment IDs reamins the "real
> mode" constructs, so
> segid*16=real_addr. This addressing mode is used by
> some old scene demos.
> However I don't know exactly if it's a bug or
> feature :) as far as I can
> remember it's because CPU has got a "cache" for eg
> segment limits to avoid
> to load from descriptor table each time, and since
> 4G limit is loaded,
> this limit is used in real mode too after switching
> back into real mode.
>
> However, Alan, please correct me if I'm wrong
> somewhere.
>
> - Gábor (larta'H)
> -
> To unsubscribe from this list: send the line
> "unsubscribe linux-8086" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at
http://vger.kernel.org/majordomo-info.html
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/
next prev parent reply other threads:[~2004-05-28 14:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-26 22:45 Swapping Tommy McCabe
2004-05-27 18:45 ` Swapping Alan Cox
2004-05-28 7:52 ` Swapping Gábor Lénárt
2004-05-28 14:56 ` Tommy McCabe [this message]
2004-05-28 15:01 ` Swapping Gábor Lénárt
2004-06-03 22:36 ` Swapping Alan Cox
2004-06-04 7:38 ` Swapping Gábor Lénárt
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=20040528145610.49690.qmail@web51302.mail.yahoo.com \
--to=rocketjet314@yahoo.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