kernel.shmall = 268435456
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.ip_local_port_range = 1024 65000
net.ipv4.tcp_max_tw_buckets = 5000
net.ipv4.tcp_max_tw_buckets = 5000
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 300
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.ip_local_port_range = 5000 65000
net.ipv4.tcp_mem = 786432 1048576 1572864
net.core.wmem_max = 873200
net.core.rmem_max = 873200
net.ipv4.tcp_wmem = 8192 436600 873200
net.ipv4.tcp_rmem = 32768 436600 873200
net.core.somaxconn = 256
net.core.netdev_max_backlog = 1000
net.ipv4.tcp_max_syn_backlog = 2048
net.ipv4.tcp_retries2 = 5
net.ipv4.tcp_keepalive_time = 500
net.ipv4.tcp_keepalive_intvl = 30
net.ipv4.tcp_keepalive_probes = 3
net.ipv4.conf.lo.arp_ignore = 0
net.ipv4.conf.lo.arp_announce = 0
net.ipv4.conf.all.arp_ignore = 0
......
Îĵµ´´½¨ÈÕÆÚ£º2010-02-19
£ÛÎļþ1: test06-08.c£Ý
01 // P174: 2.±à³ÌÌâ (8)°ÑÓÐÐòµÄÁ½¸öÊý×éaºÍbºÏ²¢£¬ÒªÇóºÏ²¢ºóµÄÊý×éÒÀÈ»ÓÐÐò
02
03 // The beginning of C program: test06-08.c.
04
05 // Header files included.
06 #include <stdio.h>
07 #include "head06-08.h"
08
09 // Macro definition.
10 #define MAX_SIZE 100
11
12 // Main function's declaration.
13 int main ( void )
14 {
15 int &nbs ......
1.
¸ÅÊö
¸ù¾ÝÒÔǰѧϰÄÚºËÔ´ÂëµÄ¾Ñ飬ÔÚѧϰÎļþϵͳʵÏÖ֮ǰ£¬ÎÒ´ó¸Å¶¨Á˸öÄ¿±ê£º
1
¡¢
½¨Á¢Ò»¸öÇåÎúµÄÈ«¾Ö¸ÅÄΪ½«À´ÐèÒªÑо¿´úÂëϸ½Ú´òϼáʵ»ù´¡¡£
2
¡¢
Ö»Ñо¿ÐéÄâÎļþϵͳ VFS
µÄʵÏÖ£¬²»Ñо¿¾ßÌåÎļþϵͳ¡£
ΪʲôѡÔñ Linux 2.4.30
£¿ÒòΪ¿ÉÒԲο¼¡¶Linux
Ô´ÂëÇé¾°·ÖÎö¡·Ò»Ê飬¼õÉÙѧϰÄѶȡ£
1.1.
»ù±¾¸ÅÄî
1¡¢
Ò»¿é´ÅÅÌ£¨¿éÉ豸£©£¬Ê×ÏÈÒª°´ÕÕijÖÖÎļþϵͳ£¨Èç NTFS
£©¸ñʽ½øÐиñʽ»¯£¬È»ºó²ÅÄÜÔÚÆäÉϽøÐд´½¨Ä¿Â¼¡¢±£´æÎļþµÈ²Ù×÷¡£
ÔÚ Linux
ÖУ¬ÓГ°²×°”ÎļþϵͳºÍ“Ð¶ÔØ”ÎļþϵͳµÄ¸ÅÄî¡£
Ò»¿é¾¹ý¸ñʽ»¯µÄ“¿éÉ豸”£¨²»¹ÜÊǸոոñʽ»¯ÍêµÄ£¬Ã»Óд´½¨ÈκÎÃû¼ºÍÎļþ£»»¹ÊÇÒѾ´´½¨ÁËĿ¼ºÍÎļþ£©£¬Ö»ÓÐÏȱ»“°²×°”£¬²ÅÄÜÈÚÈë Linux
µÄÎļþϵͳÖУ¬Óû§²Å¿ÉÒÔÔÚËüÉÏÃæ½øÐÐÕý³£µÄÎļþ²Ù×÷¡£
2
¡¢
Linux
°ÑĿ¼»òÆÕͨÎļþ£¬Í³Ò»¿´³É“Ŀ¼½Úµã”¡£Í¨³£Ò»¸ö“Ŀ¼½Úµã”¾ßÓÐÁ½¸öÖØÒªÊôÐÔ£ºÃ ......
Îĵµ´´½¨ÈÕÆÚ£º2010-02-19
001 // P174: 2.±à³ÌÌâ (9)½«Êý×éaÖÐÏàÍ¬ÔªËØÖ»±£ÁôµÚÒ»¸ö£¬ÆäÓàɾ³ý¡£
002
003 // The beginning of C program: test06-09.c.
004
005 // Header files included.
006 #include <stdio.h>
007 #include "head06-09.h"
008
009 // Macro definition.
010 #define MAX_SIZE 100
011
012 // Main function's declaration.
013 int main ( void )
014 {
015 int i=0, n=10;
016 float lis ......
#include <linux/module.h>
MODULE_LICENSE("GPL");
static void hello_init(void);
static void hello_exit(void);
static void hello_init(void)
{
printk("init");
}
static void hello_exit(void)
{
printk("exit");
}
.
module_init(hello_init);
module_exit(hello_exit);
makefile:
obj-m := hello.o
PWD := $(shell pwd)
KERNELDIR = /lib/modules/2.6.24-26-generic/build
default:
make -C $(KENELDIR) M=$(PWD) modules
ubuntu superuser sudo -s -H ......
Îĵµ´´½¨ÈÕÆÚ£º2010-02-19
01 // P174: 2.±à³ÌÌâ (13)²»ÀûÓÃstrcmpº¯Êý£¬×Ô¼º±à³ÌʵÏÖÁ½¸öÈÎÒâ×Ö·û´®µÄ±È½Ï¡£
02
03 // The beginning of C program: test06-13.c.
04
05 // Header files included.
06 #include <stdio.h>
07
08 // Macro definition.
09 #define MAX_SIZE 100
10
11 // No.1: Subroutine: int getstr ( char ch[], int size );
12 int getstr ( char ch[], int size )
13 {
14 int i=0;
15   ......