|
|
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: /* ! 19: * System parameter formulae. ! 20: * ! 21: * This file is copied into each directory where we compile ! 22: * the kernel; it should be modified there to suit local taste ! 23: * if necessary. ! 24: * ! 25: * Compiled with -DHZ=xx -DTIMEZONE=x -DDST=x -DMAXUSERS=xx ! 26: */ ! 27: ! 28: #define HZ 100 ! 29: int hz = HZ; ! 30: int tick = 1000000 / HZ; ! 31: struct timezone tz = { TIMEZONE, DST }; ! 32: #define NPROC (20 + 8 * MAXUSERS) ! 33: int nproc = NPROC; ! 34: #ifdef INET ! 35: #define NETSLOP 20 /* for all the lousy servers*/ ! 36: #else ! 37: #define NETSLOP 0 ! 38: #endif ! 39: int ntext = 24 + MAXUSERS + NETSLOP; ! 40: int ninode = (NPROC + 16 + MAXUSERS) + 32; ! 41: int nfile = 16 * (NPROC + 16 + MAXUSERS) / 10 + 32 + 2 * NETSLOP; ! 42: int ncallout = 16 + NPROC; ! 43: int nclist = 100 + 16 * MAXUSERS; ! 44: int nport = NPROC / 2; ! 45: int nmbclusters = NMBCLUSTERS; ! 46: #ifdef QUOTA ! 47: int nquota = (MAXUSERS * 9)/7 + 3; ! 48: int ndquot = (MAXUSERS*NMOUNT)/4 + NPROC; ! 49: #endif ! 50: ! 51: /* ! 52: * These are initialized at bootstrap time ! 53: * to values dependent on memory size ! 54: */ ! 55: int nbuf, nswbuf; ! 56: ! 57: /* ! 58: * These have to be allocated somewhere; allocating ! 59: * them here forces loader errors if this file is omitted. ! 60: */ ! 61: struct proc *proc, *procNPROC; ! 62: struct text *text, *textNTEXT; ! 63: struct inode *inode, *inodeNINODE; ! 64: struct file *file, *fileNFILE; ! 65: struct callout *callout; ! 66: struct cblock *cfree; ! 67: struct buf *buf, *swbuf; ! 68: short *swsize; ! 69: int *swpf; ! 70: char *buffers; ! 71: struct cmap *cmap, *ecmap; ! 72: #ifdef QUOTA ! 73: struct quota *quota, *quotaNQUOTA; ! 74: struct dquot *dquot, *dquotNDQUOT; ! 75: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.