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

linuxÇý¶¯¿ª·¢Ñ§Ï°±Ê¼Ç£¨¶þ£©

                    scull×Ö·ûÇý¶¯Ñ§Ï°±Ê¼Ç
Ŀ¼
1 scullÇý¶¯¼ò½é
2 Ö÷´Î±àºÅ
3 scullÔ´Âë·ÖÎö
-------------------------
|  1 scullÇý¶¯¼ò½é      |
-------------------------
  scullÊÇÒ»¸ö×Ö·ûÇý¶¯£¬ÎÒÃDzÙ×÷Ò»¿éÄÚ´æÇøºÃÏñËüÊÇÒ»¸öÉ豸¡£scullÊÇÓ²¼þÉ豸¹ØÁª²»´ó£¬ ËùÒÔËüÊÇͨÓÿÉÒÆÖ²µÄ¡£
-----------------------
|   2 Ö÷´Î±àºÅ        |
----------------------
2.1
  Ëæ±ãÌáÌáÖ÷´Î±àºÅ°É£¡
  ×Ö·ûÉ豸ͨ¹ýÎļþϵͳÖеÄÃû×ÖÀ´´æÈ¡£¬Ò²¾ÍÊdz£ËµµÄÉ豸Îļþ¡£ÎÒÃDz鿴/devĿ¼ÏµÄÎļþ£¬»á²é¿´µ½ÏµÍ³ÏÂËùÓÐÉ豸Îļþ¡£
  Ö÷±àºÅ±êʶÉ豸ÏàÁ¬µÄÇý¶¯¡£´Î±àºÅÓÃÀ´¾ö¶¨ÒýÓÃÄĸöÉ豸£¬ÒÀ¾ÝÄãµÄÇý¶¯ÊÇÈçºÎ±àдµÄ£¬ Äã¿ÉÒÔ´ÓÄں˵õ½Ò»¸öÄãµÄÉ豸µÄÖ±½ÓÖ¸Õë¡£ÄÚºËÔÊÐí¶à¸öÇý¶¯¹²ÏíÖ÷±àºÅ¡£
2.2
  һЩÖ÷É豸±àºÅÊǾ²Ì¬·Ö¸ø×îÆÕͨµÄÉ豸µÄ£¬¶ÔÓÚÐÂÇý¶¯£¬´ó¶àÊýÇé¿öÏÂʹÓö¯Ì¬·ÖÅäÀ´»ñÈ¡ÄãµÄÖ÷É豸ºÅ¡£
  ¶¯Ì¬·ÖÅäÖ÷É豸ºÅº¯Êý
  alloc_chrdev_region
  ¶¯Ì¬·ÖÅäµÄȱµãÊÇÄãÎÞ·¨ÌáÇ°´´½¨É豸½Úµã, ÒòΪ·ÖÅä¸øÄãµÄÄ£¿éµÄÖ÷±àºÅ»á±ä»¯. ¶ÔÓÚÇý¶¯µÄÕý³£Ê¹ÓÃ, Õâ²»ÊÇÎÊÌâ, ÒòΪһµ©±àºÅ·ÖÅäÁË, Äã¿É´Ó /proc/devices ÖжÁÈ¡Ëü¡£ÎªÊ¹Óö¯Ì¬Ö÷±àºÅÀ´¼ÓÔØÒ»¸öÇý¶¯, Òò´Ë, ¿ÉʹÓÃÒ»¸ö¼òµ¥µÄ½Å±¾À´´úÌæµ÷Óà insmod, ÔÚµ÷ÓÃinsmod ºó, ¶ÁÈ¡ /proc/devices À´´´½¨ÌØÊâÎļþ.
  ÔÚscullÔ´ÂëÖлñÈ¡Ö÷±àºÅµÄ´úÂë
if (scull_major) {
    dev = MKDEV(scull_major, scull_minor);
    result = register_chrdev_region(dev, scull_nr_devs, "scull");
} else {
    result = alloc_chrdev_region(&dev, scull_minor, scull_nr_devs, "scull");
    scull_major = MAJOR(dev);
}
if (result < 0) {
    printk(KERN_WARNING "scull: can't get major %d\n", scull_major);
    return result;
}
-------------------
| 3 scullÔ´Âë·ÖÎö |
-------------------
scull É豸½á¹¹Ìå
struct scull_dev {
    struct scull_qset *data;  /* Pointer to first quantum se


Ïà¹ØÎĵµ£º

linux ulimit max open files

ÓÐʱºòÔÚ³ÌÐòÀïÃæÐèÒª´ò¿ª¶à¸öÎļþ£¬½øÐзÖÎö£¬ÏµÍ³Ò»°ãĬÈÏÊýÁ¿ÊÇ1024£¬£¨ÓÃulimit -a¿ÉÒÔ¿´µ½£©¶ÔÓÚÕý³£Ê¹ÓÃÊǹ»ÁË£¬µ«ÊǶÔÓÚ³ÌÐòÀ´½²£¬¾ÍÌ«ÉÙÁË¡£
Ð޸İ취£º
ÖØÆô¾ÍOK
ÐÞ¸Ä2¸öÎļþ¡£
1./etc/security/limits.conf
vi /etc/security/limits.conf
¼ÓÉÏ£º
* soft nofile 8192
* hard nofile 20480
2./etc/pam.d/l ......

LinuxͼÐνçÃæÖпͻ§¶Ë·þÎñÆ÷´°¿Ú¹ÜÀíÆ÷Ö®¼äµÄ¹Øϵ


LinuxͼÐνçÃæÖпͻ§¶Ë¡¢·þÎñÆ÷¡¢´°¿Ú¹ÜÀíÆ÷Ö®¼äµÄ¹Øϵ
×÷Õߣº
ÁõºéÌΣ¬»ªÇåÔ¶¼ûǶÈëʽѧԺ
½ðÅƽ²Ê¦£¬ARM ATCÊÚȨÅàѵ½²Ê¦¡£
ºÜ
¶àLINUX³õѧÕßÔÚѧϰlinuxͼÐη½ÃæµÄ֪ʶʱ»áÓöµ½Ò»Ð©¸ÅÄÈ磺X¡¢X11¡¢Xfree86¡¢WM¡¢KDE¡¢GNOME¡¢QT¡¢QT/E¡¢
Qtopia¡¢DirectFB¡¢Framebuffer¡¢ÏÔ¿¨¼ÓËÙÇý¶¯µÈµÈ¡£Àí½âËüÃÇÖ ......

LinuxÏÂSVN·þÎñÆ÷µÄ°²×°

        Õâ´Îתµ½Á˺½¿ÕµÄÒ»¸öÏîÄ¿£¬ÐèÒªÔÚLinuxÏÂÓÃC×ö¿ª·¢¡£°æ±¾¹ÜÀí²ÉÓÃSVN£¬´Ó×òÌìÏÂÎ翪ʼÎҾͿªÊ¼ÁË°²×°£¬ÕæµÄÊÇÍ´¿àµÄ¹ý³Ì¡£ÏÖÔÚµ¹ÊÇ°²×°ºÃÁË£¬µ«ÊÇÅäÖÃÃüÁûÓÐÕÆÎÕ¡£
        Èç¹ûÓÐȨÏÞ´ÓÍøÉÏÖ±½Ó¸üÐÂÈí¼þ£¬ÎÒ²»±Øÿ´Î¶¼È¥ÕÒÔ´Âë°ü£¬È ......

LinuxÊØ»¤½ø³ÌµÄ¿ª·¢

      ºÜÔçÒÔÇ°,¾ÍÏë°Ñ×Ô¼ºÔÚ¿ª·¢ÏîĿʱ¹ØÓÚlinuxÊØ»¤½ø³ÌµÄ¼¼ÊõÕûÀíÒ»ÏÂ,·¢±íһƪÎÄÕÂ.½ñÌìÔÚÍøÉÏżȻÅöµ½ÓÐһƪдµÄͦ²»´íµÄÎÄÕÂ,ÕýºÃ¿ÉÒÔתÌù¹ýÀ´ºÍ´ó¼Ò·ÖÏí.
     
Linux Deamon±à³Ì·½·¨
ÊØ»¤½ø³Ì£¨Daemon£©ÊÇÔËÐÐÔÚºǫ́µÄÒ»ÖÖÌØÊâ½ø³Ì¡£Ëü¶ÀÁ¢ÓÚ¿ØÖÆÖն˲¢ÇÒÖ ......

ÔÚLinuxÉϽ»²æ±àÒëwindows³ÌÐò

ת×Ô:http://www.cublog.cn/u/12592/showart_163722.html
×î½ü¼¸Ìì¸ã wxWidgets£¬ÓÉÓÚҪͬʱ±àÒëÓ¦ÓóÌÐòµÄ Windows °æ±¾£¬ÓÖÀÁµÃÔÚÐéÄâ»úÀïÃæ±àÒë³ÌÐò£¬ÓÚÊÇÏëµ½Óý»²æ±àÒëµÄ·½Ê½ÔÚ Linux ÉϱàÒëºÃ Windows °æ±¾µÄ³ÌÐò£¬ÔÙÓà Wine »òÕßÐéÄâ»úÀ´Ö´ÐС£ÊÔÁËһϣ¬ÕâÖÖ·½·¨ºÜºÃÓ㬱ÈÔÚÐéÄâ»úÀïÃæ±àÒë³ÌÐò¿ìºÜ¶à¡£
ÎҵIJÙ×÷ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ