config.8

来自「minix操作系统最新版本(3.1.1)的源代码」· 8 代码 · 共 335 行

8
335
字号
.TH CONFIG 8.SH NAMEconfig \- configuring MINIX 3 tasks and servers.SH DESCRIPTION.de SP.if t .sp 0.4.if n .sp..MINIX 3 has a number of configuration files containing parameters that canbe changed to enable or disable a device driver, to change the number oftimes a resource can be used, or to tune the performance of the system.We will name the file that contains the parameter, the name of theparameter, and the values it can be set to.  Some comments are prefixed by"8086" for MINIX 3 running in 16-bit real mode, "286" for 16-bit protectedmode, and "386" for 32-bit protected mode.Configuration file names can be.RI < file.h >for a file in.BR /usr/include/ ,or a simple file name for a file in.BR /usr/src/ ..PPThere may be several definitions for a parameter with only one that isactive.  Which one this is is easy to find if you know that.B "(\s-2CPU\s+2\ ==\ \s-2INTEL\s+2)"is true, and.SB _WORD_SIZEequals.B 2in 16-bit mode, and.B 4in 32-bit mode..PP.ti 2m.RB < minix/config.h >.brThis is the main configuration file for the MINIX 3.  It contains lots ofboolean variables to enable or disable drivers and a number of parametersthat specify the sizes of system data structures:.TP.SB NR_PROCSThe number of slots in the process table, and thus the maximum number ofprocesses that can be run concurrently.  Should be increased from thedefault.B 32if networking is enabled (add.B 8for deamons), and if more users are using the system (add.B 4for each active session).  There are a lot ofloops in the kernel scanning the process table, so setting.SB NR_PROCStoo high will slow things down a little bit, so don't overdo it..TP.SB NR_BUFSThe number of disk buffers in the file system server.  It is used to keepfrequently used disk blocks in memory..BR 8086 " & " 286 :The default is.BR 40 ,and that's about as high as it can be set..BR 386 :The default is.BR 80 ,which is best increased to.B 1024if you can spare the memory.  More will help, but the effect won't be aspronounced as.B 1024is more than enough to contain the working set of one active user..TP.SB NR_CTRLRSNumber of tasks used for disk or tape controllers.  By default 2, maximum 4.You need a controller task for each device class to be handled through a.BI /dev/c n "*"set of devices..TP.SB ENABLE_CACHE2If set to 1 allows the RAM disk to be used as a second level file systemcache.  Any block that is evicted from the normal cache is both written todisk (if dirty), and copied to the second level cache.  If it is neededagain then the block is reloaded from the RAM disk if it is still there..BR 8086 :Forget it, you don't have any memory for it..BR 286 :Turn it on and set the boot environment variable.B ramsizeto.B 512if you have the memory.  That's enough to contain the working set ofone active user, and is also the maximum FS can handle..BR 386 :The installation scripts sets.B ramsizeto.B 1024if there is enough memory.  Your first point of call is to compile anew kernel with.SB ENABLE_CACHE2off,.SB NR_BUFSset to a large value, and.B ramsizeset back to zero.  A normal block cache works much better than a two levelarrangement..TP.SB ENABLE_AT_WINIEnables the AT or IDE disk driver.  (The IDE interface grew out of the oldAT disk interface.)  Any run of the mill PC needs this driver.  You need toassign a driver like this one to a controller task using one of the.BI c nboot variables.  See.BR boot (8)..TP.SB ENABLE_BIOS_WINIEnables the BIOS disk driver.  The BIOS driver uses the system BIOS to reador write disk blocks..BR 8086 :The preferred disk driver for XT class machines..BR 286 " & " 386 :Use a native driver if possible to avoid switching back to real mode to makeBIOS calls.  Especially on the 286 this is a painful affair..TP.SB ENABLE_ESDI_WINIEnables the ESDI disk driver.  Some PS/2 models have this disk..TP.SB ENABLE_XT_WINIEnables the XT disk driver.  Useful for early IBM/AT machines that have XTdisks.  In real mode it is best to use the BIOS driver..TP.SB ENABLE_AHA1540_SCSIEnables the Adaptec 1540 series SCSI driver..TP.SB ENABLE_DOSFILEEnable the "DOS file as disk" driver that is used when MINIX 3 is run fromMS-DOS to access a large file as a disk..TP.SB ENABLE_FATFILEEnable the "FAT file as disk" driver that interprets a FAT file systemto find a large file to use as a disk.  This driver combined with a fastnative MINIX 3 disk driver is a better choice then the previous driver.  (Andit works when MINIX 3 is not started from MS-DOS.)  This is the last driverthat needs to be assigned to a controller task..TP.SB ENABLE_SB16Enable the Soundblaster-16 audio driver..TP.SB ENABLE_PRINTEREnable the Printer driver..TP.SB DMA_SECTORSThe size of the DMA buffer for drivers that use DMA or other drivers thatcan only do I/O to a single chunk of memory.  (BIOS, ESDI, XT, DOSFILE.)Choose a number between.B 1and.B 128for the sector size of this buffer.  The memory cost is twice this amount,because of trouble getting it aligned in memory properly.  A value of.B 16is the minimum to work well, choose.B 64if you have enough memory..TP.SB NR_CONSOLESNumber of virtual consoles.  By default.BR 2 ,so you can have two login sessions that can be switched to by ALT-F1,ALT-F2 or ALT-left/rightarrow.  If you have an EGA screen then you canspecify up to.B 4virtual consoles, for VGA you can have.BR 8 .It is best to choose one less to leave some video memory to keep textscrolling fast.  You really should read.BR console (4)on this.  Note also the.B consoleboot variable, you can use it to put more characters on the screen, atthe cost of video memory..TP.SB ENABLE_DP8390Master switch to enable the network drivers.  They are required by thenetwork server,.BR inet .See.BR boot (8)for information on configuring network support..TP.SB ENABLE_WDETHEnable code for the WD8003 and WD8013 cards in the network driver..TP.SB ENABLE_NE2000Enable code for the NE1000 and NE2000 cards..TP.SB ENABLE_3C503Enable code for the 3Com Etherlink II (3C503)..TP.SB NR_PTYSNumber of pseudo terminals supported, by default.BR 0 ,which disables the driver.  Pseudo terminals are used for incoming networklogins by telnet or rlogin.  One pty is needed per session..TP.SB NR_RS_LINESNumber of RS-232 lines supported.  By default.B 2for a normal kernel, but.B 0for a tiny kernel used for XT installation.  You can save a bit of memory bysetting this parameter to zero if you don't need serial lines..PP.ti 2m.BR fs/const.h.brThis file contains most of the parameters used by the file system code.Most of these cannot be changed, with the exception of these four:.TP.SB NR_FILPSMaximum number of open file descriptors for all processes combined.  A "Filetable overflow" error might indicate that this number must be increased..TP.SB NR_INODESMaximum number of in-use files for all processes combined.  Like above a"File table overflow" error may also indicate that this number should beincreased.  In cases like these one usually doubles both parameters.  (Ifone table runs out then the other one is likely to run out also anyway.).TP.SB NR_SUPERSNumber of file systems that can be mounted.  Again a "file table overflow"error is given if this table is full, but it will be produced by the.B mountcommand, so you know what's wrong in this case..TP.SB NR_LOCKSNumber of active file locks by.BR fcntl (2).These locks are often used by programs that update a shared file, like mailprograms do with mail boxes.  A "no locks available" error indicates thatthis table has run out..PP.ti 2m.B kernel/bios_wini.c.ti 2m.B kernel/dosfile.c.ti 2m.B kernel/fatfile.c.brThe number of disks each of these drivers can handle is specified by:.TP.B MAX_DRIVESThis parameter is set to.B 4for the BIOS and "DOS file" drivers, and to.B 2for the "FAT file" driver.  It can be set as high as you need to allow formore disks, or files as disks.  (The "FAT" driver needs quite some memory perdisk, which is why it by default only allows 2 disks.)  You will need to run.BR MAKEDEV (8)to create the extra disk devices in.BR /dev/ ..PP.ti 2m.B inet/inet_config.h.brThe maximum number of TCP/IP networks is:.TP.B IP_PORT_MAXSets the maximum number of networks that can be defined in.BR /etc/inet.conf ..BR 8086 ,.BR 286 :By default 2..BR 386 :By default 4..PP.ti 2m.B inet/buf.c.brThe number of 512 byte buffers allocated for data within the TCP/IP server is:.TP.B BUF512_NRThese buffers are a shared resource used by the server for any data it wantsto play with.  For incoming data this number of buffers determines the timepackets are kept around, with each new packet evicting an old packet.  It'sno big deal if packets get lost before a user process reads them, packetsget lost all the time.  The only real problem is outgoing TCP data.  Thedefault setting for.SB BUF512_NRallows up to four backlogged TCP streams, i.e. when data is output fasterthen it is read.  If more buffers are needed then one of the TCP connectionsis shut down.  When this happens you will see a "not enough buffers left"error.  This could happen for instance if a MINIX 3 web server is assaulted bya browser that likes to open several connections to the serversimultaneously.  The fix is to increase.SB BUF512_NRto allow more slow outgoing TCP streams..BR 86 :The default of.B 32buffers can be increased up to.BR 64 .(The "TCP window size" has been limited in 16-bit mode to keep the bufferuse by TCP down.).BR 386 :The default of.B 128can be increased to any value you like, but.B 512seems to be more than enough.  Minix-vmd uses 512 by default, and it seemshappy that way..SH "SEE ALSO".BR controller (4),.BR usage (8),.BR boot (8),.BR MAKEDEV (8)..SH NOTESAssociated with drivers there are device files to access the devicescontrolled by the drivers that may have to be created.  Let's simplify thissentence:  Type.BR "ls /dev" ,note that there are only.B c0*and.B c1*devices, and only for two disks each.  Some devices, like the audio devices,are not even present.  So if you enable a driver, or increase some limits, youalso need to use.BR MAKEDEV (8)in.B /devto allow programs to talk to the drivers..SH AUTHORKees J. Bot (kjb@cs.vu.nl)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?