從根上理解用戶態與內核態

{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"歡迎來到操作系統系列,採用圖解 + 大白話的形式來講解,讓小白也能看懂,幫助大家快速科普入門。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"本篇文章開始探祕用戶態與內核態,雖然一般面試不會問這個,但搞清楚這塊,對我們理解整個計算機系統是及其有意義的,這會讓你在今後的學習中豁然開朗,你肯定會發出:“啊,原來如此的感嘆!”","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":1},"content":[{"type":"link","attrs":{"href":"#內容大綱","title":null,"type":null}},{"type":"text","text":"內容大綱","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/16/16831a5d7225cdf74070ac6faf3abd3d.png","alt":"","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":1},"content":[{"type":"link","attrs":{"href":"#小故事","title":null,"type":null}},{"type":"text","text":"小故事","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"張三是某科技公司的初級Java開發工程師(低權限),目前在15樓辦公碼代碼,公司提供的資源僅有一套電腦(用戶態),張三想着這一線的房價,倍感壓力山大,於是給自己定下一個目標,一定要做技術總監,在一線紮根, 奮鬥B張三,奮鬥5年終於當上了技術總監(高權限),之後張三搬到30樓,可以隨時向資源部(系統調用)申請公司各種資源與獲取公司的機密信息(內核態),所謂是走上人生巔峯。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"通過這個故事,我們發現,低權限的資源範圍較小,高權限的資源範圍更大,所謂的「用戶態與內核態只是不同權限的資源範圍」。","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":1},"content":[{"type":"link","attrs":{"href":"#c-p-u-指令集權限","title":null,"type":null}},{"type":"text","text":"C P U 指令集權限","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在說用戶態與內核態之前,有必要說一下 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"C P U 指令集","attrs":{}}],"attrs":{}},{"type":"text","text":",指令集是 C P U 實現軟件指揮硬件執行的媒介,具體來說每一條彙編語句都對應了一條 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"C P U 指令","attrs":{}}],"attrs":{}},{"type":"text","text":",而非常非常多的 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"C P U 指令","attrs":{}}],"attrs":{}},{"type":"text","text":" 在一起,可以組成一個、甚至多個集合,指令的集合叫 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"C P U 指令集","attrs":{}}],"attrs":{}},{"type":"text","text":"。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"同時 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"C P U 指令集","attrs":{}}],"attrs":{}},{"type":"text","text":" 有權限分級,大家試想,","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"C P U 指令集","attrs":{}}],"attrs":{}},{"type":"text","text":" 可以直接操作硬件的,要是因爲指令操作的不規範`,造成的錯誤會影響整個計算機系統的。好比你寫程序,因爲對硬件操作不熟悉,導致操作系統內核、及其他所有正在運行的程序,都可能會因爲操作失誤而受到不可挽回的錯誤,最後只能重啓計算機纔行。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"而對於硬件的操作是非常複雜的,參數衆多,出問題的機率相當大,必須謹慎的進行操作,對開發人員來說是個艱鉅的任務,還會增加負擔,同時開發人員在這方面也不被信任,所以操作系統內核直接屏蔽開發人員對硬件操作的可能,都不讓你碰到這些 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"C P U 指令集","attrs":{}}],"attrs":{}},{"type":"text","text":"。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/16/1667d71f812ddb5a008396e16f843806.png","alt":"","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"針對上面的需求,硬件設備商直接提供硬件級別的支持,做法就是對 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"C P U 指令集","attrs":{}}],"attrs":{}},{"type":"text","text":"設置了權限,不同級別權限能使用的 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"C P U 指令集","attrs":{}}],"attrs":{}},{"type":"text","text":" 是有限的,以 Inter C P U 爲例,Inter把 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"C P U 指令集","attrs":{}}],"attrs":{}},{"type":"text","text":" 操作的權限由高到低劃爲4級:","attrs":{}}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"ring 0","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"ring 1","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"ring 2","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"ring 3","attrs":{}}]}]}],"attrs":{}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"其中 ring 0 權限最高,可以使用所有 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"C P U 指令集","attrs":{}}],"attrs":{}},{"type":"text","text":",ring 3 權限最低,僅能使用常規 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"C P U 指令集","attrs":{}}],"attrs":{}},{"type":"text","text":",不能使用操作硬件資源的 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"C P U 指令集","attrs":{}}],"attrs":{}},{"type":"text","text":",比如 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"I O","attrs":{}}],"attrs":{}},{"type":"text","text":" 讀寫、網卡訪問、申請內存都不行,Linux系統僅採用ring 0 和 ring 3 這2個權限。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/b4/b4a7fad08868e4c7785c56be48264acd.png","alt":"","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"高情商","attrs":{}}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"ring 0被叫做內核態,完全在操作系統內核中運行","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"ring 3被叫做用戶態,在應用程序中運行","attrs":{}}]}]}],"attrs":{}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"低情商","attrs":{}}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"執行內核空間的代碼,具有ring 0保護級別,有對硬件的所有操作權限,可以執行所有","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"C P U 指令集","attrs":{}}],"attrs":{}},{"type":"text","text":",訪問任意地址的內存,在內核模式下的任何異常都是災難性的,將會導致整臺機器停機","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在用戶模式下,具有ring 3保護級別,代碼沒有對硬件的直接控制權限,也不能直接訪問地址的內存,程序是通過調用系統接口(System Call APIs)來達到訪問硬件和內存,在這種保護模式下,即時程序發生崩潰也是可以恢復的,在電腦上大部分程序都是在,用戶模式下運行的","attrs":{}}]}]}],"attrs":{}},{"type":"heading","attrs":{"align":null,"level":1},"content":[{"type":"link","attrs":{"href":"#用戶態與內核態","title":null,"type":null}},{"type":"text","text":"用戶態與內核態","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"通關了C P U 指令集權限,現在再說用戶態與內核態就十分簡單了,用戶態與內核態的概念就是C P U 指令集權限的區別,進程中要讀寫 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"I O","attrs":{}}],"attrs":{}},{"type":"text","text":",必然會用到 ring 0 級別的 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"C P U 指令集","attrs":{}}],"attrs":{}},{"type":"text","text":",而此時 C P U 的指令集操作權限只有 ring 3,爲了可以操作ring 0 級別的 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"C P U 指令集","attrs":{}}],"attrs":{}},{"type":"text","text":", C P U 切換指令集操作權限級別爲 ring 0,C P U再執行相應的ring 0 級別的 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"C P U 指令集","attrs":{}}],"attrs":{}},{"type":"text","text":"(內核代碼),執行的內核代碼會使用當前進程的內核棧。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"PS:每個進程都有兩個棧,分別是用戶棧與內核棧,對應用戶態與內核態的使用","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"link","attrs":{"href":"#用戶態與內核態的空間","title":null,"type":null}},{"type":"text","text":"用戶態與內核態的空間","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在內存資源上的使用,操作系統對用戶態與內核態也做了限制,每個進程創建都會分配「虛擬空間地址」(不懂可以參考我的另一篇文章“15分鐘!一文幫小白搞懂操作系統之內存”),以Linux32位操作系統爲例,它的尋址空間範圍是 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"4G","attrs":{}}],"attrs":{}},{"type":"text","text":"(2的32次方),而操作系統會把虛擬控制地址劃分爲兩部分,一部分爲內核空間,另一部分爲用戶空間,高位的 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"1G","attrs":{}}],"attrs":{}},{"type":"text","text":"(從虛擬地址 0xC0000000 到 0xFFFFFFFF)由內核使用,而低位的 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"3G","attrs":{}}],"attrs":{}},{"type":"text","text":"(從虛擬地址 0x00000000 到 0xBFFFFFFF)由各個進程使用。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/f0/f0452bc9208ce3fdc17d0957184ad3cd.png","alt":"","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"用戶態:只能操作 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"0-3G","attrs":{}}],"attrs":{}},{"type":"text","text":" 範圍的低位虛擬空間地址","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"內核態:","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"0-4G","attrs":{}}],"attrs":{}},{"type":"text","text":" 範圍的虛擬空間地址都可以操作,尤其是對 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"3-4G","attrs":{}}],"attrs":{}},{"type":"text","text":" 範圍的高位虛擬空間地址必須由內核態去操作","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"補充:","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"3G-4G","attrs":{}}],"attrs":{}},{"type":"text","text":" 部分大家是共享的(指所有進程的內核態邏輯地址是共享同一塊內存地址),是內核態的地址空間,這裏存放在整個內核的代碼和所有的內核模塊,以及內核所維護的數據","attrs":{}}]}]}],"attrs":{}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"每個進程的 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"4G","attrs":{}}],"attrs":{}},{"type":"text","text":" 虛擬空間地址,高位 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"1G","attrs":{}}],"attrs":{}},{"type":"text","text":" 都是一樣的,即內核空間。只有剩餘的 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"3G","attrs":{}}],"attrs":{}},{"type":"text","text":" 才歸進程自己使用,換句話說就是, 高位 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"1G","attrs":{}}],"attrs":{}},{"type":"text","text":" 的內核空間是被所有進程共享的!","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"最後做個小結,我們通過指令集權限區分用戶態和內核態,還限制了內存資源的使用,操作系統爲用戶態與內核態劃分了兩塊內存空間,給它們對應的指令集使用","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"link","attrs":{"href":"#用戶態與內核態的切換","title":null,"type":null}},{"type":"text","text":"用戶態與內核態的切換","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"相信大家都聽過這樣的話「用戶態和內核態切換的開銷大」,但是它的開銷大在那裏呢?簡單點來說有下面幾點","attrs":{}}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"保留用戶態現場(上下文、寄存器、用戶棧等)","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"複製用戶態參數,用戶棧切到內核棧,進入內核態","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"額外的檢查(因爲內核代碼對用戶不信任)","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"執行內核態代碼","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"複製內核態代碼執行結果,回到用戶態","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"恢復用戶態現場(上下文、寄存器、用戶棧等)","attrs":{}}]}]}],"attrs":{}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"實際上操作系統會比上述的更復雜,這裏只是個大概,我們可以發現一次切換經歷了「用戶態 -> 內核態 -> 用戶態」。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"用戶態要主動切換到內核態,那必須要有入口才行,實際上內核態是提供了統一的入口,下面是Linux整體架構圖","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/5d/5d8f8867129703f74530fa3e1767cfda.png","alt":"","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"從上圖我們可以看出來通過系統調用將Linux整個體系分爲用戶態和內核態,爲了使應用程序訪問到內核的資源,如CPU、內存、I/O,內核必須提供一組通用的訪問接口,這些接口就叫系統調用。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"庫函數就是屏蔽這些複雜的底層實現細節,減輕程序員的負擔,從而更加關注上層的邏輯實現,它對系統調用進行封裝,提供簡單的基本接口給程序員。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Shell顧名思義,就是外殼的意思,就好像把內核包裹起來的外殼,它是一種特殊的應用程序,俗稱命令行。Shell也是可編程的,它有標準的Shell 語法,符合其語法的文本叫Shell腳本,很多人都會用Shell腳本實現一些常用的功能,可以提高工作效率。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"最後來說說,什麼情況會導致用戶態到內核態切換","attrs":{}}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"系統調用:用戶態進程主動切換到內核態的方式,用戶態進程通過系統調用向操作系統申請資源完成工作,例如 fork()就是一個創建新進程的系統調用,系統調用的機制核心使用了操作系統爲用戶特別開放的一箇中斷來實現,如Linux 的 int 80h 中斷,也可以稱爲軟中斷","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"異常:當 C P U 在執行用戶態的進程時,發生了一些沒有預知的異常,這時當前運行進程會切換到處理此異常的內核相關進程中,也就是切換到了內核態,如缺頁異常","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"中斷:當 C P U 在執行用戶態的進程時,外圍設備完成用戶請求的操作後,會向 C P U 發出相應的中斷信號,這時 C P U 會暫停執行下一條即將要執行的指令,轉到與中斷信號對應的處理程序去執行,也就是切換到了內核態。如硬盤讀寫操作完成,系統會切換到硬盤讀寫的中斷處理程序中執行後邊的操作等。","attrs":{}}]}]}],"attrs":{}},{"type":"heading","attrs":{"align":null,"level":1},"content":[{"type":"link","attrs":{"href":"#關聯好文章推薦","title":null,"type":null}},{"type":"text","text":"關聯好文章推薦","attrs":{}}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https://mp.weixin.qq.com/s/J2XA86nKyodeTyTU2Q6W0g","title":null,"type":null},"content":[{"type":"text","text":"15分鐘!一文幫小白搞懂操作系統之內存","attrs":{}}]}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https://mp.weixin.qq.com/s/jhOSjVyRA6rNKqVT2pKMIQ","title":null,"type":null},"content":[{"type":"text","text":"進程、線程與協程傻傻分不清?一文帶你喫透!","attrs":{}}]}]}]}],"attrs":{}},{"type":"heading","attrs":{"align":null,"level":1},"content":[{"type":"link","attrs":{"href":"#關於我","title":null,"type":null}},{"type":"text","text":"關於我","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Hi這裏是阿星,一個熱愛技術的93年Java程序猿,在公衆號 ","attrs":{}},{"type":"text","marks":[{"type":"strong","attrs":{}}],"text":"「程序猿阿星」","attrs":{}},{"type":"text","text":" 裏將會定期分享操作系統、計算機網絡、Java、分佈式、數據庫等精品原創文章,2021,與您在 Be Better 的路上共同成長!。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"非常感謝各位人才能 看到這裏,創作不易,文章有幫助可以「點個贊」或「分享與評論」,都是支持(莫要白嫖)!","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"願你我都能奔赴在各自想去的路上,我們下篇文章見!","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/cd/cd93a342bb6bb4cd5478beb9f35689e0.png","alt":"","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章