Re: CS, DS, and SS Segments Together?

From: xyoavx (spamtrap_at_crayne.org)
Date: 01/03/05

  • Next message: The Dragon : "Re: x86 simulators"
    Date: Mon, 3 Jan 2005 22:28:28 +0000 (UTC)
    
    

    Hi Matt
    Thanks a lot for your profound answer. Wherefrom did you get this
    information ?
    (books, articles, websites etc). I've never found such information,
    although I read many books & articles.
    Thanks in advance
    Regards,
    xyoavx
    Matt wrote:
    > "xyoavx" <spamtrap@crayne.org> wrote in message
    > news:1104685938.201884.44330@c13g2000cwb.googlegroups.com...
    > > Hi
    > > You write:
    > > Remember that the DS selector starts at 0 and goes to FFFFFFFF. It
    > > isn't
    > > limited to the data sections of the current program.
    > > My question is: why should I give a limit of FFFFFFFF if I know
    that my
    > > data segment needs only 200 bytes ?
    >
    > Because there isn't any purpose to doing that when you are using
    paging. If
    > your data section is loaded at 4KB then accessing memory at 8KB will
    cause
    > an exception. (Remember, 0KB or NULL is typically reserved as an
    error
    > return from memory allocation functions.)
    >
    > There is, instead, very good reason *not* to change the limit of DS.
    A large
    > amount of code expects ds.base == 0 and ds.limit == 4GB. Calling into
    shared
    > libraries means they will have to change the value of DS.
    Unfortunately it's
    > not as simple as recompiling the code to handle this, but even if it
    were,
    > most programs would run much slower because they spent so much time
    changing
    > DS.
    >
    > Even if your program does not load any share libraries (which is
    impossible
    > on Windows), this still won't work. Newer x86 processors support a
    few
    > special instructions for making OS calls. These instructions are used
    for
    > making *fast* system calls. The caveat is that they assume the
    segment
    > registers all have a base of 0 and limit of 4GB. Changing the limit
    of DS
    > will not work with these fast system call instructions.
    >
    > -Matt


  • Next message: The Dragon : "Re: x86 simulators"

    Relevant Pages

    • Re: sf not worth stealing?
      ... They occasionally do that for interlibrary loan of articles. ... a blanket right of libraries to copy and pass on articles. ... Books get shipped surface mail. ... is "nate" at the | "Outside of a dog, a book is man's best friend. ...
      (rec.arts.sf.written)
    • Re: sf not worth stealing?
      ... They occasionally do that for interlibrary loan of articles. ... allowable, and either the library is eating the duplication fee, or they've ... a blanket right of libraries to copy and pass on articles. ... Books get shipped surface mail. ...
      (rec.arts.sf.written)
    • Re: Deteriorating Ethics Behind Medical and Healthcare Press Releases
      ... Vernon makes the point that "anything to do with Professors ... it isn't "corrupt" to have an association as long ... NEVER seen a variation regarding "scientific" articles and books. ...
      (misc.health.alternative)
    • Re: DSCP with GRE?
      ... >> Read the help, books and articles! ... In a multi-site topology where VPN tunnels create the inter-site ... >> Another possibility is to find a method to direct different priority traffic over different tunnels; ...
      (microsoft.public.isa.enterprise)
    • Re: "The Quest for the Historical Muhammad"
      ... Wansbrough have been refuted by these articles, ... As for the links Dr. Saifullah gave, they lead to articles which are ... I also enjoy the books of Ibn Warraq (I even ...
      (soc.religion.islam)