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

Linux Device DriversÔĶÁ±Ê¼Ç

Linux Device Drivers, 3rd Edition
2.3.1. User Space and Kernel Space
Äں˿ռäºÍÓû§¿Õ¼ä
Unix transfers execution from user space to kernel space whenever an application issues a system call or is suspended by a hardware interrupt. Kernel code executing a system call is working in the context of a process—it operates on behalf of the calling process and is able to access data in the process's address space. Code that handles interrupts, on the other hand, is asynchronous with respect to processes and is not related to any particular process.
ÕâÊǺܹؼüµÄ¶ÎÂ䣺
Unix¿ÉÒÔͨ¹ýϵͳµ÷ÓúÍÓ²¼þÖжÏʵÏÖ´ÓÓû§¿Õ¼äµ½Äں˿ռäµÄÇл»¡£¶ÔÓÚϵͳµ÷Óã¬Äں˴úÂëÔËÐÐÓÚµ÷Óýø³ÌµÄÉÏÏÂÎÄÖУ¬Äں˴úÂë¿ÉÒÔ·ÃÎʵ÷Óýø³ÌµÄÊý¾Ý¡£¶ÔÓÚÓ²¼þÖжϣ¬Äں˴úÂëÔËÐÐÓÚÖжÏÉÏÏÂÎÄ£¬¶ÀÁ¢ÓÚµ±Ç°±»´ò¶ÏµÄ½ø³Ì£¬ËùÒÔ´Ëʱ²»ÄÜ·ÃÎʱ»Öжϵĵ±Ç°½ø³Ì¿Õ¼äµÄÊý¾Ý¡£
´ÓÓû§¿Õ¼äÇл»µ½Äں˿ռäʱҪʹÓÃÄں˿ռä¶ÑÕ»,linuxÄں˿ռä¶ÑÕ»<8k, дÄں˳ÌÐòÒªÏ൱עÒâÕ»µÄʹÓá£
µ±ÏµÍ³´ÓÄں˿ռ䷵»Ø»òÕß´ÓÖжÏÉÏÏÂÎÄÖзµ»ØÓû§¿Õ¼äʱ£¬Èç¹ûÓÐÖØÐµ÷¶ÈÐèÇó£¬ÏµÍ³»á½øÐÐÖØÐµ÷¶È£¬¼´Óû§ÇÀÕ¼¡£
ϵͳ´¦ÓÚÖжÏÉÏÏÂÎÄ»òÕß½ø³Ì³ÖÓÐ×ÔÐýËøÊ±²»ÔÊÐíÄÚºËÇÀÕ¼¡£
ÄÚºËÇÀÕ¼Ò»°ã·¢ÉúÔÚ£¬
    1 µ±ÏµÍ³ÔÚÄں˿ռäÖ´ÐÐʱ£¬±»Ä³¸öÖжϴò¶Ï£¬µ±´ÓÕâ¸öÖжϷµ»ØÄں˿ռäʱ¡£
    2 Äں˿ռäÊÍ·Å×ÔÐýËøÊ±¡£
3.7. read and write
unsigned long copy_to_user(void _ _user *to,
const void *from,
unsigned long count);
unsigned long copy_from_user(void *to,
const void _ _user *from,
unsigned long count);
Although these functions behave like normal memcpy functions, a little extra care must be used when accessing user space from kernel code. The user pages being addressed might not be currently present in memory, and the virtual memory subsystem can put the process to sleep while the page is being transferred into place. This happens, for example, when the page must be retrieved from swap space.
Äں˿ռäºÍÓû§¿Õ¼ä¿½±´Êý¾Ýʱ


Ïà¹ØÎĵµ£º

linux UART´®¿ÚÇý¶¯


linux UART´®¿ÚÇý¶¯¿ª·¢Îĵµ
ʱ¼ä:2010-01-09 14:24:55À´Ô´:ÍøÂç ×÷Õß:δ֪ µã»÷:482´Î
ÄÚÈݼò½é: ½éÉÜÁËLinuxϵĴ®¿ÚÇý¶¯µÄÉè¼Æ²ã´Î¼°½Ó¿Ú, ²¢Ö¸³ö´®¿ÚÓëTTYÖÕ¶ËÖ®¼äµÄ¹ØÁª²ã´Î(´®¿Ú¿É×÷TTYÖÕ¶ËʹÓÃ), ÒÔ¼°LinuxϵÄÖжϴ¦Àí»úÖÆ/ÖжϹ²Ïí»úÖÆ, »¹Óд®¿Ú»º³å»úÖÆµ±ÖÐÉæ¼°µÄÈíÖжϻúÖÆ; ÆäÖ ......

linux initÁùÖÖģʽ¼ò½é


initÊÇLinuxϵͳÀïµÄ¸ù½ø³Ì£¬ÊÇϵͳËùÓнø³ÌµÄ׿ÏÈ¡£ËüµÄÖ÷Òª×÷ÓÃÊǸù¾Ý¼Ç¼ÔÚ/etc/inittabÀïµÄÒ»¸ö½Å±¾£¨script£©³ÌÐò²úÉú½ø³Ì¡£Õâ¸öÎļþͨ³£ÓÃÓÚ¿ØÖÆÓû§µÄµÇ¼ģʽ¡£LinuxϵͳµÄÓÐЧµÇ¼ģʽÓÐ0~9¹²Ê®ÖÖ£¬²»¹ýÑØÓÃUNIXϵͳµÄÖÁ¶à6ÖÖµÄÏÞÖÆ£¬Ò»°ãÖ»ÓÐ1µ½6ÓÐЧ¡£
¡¡¡¡initÒ»°ãÔÚϵͳÆô¶¯Ê±×Ô¶¯ÔËÐУ¬Ò²¿ÉÒÔÓÉrootÓû§µ÷ ......

linux ÏÂweblogicµÄ°²×°

Ò»¡¢ÏÂÔØweblogic for linux £¬°æ±¾ºÜ¶à£¬ÎÒϵÄÊÇbin°æ±¾£¬Õâ¸ö°æ±¾µÄ°²×°·Ç³£¼òµ¥¡£ÎÒÏÂÔØµÄÊÇ£º[WebLogic.Platform.8.1.with.SP5.for.LinuxÓ¢Îİæ].platform815_linux32.bin ¶þ ¡¢Ïë°ì·¨Åªµ½ÐéÄâ»úÀïµÄlinuxÖС£ ÎÒʵÔÚwindowsÏÂÃæÏÂÔØµÄ£¬È»ºóͨ¹ýSSHÉÏ´«µ½ÐéÄâ»úÀïµÄ£¬µ±È»·½·¨ºÜ¶à£¬ÔÚÐéÄâ»úÀïÉÏÍøÒ²ÊÇ¿ÉÒÔÏÂÔØµÄ¡£ ......

VmwareÏÂLinuxµÄ°²×°¡¢ÉÏÍøÉèÖú͹²ÏíÎļþ¼Ð£¨×ª£©


Ò»¡¢             VmwareÏÂLinuxµÄ°²×°ºÍʹÓÃ
1.       ÏÂÔØLinux ¾µÏñ£¨isoÎļþ£©£¬ÎÒʹÓõÄÊÇRedHat Linux5 server¡£
2.       ÔÚVmwareÖÐн¨Ò»¸öÐéÄâ»ú
 
 
 
  ......

Linuxƽ̨ÏÂѧϰ·ÖÀà

(1) Linux »ù´¡£º°üÀ¨Linux °æ±¾£¬°²×°£¬ÃüÁîµÈ֪ʶµÄÕÆÎÕ¡£
(2) Linux ϵͳ¿ª·¢£ºÖ÷ÒªÊÇÇý¶¯½Ó¿Ú£¬ÄÚºËÅäÖý»²æ±àÒ룬ÄÚºËÈ¡µã£¬busybox£¬µÈµÈ·½Ãæ¡£
(3)Linux ǶÈëʽӦÓÿª·¢£ºÇ¶ÈëʽLINUXÓ¦ÓóÌÐò¿ª·¢ÊÇÔÚ²Ù×÷ϵͳÉÏ×ö¿ª·¢£¬ÀàËÆWindowsϵÄVC»òJAVA¿ª·¢¡£
(4)Linux ÍøÂç±à³Ì£ººÍÔÚwindowϵÄsocket±à³ÌÀàËÆ£¬°üÀ¨Ì×½ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ