[comp.sys.mac.system] UNIX limits

dorner@pequod.cso.uiuc.edu (Steve Dorner) (03/27/91)

>How about this: no more than 20 files open per process under UNIX
>(hard-coded limit, not configurable)? Versus the configurable systemwide
>number on the Mac (default 40).

Depends on what you mean by configurable.  It's a trivial thing to change
if you have kernel source (not all that uncommon).

I also think it's important that the limit is per process; much, much less
restrictive than the mac's 'all processes' limit.  As an application
writer, I can know that, if I stay within my 20 fd limit, everything
is peachy.  On the mac, I *ought* to worry about leaving some of those
precious fd's for other processes (some things, notably the MPW linker,
don't bother with such niceties).
--
Steve Dorner, U of Illinois Computing Services Office
Internet: s-dorner@uiuc.edu  UUCP: uunet!uiucuxc!uiuc.edu!s-dorner

hamilton@kickapoo.cs.iastate.edu (Jon Hamilton) (03/28/91)

ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:

>In article <1991Mar26.153602.276@ux1.cso.uiuc.edu>, dorner@pequod.cso.uiuc.edu
>(Steve Dorner) challenges:

>"...name one way you have to watch resource usage under UNIX that wouldn't
>ALSO apply to the Macintosh."

>How about this: no more than 20 files open per process under UNIX
>(hard-coded limit, not configurable)? Versus the configurable systemwide
>number on the Mac (default 40).

That's odd - I can configure it under A/UX...

>Has this limit been lifted or loosened up in current versions of UNIX?

>Lawrence D'Oliveiro                       fone: +64-71-562-889
>Computer Services Dept                     fax: +64-71-384-066
>University of Waikato            electric mail: ldo@waikato.ac.nz
>Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+12:00
>Those who make remarks about expanded and extended memory under DOS
>should remember that the idea of using a device driver to access
>memory originated with UNIX.
--
Jon Hamilton
hamilton@kickapoo.cs.iastate.edu
 " I feel a lot more like I do now that I did before I got here "
   - can't remember who

ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) (03/28/91)

In article <1991Mar26.153602.276@ux1.cso.uiuc.edu>, dorner@pequod.cso.uiuc.edu
(Steve Dorner) challenges:

"...name one way you have to watch resource usage under UNIX that wouldn't
ALSO apply to the Macintosh."

How about this: no more than 20 files open per process under UNIX
(hard-coded limit, not configurable)? Versus the configurable systemwide
number on the Mac (default 40).

Has this limit been lifted or loosened up in current versions of UNIX?

Lawrence D'Oliveiro                       fone: +64-71-562-889
Computer Services Dept                     fax: +64-71-384-066
University of Waikato            electric mail: ldo@waikato.ac.nz
Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+12:00
Those who make remarks about expanded and extended memory under DOS
should remember that the idea of using a device driver to access
memory originated with UNIX.

kent@sunfs3.Camex.COM (Kent Borg) (03/30/91)

In article <1991Mar27.144323.21504@ux1.cso.uiuc.edu> dorner@pequod.cso.uiuc.edu (Steve Dorner) writes:
>I also think it's important that the limit is per process; much, much less
>restrictive than the mac's 'all processes' limit.  As an application
>writer, I can know that, if I stay within my 20 fd limit, everything
>is peachy.  On the mac, I *ought* to worry about leaving some of those
>precious fd's for other processes (some things, notably the MPW linker,
>don't bother with such niceties).

I think that under 7.0 file control blocks are dynamically allocated
by the system.  I m sure there is still an upper limit, but it is
likely memory capacity/heap fragmentation bound.

If this is true, I like it better than either Unix's or 6.0's
approach.

(Do you really want to edit the source and rebuild your kernel to give
a program more file control blocks?  Somehow I don't think that Unix
is going to be an important shrink-wrap market anytime soon.)

--
Kent Borg                            internet: kent@camex.com   AOL: kent borg
                                            H:(617) 776-6899  W:(617) 426-3577
"We foolishly did not realize that he was stupid."  - April Glasbie 3-20-91

lsr@Apple.COM (Larry Rosenstein) (03/30/91)

In article <1897@camex.COM> kent@sunfs3.Camex.COM (Kent Borg) writes:
>
>I think that under 7.0 file control blocks are dynamically allocated
>by the system.  I m sure there is still an upper limit, but it is
>likely memory capacity/heap fragmentation bound.

I think is true also.  There is a limit, which is imposed by the fact that
refnums are signed offsets into the FCB table.  This give a maximum of about
340 open files (since each FCB is 95 bytes).

-- 
Larry Rosenstein,  Object Specialist
Apple Computer, Inc.  20525 Mariani Ave, MS 77-A  Cupertino, CA 95014
AppleLink:Rosenstein1    domain:lsr@Apple.COM
UUCP:{sun,voder,nsc,decwrl}!apple!lsr

ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) (04/01/91)

In article <1897@camex.COM>, kent@sunfs3.Camex.COM (Kent Borg) mentions
that System 7.0 has a dynamically-allocated array of file control blocks
(FCBs), so that the number of simultaneously-open files is limited only by the
fact that FCB offsets must fit into a 16-bit word.

He says: "If this is true, I like it better than either Unix's or 6.0's
approach."

Not only is it true, Kent, but you can get the *same* functionality
under System 6.0.x today! All you need is a Control Panel module called
"Up Your FCBs", written by Pete Helme at Apple Computer. It's probably
available on the net somewhere.

Lawrence D'Oliveiro                       fone: +64-71-562-889
Computer Services Dept                     fax: +64-71-384-066
University of Waikato            electric mail: ldo@waikato.ac.nz
Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+12:00

kent@sunfs3.Camex.COM (Kent Borg) (04/03/91)

In article <1991Apr1.222658.3289@waikato.ac.nz> ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
>In article <1897@camex.COM>, kent@sunfs3.Camex.COM (Kent Borg) mentions
>that System 7.0 has a dynamically-allocated array of file control blocks
>(FCBs), so that the number of simultaneously-open files is limited only by the
>fact that FCB offsets must fit into a 16-bit word.

'Fraid not.  Quote screwup time.  I would *like* to have said that,
but that part was actually written one of those smart Apple people.
My part was just a vague and tentative comment that I thought FCBs
were dymanic under 7.0.

(Nevertheless, I do feel a bit smug to have been told that I was right
and be backed up with impressive sounding details.  Always like it
when that happens.)

--
Kent Borg                            internet: kent@camex.com   AOL: kent borg
                                            H:(617) 776-6899  W:(617) 426-3577
"We foolishly did not realize that he was stupid."  - April Glasbie 3-20-91