Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linux½ø³ÌͨÐÅѧϰ±Ê¼Ç


Linux½ø³Ì¼äͨÐŵķ½·¨
1¡¢¹ÜµÀ(pipe)
2¡¢ÓÐÃû¹ÜµÀ(named pipe)
3¡¢ÐźÅÁ¿
4¡¢ÏûÏ¢¶ÓÁÐ
5¡¢ÐźÅ
6¡¢¹²ÏíÄÚ´æ
7¡¢Ì×½Ó×Ö
-------------------------------------------------------------------------------
linux½ø³Ì¼äͨÐÅ
1. ¹ÜµÀ¡£
  ÄäÃûÒ»´ÎÐÔʹÓõģ¬°ëË«¹¤¡£Ò»¸ö½ø³ÌÍùÊä³ö¶Ëд¹ÜµÀ£¬ÁíÒ»¸ö½ø³Ì´ÓÊäÈë¶Ë¶Á¹ÜµÀ¡£
  #include<unistd.h>
  int pipe(int fd[2]);
  fd[0]:±íʾ¶Á¶Ë
  fd[1]:±íʾд¶Ë
2. FIFOÌرðÎļþ
  ÓÐÃû¹ÜµÀ£¬×÷ΪÌرðÎļþ´æ´¢ÓÚÎļþϵͳÖС£ÓÐÃû¹ÜµÀÒ»µ©½¨Á¢¾Í´æÔÚÓÚÎļþϵͳÖУ¬³ý·ÇÏÔʾµÄunlink
  #include<sys/tpes.h>
  #include<sys/stat.h>
  int mknod(const char *path,mode_t mod,dev_t dev);
  int mkfifo(const char *path,mode_t mode);
  path:´´½¨ÓÐÃû¹ÜµÀµÄȫ·¾¶Ãû
  mod:´´½¨ÓÐÃû¹ÜµÀµÄģʽ£¬Ö¸´æȡȨÏÞ
  dev:É豸ֵ£¬¸Ãֵȡ¾öÓÚÎļþ´´½¨µÄÖÖÀ࣬ËüÖ»ÔÚ´´½¨É豸Îļþʱ²Å»áÓõ½
  ×¢Òâ:ÓÐÃû¹ÜµÀ´´½¨ºó¾Í¿ÉÒÔʹÓÃÁË£¬ÓÐÃû¹ÜµÀºÍ¹ÜµÀµÄʹÓ÷½·¨»ù±¾ÊÇÏàͬµÄ¡£Ö»ÊÇʹÓÃÓÐÃû¹ÜµÀµÄʱºò±ØÐëÏȵ÷ÓÃopen()½«Æä´ò¿ª
  ÒòΪÓÐÃû¹ÜµÀÊÇÒ»¸ö´æÔÚÓÚÓ²ÅÌÉϵÄÎļþ£¬¶ø¹ÜµÀÊÇ´æÔÚÓÚÄÚ´æÖеÄÌØÊâÎļþ
 
3. ÏûÏ¢¶ÓÁС¢ÐźÅÁ¿ºÍ¹²ÏíÄÚ´æ
   º¯Êý msgget semget shmget  msgctl semctl shmctl
   ÏûÏ¢¶ÓÁС¢ÐźÅÁ¿ºÍ¹²ÏíÄڴ涼ÊÇipdc×ÊÔ´
   ÿ¸öipc×ÊÔ´ÓÐÁ½¸öΨһµÄ±êÖ¾ÓëÆäÏàÁ¬ ¹Ø¼ü×ֺͱêʶ£¨¹Ø¼ü×ÖÀàËÆÓÚÎļþÃû£¬±êÖ¾ÀàËÆÓÚÎļþÃèÊö×ÖÓÃÀ´·ÃÎÊ×ÊÔ´µÄ²Ù×÷£©
   ¹Ø¼ü×Ö»ñµÃº¯Êý
   #include<sys/types.h>
   #include<sys/ipc.h>
   key_t ftok(const char * pathname,int proj_id);
 
   ipc_perm{              //½á¹¹£¬µ±½ø³Ì´´½¨ipc×ÊԴʱ£¬Äں˴洢ÁËipc×ÊÔ´µÄÊôÖ÷ºÍ×éidºÍ·ÃÎÊȨÏÞµÈÐÅÏ¢¡£
     uid_t uid            //µ±Ç°ÓÐЧÓû§id
     gid_t gid            //µ±Ç°ÓÐЧ×éid
     cuid_t cuid 


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì (Æß) SDPЭÒé

Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖЭÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀЭÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......

Linux ÏÂMinicom´®¿ÚÉèÖÃ

 Ê×ÏÈÒªÓÐÒ»¸öLinuxϵÄÖÕ¶ËÈí¼þ½Ðminicom¼ÙÈçûÓÐ×°Õâ¸öµÄÅóÓÑ¿ÉÒÔµ½×Ô¼ºµÄÔ´ÖÐÈ¥ÏÂÔØ£¬È»ºóÄã¾ÍÒª²åÉÏÄãµÄusbת´®¿ÚµÄÏߣ¬ÔÚLinuxÏÂUsbת´®¿ÚµÄÏß¼¸ºõ²»ÐèÒªÇý¶¯£¬Äã²åÉÏÒÔºóÔÚÄãµÄdevµÄĿ¼ÏÂÓ¦¸Ã»áÓÐÒ»¸öttyUSB0µÄÎļþ£¬¼ÙÈçÓÐÄÇô¹§Ï²ÄãÁË£¬ÄãµÄÕâ¸ùÏßÏÖÔÚÊÇ¿ÉÓõÄÁË¡£½øÈëµ½ÖÕ¶ËÊäÈësuÒÔrootÓû§½øÐеǼ£¬Ê¹ÓÃm ......

LinuxÏÂBIND9.6ÅäÖÃ

#wget http://ftp.isc.org/isc/bind9/9.6.1-P1/bind-9.6.1-P1.tar.gz
#tar zxvf bind-9.6.1-P1.tar.gz
#cd bind-9.6.1-P1
#./configure --prefix=/usr/local/named --enable-threads --disable-openssl-version-check --disable-ipv6
#make && make install
#cd /usr/local/named
#sbin/rndc-confgen > e ......

mkimageÖÆ×÷linuxÄÚºËÓ³Ïñ £¨×ª£©


bootmÃüÁîÊÇÓÃÀ´Òýµ¼¾­¹ýu-bootµÄ¹¤¾ßmkimage´ò°üºóµÄkernel imageµÄ£¬Ê²Ã´½Ð×ö¾­¹ýu-bootµÄ¹¤¾ßmkimage´ò°üºóµÄkernel image£¬Õâ¸ö¾ÍÒª¿´mkimageµÄ´úÂ룬¿´¿´Ëü×öÁËЩʲô£¬ËäÈ»ÎÒºÜÏ£Íû´ó¼Ò²»ÒªÍµÀÁ£¬ÈÏÕæµØÈ¥¿´¿´£¬µ«ÊÇÎÒÖªµÀ»¹ÊÇÓкܶàÈËÀÁµÃÈ¥×öÕâ¼þ£¬ÄÇôÎÒ¾Íj½«·ÖÎömkimage´úÂëºóµÃµ½µÄ×ܽá¸æËß´ó¼Ò£¬mkimage×öÁËÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ