有Ring0、Ring1、Ring2、Ring3四種模式,作業系統為運行於不同模式下的程式提供了一些許可權。其中使用者模式為Ring3,其運行在應用級;核心模式為Ring0,其運行在系統級。這樣,允許運行在核心模式下的作業系統和驅動可以訪問關鍵的任務,而用運行在使用者模式下則不能訪問這些資源,以免發生衝突。 What is the difference between user mode and kernel mode?Operating System assigns some
ARP是位址解析通訊協定的縮寫,其定於了兩種基本類型的訊息:請求訊息和響應訊息。請求訊息包含了一個IP地址,用來請求該IP地址的硬體地址;響應訊息中包含了請求訊息中的IP地址,以及其對應的硬體地址。 What is the meaning of ARP in TCP/IP?The ARP stands for Address Resolution Protocol. It defines two basic message types: a request and a response. A
早在多年前我剛開始接觸linux下的C程式時,經常被makefile搞得焦頭爛額,尤其當項目大了,子目錄多了之後顯得尤其不方便。後來開始學會使用開來源程式的普遍做法,那就是使用automake/autoconf。時間長了仍然覺得很ugly,目錄下總是一堆中間檔案,顯得好臃腫。去年開始我開始全面使用scons,它是一個對makefile的全面替代。scons由python編寫,受到Raymond的大力推薦,scons的官方網站上就有Raymond對scons的評價“It was long
log4j.rootLogger=debug, Rlog4j.appender.stdout=org.apache.log4j.ConsoleAppenderlog4j.appender.stdout.layout=org.apache.log4j.PatternLayout# Pattern to output the caller's file name and line number.log4j.appender.stdout.layout.ConversionPattern=%5p [%
在類中用一個靜態成員變數,初始化值為0。建構函式中使其值加1,解構函式中使其值減1。這裡不考慮建構函式和解構函式中拋出異常的情況。註:不應該在解構函式中拋出異常。 How to count the number of instance of a classThe class consists of a static value which is equal to zero in the beginning. This value will be increased by one in the