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

linuxÖеÄoutb¡¢outw¡¢inb¡¢inw

ÔÚlinuxµÄÇý¶¯³ÌÐòÖУ¬¶¼»áʹÓôóÁ¿µÄoutb¡¢outw¡¢inb¡¢inwµÈµÈºêÀ´·ÃÎÊÓ²¼þ»ò¼Ä´æÆ÷¡£ÕâЩºêµÄ¶¨Ò嶼ÔÚÏàÓ¦´¦ÀíÆ÷ÌåϵϵÄinclude\asmĿ¼ÏµÄio.hÖж¨Òå¡£×·¾¿ÏÂÈ¥£¬ÕâЩºê×îÖÕ¾ÍÊÇÒ»¸övolatile±äÁ¿µÄµÄ¸³Öµ£º
      #define __arch_putb(v,a)      (*(volatile unsigned char *)(a) = (v))
      #define __raw_writeb(v,a)     __arch_putb(v,a)
      #define outb(v,p)                 __raw_writeb(v,__io(p))
      ÔÚ(*(volatile unsigned char *)(a) = (v))ÖУ¬aÊÇÒ»¸öÎïÀíµØÖ·£¨ÊµµØÖ·£¬¶àÊýÊÇÌØÊ⹦ÄܼĴæÆ÷µØÖ·£©¡£(volatile unsigned char *)¶Ôa½øÐÐÀàÐÍת»»£¬³ÉΪһ¸öÖ¸Ïò¸ÃµØÖ·Ö¸Õ룬×îºó*(volatile unsigned char *)(a)ÒýÓøÃÖ¸Õë¶Ô¸ÃµØÖ·¸³Öµv¡£ÕâÑù¾Í¿ÉÒÔ´ïµ½·ÃÎʵײãÓ²¼þµÄÄ¿µÄÁË¡£


Ïà¹ØÎĵµ£º

LinuxÖкǫ́ÃüÁîµÄÖ´ÐÐ

LinuxÖжÔÓÚһЩ´óÈÎÎñÐèÒªÔÚºǫ́ÔËÐУ¬·ñÔò»áÒ»Ö±Õ¼ÓÃÆÁÄ»£¬·À°­Ê¹ÓÃÕßʹÓÃÖÕ¶ËÈ¥Íê³ÉÆäËüµÄÈÎÎñ¡£ÆäÖлáÌṩÈçϼ¸¸öÃüÁîÀ´½øÐкǫִ́ÐУº
1¡¢  ÉèÖÃcrontabÎļþ£¬²¢ÓÃËüÀ´Ìá½»×÷Òµ£»ÆäÖÐcron ϵͳµ÷¶È½ø³Ì£¬¿ÉÒÔʹÓÃËüÔÚÿÌìµÄ·Ç¸ß·å¸ººÉʱ¼ä¶ÎÔËÐÐ×÷Òµ£¬»òÔÚÒ»ÖÜ»òÒ»ÔÂÖеIJ»Í¬Ê±¶ÎÔËÐС£
2¡¢  ʹÓÃatÃüÁîÀ ......

linuxÄں˵ÄPAEºó׺

yum update ¸üÐÂϵͳ֮ºó£¬Äں˰汾³öÏÖÁËÁ½ÖÖ£¬Ò»ÖÖÊÇPAE£¬ÁíÍâÒ»ÖÖ²¢Ã»ÓÐPAE¡£
ºÎνPAEÄØ£¿È«³Æ£ºPhysical Address Extension
Æäʵ¾ÍÊÇʹ32λϵͳ֧³Ö³¬¹ý4GÄڴ棬×î´ó¿É´ï64GÄÚ´æ¡£
¶ÔÓÚLinuxÀ´Ëµ£¬Äں˴Ó2.6°æ±¾¿ªÊ¼È«ÃæÖ§³ÖPAE[3]
£¬ÕâʹµÃÔÚ32λµÄ»úÆ÷ÉÏ¿ÉÒÔ·ÃÎÊ64GBµÄÄÚ´æ¡£ÆôÓÃÁËPAEµÄLinuxÄں˻¹ÐèҪͬÑùÖ§³ÖP ......

linuxÏ̵߳ĹÒÆðÓë»Ö¸´

#include <stdio.h>
#include <pthread.h>
#include <stdlib.h>
#include <unistd.h>
pthread_mutex_t wqy_mutex_pause = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t wqy_cond_pause = PTHREAD_COND_INITIALIZER;
bool wqy_pthread_pause = false;
void wqy_pthread_suspend(void)
{
if ......

LinuxÏ»ñÈ¡»úÆ÷ÐÔÄÜ

×¢Òâ¸Ã·½·¨ÊǼÆËãµÄ×Ô¿ª»úÒÔÀ´µÄʹÓÃÂÊ£¬ÊÇÒ»¸öÈ«¾ÖµÄ£¬Ã»¶à´óÒâÒ壬ÿһ´Î¼ÆËãCPUÀûÓÃÂÊ = 100 *£¨user + nice + system£©/£¨user + nice + system + idle£© ÕâÀïÒª¼õÈ¥Ò»¶¨Ê±¼äÒÔÇ°·½¿É¼ÆËã³öÕâÒ»¶Îʱ¼äÄÚµÄcpuʹÓÃÂÊ¡£ "procÎļþϵͳÊÇÒ»¸öαÎļþϵͳ£¬ËüÖ»´æÔÚÄÚ´æµ±ÖУ¬¶ø²»Õ¼ÓÃÍâ´æ¿Õ¼ä¡£ËüÒÔÎļþϵͳµÄ·½Ê½Îª·ÃÎÊÏµÍ ......

Linux ´ÅÅÌ·ÖÇø±í¡¢ÎļþϵͳµÄ²é¿´

ÌáÒª£ºLinux ´ÅÅÌ·ÖÇø±í¡¢ÎļþϵͳµÄ²é¿´¡¢Í³¼ÆµÄ¹¤¾ßºÜ¶à£¬ÓÐЩ¹¤¾ßÊǶ๦Äܵģ¬²»½ö½öÊDz鿴´ÅÅ̵ķÖÇø±í£¬¶øÇÒÒ²ÄܽøÐдÅÅÌ·ÖÇøµÄ²Ù×÷£»µ«ÔÚ±¾ÎÄ£¬ÎÒÃÇÖ»½²´ÅÅÌ·ÖÇøµÄ²é¿´£¬ÒÔ¼°·ÖÇøµÄʹÓÃÇé¿öµÄ²é¿´£»±¾ÎÄÖ»ÊǸøÐÂÊÖÉÏ·֮Ó㻹ØÓÚ·ÖÇø¹¤¾ßµÄ²Ù×÷£¬ÎÒ½«ÔÚÒÔºó×öרÃŽéÉÜ£»´ËÎÄÄ¿µÄ:Ö÷ÒªÊÇÏò³õѧÕß½éÉÜÒ»ÏÂÈëÃűر¸µÄÒ»µ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ