何謂QoS?
QoS(Quality of Service)是一個頻寬管理的功能,使用者可以設定為特定的電腦保留一定比例的頻寬,當頻寬滿載,這台電腦還可以繼續使用,不用跟其他的電腦搶奪頻寬。
為什麼需要 QoS?
在一般的家庭網路中,頻寬是所有電腦共用的。這表示任何使用「高頻寬」應用程式的電腦 ( 例如: Torrent 或其他 P2P 軟體 ) ,將會影響到其他電腦。這也包括對整個網路效能的負面影響。
如何避免這個問題?
CPU體系架構分析
CPU體系架構按照名稱主要分為兩大類:IA和x86,而在這兩類下又分別劃分為32位元和64位元。
按照這樣的分類,就出現了四種體系架構名稱:IA-32,IA-64,X86-32,X86-64。這些名詞的含義總結如下:
x86 (= 80x86)
x86是Intel公司首先研發的一種CPU體系架構,這種體系架構也常被稱為80×86。該系列最早的處理器即為16位的Intel 8086。由於Intel早年對於這個系列的處理器都是以80開頭並以86結尾,比如Intel 8086、80186、80286及80386等,因此用x86或者80×86表示該體系架構,其中“x”即為英文字母x。
值得注意的是,x86代表一類處理器的體系架構,並不特指Intel公司的處理器,比如AMD公司也生產遵循x86架構的處理器。另外,x86體系架構包含16位、32位和64位。
x86-32 (= x86 = IA32 = i386)
表示32位的x86體系架構,該系列也被稱為IA-32或i386,甚至直接使用x86來代表這種體系架構。該架構的第一款CPU為Intel 80386,它完全取代了16位x86架構的CPU。
x86-64 (= x64)
表示64位的x86體系架構。該架構由AMD公司首推,因此AMD將其稱為AMD64。 Intel隨後也推出了64位的x86架構,將其稱為Intel64。由於這兩個64位的架構幾乎相同,因此許多其他廠商使用不偏袒任何廠商的稱呼x86-64來表示對這兩個架構的兼容。該架構有時也被稱為x86_64或x64,某些廠商也用AMD64或amd64同時表示Intel64和AMD64。
IA-32 (= x86-32)
表示英特爾32位元架構,英文全稱為Intel Architecture 32-bit.它與x86-32表示同一種體系架構,只不過Intel現如今將x86-32稱為IA-32。
IA-64
表示Intel與惠普合作開發的一種嶄新的64位體系架構,它與x86架構不兼容。因此,IA-64與上面提到的x86-64或x64代表的含義不同。
來源:http://edsionte.com/techblog/archives/category/计算机体系结构
按照這樣的分類,就出現了四種體系架構名稱:IA-32,IA-64,X86-32,X86-64。這些名詞的含義總結如下:
x86 (= 80x86)
x86是Intel公司首先研發的一種CPU體系架構,這種體系架構也常被稱為80×86。該系列最早的處理器即為16位的Intel 8086。由於Intel早年對於這個系列的處理器都是以80開頭並以86結尾,比如Intel 8086、80186、80286及80386等,因此用x86或者80×86表示該體系架構,其中“x”即為英文字母x。
值得注意的是,x86代表一類處理器的體系架構,並不特指Intel公司的處理器,比如AMD公司也生產遵循x86架構的處理器。另外,x86體系架構包含16位、32位和64位。
x86-32 (= x86 = IA32 = i386)
表示32位的x86體系架構,該系列也被稱為IA-32或i386,甚至直接使用x86來代表這種體系架構。該架構的第一款CPU為Intel 80386,它完全取代了16位x86架構的CPU。
x86-64 (= x64)
表示64位的x86體系架構。該架構由AMD公司首推,因此AMD將其稱為AMD64。 Intel隨後也推出了64位的x86架構,將其稱為Intel64。由於這兩個64位的架構幾乎相同,因此許多其他廠商使用不偏袒任何廠商的稱呼x86-64來表示對這兩個架構的兼容。該架構有時也被稱為x86_64或x64,某些廠商也用AMD64或amd64同時表示Intel64和AMD64。
IA-32 (= x86-32)
表示英特爾32位元架構,英文全稱為Intel Architecture 32-bit.它與x86-32表示同一種體系架構,只不過Intel現如今將x86-32稱為IA-32。
IA-64
表示Intel與惠普合作開發的一種嶄新的64位體系架構,它與x86架構不兼容。因此,IA-64與上面提到的x86-64或x64代表的含義不同。
來源:http://edsionte.com/techblog/archives/category/计算机体系结构
2016年2月4日 星期四
[Linux] Shell script if
常用的系統符號變數有:
$# Number of parameter
$* All the parameter
$? Exit status of previous command(前一個指令執行後的回傳值,0為執行成功)
$$ PID of this shell's process
$! PID of the most recently started background
Shell script的if寫法如下:
if [...]; then
...
else
...
fi
[ string1 = string2 ] string1 and string2 are equal
[ string1 != string2 ] string1 and string2 are not equal
[ string1 \< string2 ] string1 is lexically less than string2 (e.g. 'a' is less than 'b')
[ string1 \> string2 ] string1 is lexically greater than string2 (e.g. 'b' is greater than 'a')
[ -z string ] string is zero (e.g. a empty string)
[ -n string ] string is nonzero (e.g. a VAR string)
[ -e file ] file exists
[ -f file ] file is a file
[ -d file ] file is a directory
[ -c file ] file is a character device
[ -b file ] file is a block device
[ -p file ] file is a named pipe
[ -s file ] file is not empty
[ -k file ] file's sticky bit is set
[ -S file ] file is a socket
[ -L file ] file is a symbolic link
[ -r file ] file is readable by user
[ -w file ] file is writeable by user
[ -x file ] file is executeable by user
[ -O file ] file is owner by user
[ -G file ] file is group owned by a greoup
[ -u file ] file has its set user ID bit set
[ -g file ] file has its group user ID bit set
[ file1 -nt file2 ] file1 is newer than file2
[ file1 -ot file2 ] file1 is older than file2
[ file -ef file2 ] file1 is another name for file2
[ n1 -eq n2 ] true if integer n1 = integer n2
[ n1 -ne n2 ] true if integer n1 <> n2
[ n1 -gt n2 ] true if n1 > n2
[ n1 -ge n2 ] true if n1 >= n2
[ n1 -lt n2 ] true if n1 < n2
[ n1 -le n2 ] true if n1 <= n
$# Number of parameter
$* All the parameter
$? Exit status of previous command(前一個指令執行後的回傳值,0為執行成功)
$$ PID of this shell's process
$! PID of the most recently started background
Shell script的if寫法如下:
if [...]; then
...
else
...
fi
其中[...]可以為:
[ string1 != string2 ] string1 and string2 are not equal
[ string1 \< string2 ] string1 is lexically less than string2 (e.g. 'a' is less than 'b')
[ string1 \> string2 ] string1 is lexically greater than string2 (e.g. 'b' is greater than 'a')
[ -z string ] string is zero (e.g. a empty string)
[ -n string ] string is nonzero (e.g. a VAR string)
[ -e file ] file exists
[ -f file ] file is a file
[ -d file ] file is a directory
[ -c file ] file is a character device
[ -b file ] file is a block device
[ -p file ] file is a named pipe
[ -s file ] file is not empty
[ -k file ] file's sticky bit is set
[ -S file ] file is a socket
[ -L file ] file is a symbolic link
[ -r file ] file is readable by user
[ -w file ] file is writeable by user
[ -x file ] file is executeable by user
[ -O file ] file is owner by user
[ -G file ] file is group owned by a greoup
[ -u file ] file has its set user ID bit set
[ -g file ] file has its group user ID bit set
[ file1 -nt file2 ] file1 is newer than file2
[ file1 -ot file2 ] file1 is older than file2
[ file -ef file2 ] file1 is another name for file2
[ n1 -eq n2 ] true if integer n1 = integer n2
[ n1 -ne n2 ] true if integer n1 <> n2
[ n1 -gt n2 ] true if n1 > n2
[ n1 -ge n2 ] true if n1 >= n2
[ n1 -lt n2 ] true if n1 < n2
[ n1 -le n2 ] true if n1 <= n