|
|
1.1 root 1: /* param.c 6.1 83/07/29 */
2:
3: #include "../h/param.h"
4: #include "../h/systm.h"
5: #include "../h/socket.h"
6: #include "../h/dir.h"
7: #include "../h/user.h"
8: #include "../h/proc.h"
9: #include "../h/text.h"
10: #include "../h/inode.h"
11: #include "../h/file.h"
12: #include "../h/callout.h"
13: #include "../h/clist.h"
14: #include "../h/cmap.h"
15: #include "../h/mbuf.h"
16: #include "../h/quota.h"
17: #include "../h/kernel.h"
18: #include "../h/msg.h"
19:
20: /*
21: * System parameter formulae.
22: *
23: * This file is copied into each directory where we compile
24: * the kernel; it should be modified there to suit local taste
25: * if necessary.
26: *
27: * Compiled with -DHZ=xx -DTIMEZONE=x -DDST=x -DMAXUSERS=xx
28: */
29:
30: int hz = HZ;
31: int tick = 1000000 / HZ;
32: struct timezone tz = { TIMEZONE, DST };
33: #define NPROC (20 + 8 * MAXUSERS)
1.1.1.2 ! root 34: #define SAVENPROC (20 + 8 * MAXUSERS)
1.1 root 35: #ifdef SYS5
36: # if NPROC > 511
37: # undef NPROC
38: # define NPROC 511
39: # endif
40: #else
41: # if NPROC > 1023
42: # undef NPROC
43: # define NPROC 1023
44: # endif
45: #endif SYS5
46:
47: int nproc = NPROC;
48:
49: #ifdef INET
50: #define NETSLOP 20 /* for all the lousy servers*/
51: #else
52: #define NETSLOP 0
53: #endif
1.1.1.2 ! root 54:
! 55: #include "vx.h"
! 56:
1.1 root 57: int ntext = 24 + MAXUSERS + NETSLOP;
1.1.1.2 ! root 58: int ninode = (SAVENPROC + 16 + MAXUSERS) + 32;
! 59: int nfile = 16 * (SAVENPROC + 16 + MAXUSERS) / 10 + 32 + 2 * NETSLOP;
! 60: int ncallout = 16 + SAVENPROC;
! 61: #if NVX > 0
! 62: int nclist = ((100 + 16 * MAXUSERS) > (16 * NVX * 15)) ?
! 63: (100 + 16 * MAXUSERS) : (16 * NVX * 15);
! 64: #else
1.1 root 65: int nclist = 100 + 16 * MAXUSERS;
1.1.1.2 ! root 66: #endif
! 67: int nport = SAVENPROC / 2;
1.1 root 68: int nmbclusters = NMBCLUSTERS;
69: #ifdef QUOTA
70: int nquota = (MAXUSERS * 9)/7 + 3;
1.1.1.2 ! root 71: int ndquot = (MAXUSERS*NMOUNT)/4 + SAVENPROC;
1.1 root 72: #endif
73:
74: #ifdef AUDITTRAIL
75: int naudbuf = (MAXUSERS * 16 + 15) & ~15;
76: #endif AUDITTRAIL
77:
78: #ifdef SYS5
79: int dmshm = DMSHM;
80: int nshmem = SHMMNI;
81: struct shmid_ds *shmem, *shmemNSHMEM;
82: struct shminfo shminfo = {
83: SHMMAX,
84: SHMMIN,
85: SHMMNI,
86: SHMSEG,
87: SHMBRK,
88: SHMALL
89: };
90: struct seminfo seminfo = {
91: SEMMAP,
92: SEMMNI,
93: SEMMNS,
94: SEMMNU,
95: SEMMSL,
96: SEMOPM,
97: SEMUME,
98: SEMUSZ,
99: SEMVMX,
100: SEMAEM
101: };
102: struct msqid_ds *msgque, *msgqueNMSGQUE;
103: int nmsgque = MSGMNI;
104: struct msginfo msginfo = {
105: MSGMAP,
106: MSGMAX,
107: MSGMNB,
108: MSGMNI,
109: MSGSSZ,
110: MSGTQL,
111: MSGSEG
112: };
113: #endif SYS5
114:
115: /*
116: * These are initialized at bootstrap time
117: * to values dependent on memory size
118: */
119: int nbuf, nswbuf;
120:
121: /*
122: * These have to be allocated somewhere; allocating
123: * them here forces loader errors if this file is omitted.
124: */
125: struct proc *proc, *procNPROC;
126: struct text *text, *textNTEXT;
127: struct inode *inode, *inodeNINODE;
128: struct file *file, *fileNFILE;
129: struct callout *callout;
130: struct cblock *cfree;
131: struct buf *buf, *swbuf;
132: short *swsize;
133: int *swpf;
134: char *buffers;
135: struct cmap *cmap, *ecmap;
136: #ifdef QUOTA
137: struct quota *quota, *quotaNQUOTA;
138: struct dquot *dquot, *dquotNDQUOT;
139: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.