delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/02/09/12:07:17

Xref: news2.mv.net comp.os.msdos.djgpp:911
From: Charles Sandmann <sandmann AT clio DOT rice DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: cwsparam parameter meanings
Date: Thu, 08 Feb 1996 18:47:57 CST
Organization: Rice University, Houston, Texas
Lines: 39
Message-ID: <311a99bd.sandmann@clio.rice.edu>
References: <DMFz1K DOT J3q AT cfanews DOT harvard DOT edu>
Reply-To: sandmann AT clio DOT rice DOT edu
NNTP-Posting-Host: clio.rice.edu
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

> > Minimum application memory desired before 640K paging ? [256Kb]
> >   This parameter determines the threshold which CWSDPMI
> >   should start using DOS memory as DPMI memory.
> What is it that is crossing a threshold?  Does the default 256K value mean
> that DOS memory will be used as DPMI memory if unused extended memory drops
> below 256K?

Correct.  So for better performance, this number should be about the size
of your image's memory requirements, unless it might need the DOS memory.
This parameter only comes in to play on low memory systems really.

> > Paragraphs of DOS memory to reserve when 640K paging ? [3840]
> If a program has a shell-to-dos function, does this parameter control how
> much memory is available in the shell?

Correct.  (Unless you had previously allocated some of it in the program
for other functions, like DMA buffers, etc).

> In general, how should I advise my users to set these options for a program
> which is relatively small (~200K), but may require arbitrarily large amounts
> of memory for data and may want to spawn a DOS program or DOS shell?

Not a particularly easy answer (the easiest answer is don't mess with it :-)

Since the program is around 200K (and you need a stack and some data) a
value less than 256K is probably not a good idea.  So use the default.

The 60K default value for DOS memory - I have found to be adequate to bring 
up command.com and many images under it, so the default settings may be
just fine.  If they need to run larger images under the shell, maybe double
the value (or even triple it) as needed.  If your total image + data size
was 400K, you could set the save DOS values to 200K and still get reasonable
performance on a 1Mb machine with no extended memory.

I could write a book on paging performance, working set sizes, data locality,
etc and how to tune for it - but in general the easiest thing to do is 
avoid paging as much as possible.  These parameters are there so the 
experts can tune images for distribution if they so desire.  Experiment,
and have fun :-)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019