www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/01/07/06:31:42

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Date: Mon, 7 Jan 2002 13:29:07 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Thomas Mueller <tmueller AT bluegrass DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: fcbs=40,0 in CONFIG.SYS ?
In-Reply-To: <a1brqn$pjano$4@ID-49635.news.dfncis.de>
Message-ID: <Pine.SUN.3.91.1020107131751.10998C-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On 7 Jan 2002, Thomas Mueller wrote:

>    You need to update your C:\CONFIG.SYS to include the following lines
>    (edit the first to suit your installation, and if these lines already
>    exist, it's OK if they have larger numbers than these examples):
> shell=c:\dos\command.com c:\dos /e:2048 /p
> files=40
> fcbs=40,0

Yes, that's the advice, and I think it's a good advice; see below.

> Why should fcbs be set so high?  Is it really necessary?  FCBs are a long
> outdated means of file access in DOS, being superseded by file handles beginning
> with MS-DOS 2.  Surely DJGPP, one of the more progressive DOS programs, would
> not use such an outdated means of file access?

DJGPP programs use whatever the programmer codes them to do.  While 
library functions which implement ANSI and Posix functionality indeed use 
handle-oriented DOS functions, a programmer can use __dpmi_int to issue 
any DOS interrupt, including FCB-related functions.  If a program does 
that, it would be confusing if the limits on the number of files a 
program could open using handle- and FCB-oriented functions were 
different.  Thus we advise the same limit of 40 in both cases.

In addition, DOS itself still uses FCB functions.  In particular, 
COMMAND.COM uses them, for example, in the REN command and in its code 
which parses file names.  Since DJGPP users are expected to invoke 
COMMAND.COM and other DOS utilities, e.g. from Makefile's and from Bash, 
we don't want such commands to fail due to shortage of FCB resources.  
(The default number of FCBS is 4, which is ridiculously low.)

Finally, the main disadvantage of setting a high FCB limit--the fact that 
conventional memory is at premium--is all but gone with DJGPP, since 
DJGPP programs normally use a very small amount of memory below 1MB mark.

Given the advantages and the lack of disadvantages, IMHO it makes no 
sense not to set FCBS as advised in the docs.

Is it really necessary?  No.  Is it useful?  Yes, I think it is.

- Raw text -


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