

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、開發(fā)LinuxLinux兼容內核的策略與路線LinuxLinuxkerneldevelopmentstrategiescompatiblewiththeline毛德操Maudoperation筆者自從提出Linux兼容內核的構想以后,聽到了不少反響。SinceIproposedtheideaofLinuxcompatiblekernellaterIheardalotofrepercussions.其中支持者固然不乏其人,如開源軟件推進聯(lián)
2、盟主WhichiscertainlynoshtageofsuppterssuchastheOpenSourceSoftwarePromotionUnion席陸首群Ilthefirstgroup先生、倪光南院士、還有OSDL的平野正信先生,都是支持的。Mr.NiGuangnanacademiciansaswellasOSDLsMr.Hiranoisbelievedaresuppted.但是無庸諱言,對此不以為然的意見也有不少。Needle
3、sstosayhoweverdonotagreewiththeviewstherearemany.有趣的是,這些不以為然的意見往往分成兩個極端。Interestinglytheseviewsdisagreeoftendividedintotwoextremes.一個極端說,Linux兼容內核要達到的目標已經達到了,因此根本就不用多此一舉。AnextremethatLinuxcompatiblekerneltoachievehasbeen
4、achievedsothereisnoneedredundant.說已經達到,是因為在用戶空間我們已經有了Wine,而NdisWrapper則已經解決了把Windows設備驅動裝入Linux內核的問題。SaidtohavebeenreachedbecausewealreadyhaveintheuserspaceWinebutithasbeenresolvedNdisWrapperWindowsdevicedrivertoloadLinu
5、xkernelproblem.另一個極端呢,則是說兼容內核的難度太大,根本就不可能成功,所以只是一個“夢”。Theotherextremeitiscompatiblewiththekernelisthattoodifficultsimplycannotsucceedsoonlya“dream.“顯然,在談論開發(fā)路線圖之前首先應該回答這兩種意見。Obviouslytalkingabouttheroadmapshouldbeanswered
6、befethefirstofthesetwoviews.幸好它們正好互相構成回答。Ftunatelytheyarejustanotherfmanswer.首先,正如筆者在另幾篇文章中所說,Wine只是在邏輯上、功能上基本解決了用Linux內核來模擬仿真Windows內核的問題,但是性能上是無法令人滿意的,而且說基本上解決其實也很勉強。FirstasIhavesaidinotherarticlesWineisonlylogicalfunc
7、tionbasicallysolvedwiththeLinuxkerneltosimulateSimulationWindowskernelproblembutperfmanceisnotsatisfactythatbasicallysolutionisactuallyveryreluctant.至于NdisWrapper,它所解決的是一些網絡設備(網卡)的驅動,而不是普遍意義上的設備驅動。AsNdisWrapperitsolvedso
8、mewkdevice(NIC)drivernotthegeneralsenseofthedevicedriver.更何況NdisWrapper設備驅動的上層只能是Linux的Socket,而不能與諸多文件操作的系統(tǒng)調用掛上鉤。MeovertheupperNdisWrapperdevicedrivercanonlybeLinuxSocketnotwithalotoffilemanipulationsystemcallsprocessisl
9、inked.實際上,退一步說,即使NdisWrapper和Wine真的已經分黑盒子中,光憑幾本書能得到多少信息、如何就能開發(fā)出跟Windows兼容的內核?ToodifficultfthepeoplethatthereisaconcernthatisWindowsthecodeisnotpublichiddenintheblackboxevenwiththefewbookstogetmuchinfmationhowcandevelopco
10、mpatiblewiththeWindowskernel這種顧慮當然也有一些道理,但是ReactOS又在這方面給我們提供了參考。ThisconcernofcoursethereissometruthbutinthiscontextReactOShasprovideduswithinfmation.ReactOS以零為起點從頭開發(fā),Wine只在內核外面做文章,尚且都能在一定程度上達到設計目標,而我們站在它們的肩膀上,又有Linux內核作為
11、原材料,至少條件比他們好多了。ReactOStozeroasastartingpointfromscratchWineonlymakeanissueoutofthekernelyetitcanbetosomeextenttomeetthedesigngoalswestontheirshouldersanotherLinuxkernelasarawmaterialatleastmuchbetterconditionsthantheyare
12、.當然,把Wine、NdisWrapper和ReactOS作為參考意味著我們需要吃透、或者至少基本上理解它們的代碼。OfcoursetheWineNdisWrapperReactOSasareferencemeansthatweneedtounderstwellatleastbasicallyundersttheircode.為此筆者將陸續(xù)寫一些分析文章在本網站上推出,起個拋轉引玉的作用。TodothisIwillgraduallywr
13、iteanalyticalarticlesonthissitelaunchsincetheroleofaparabolicquotedYu.總之,兼容內核的開發(fā)既不是唾手可得,也不是難于上青天,既不能一蹴而就,也不至于遙遙無期。Inshtneithercompatiblewiththedevelopmentofthekernelisaneasynisitimpossiblefthecountywecannotbedoneovernigh
14、tyouwillnotbeputoffindefinitely.說起來還是那句老話:戰(zhàn)略上藐視困難,戰(zhàn)術上重視困難。Thatitisanoldsayinggoes:strategicdefianceofdifficultiestacticallydifficult.后發(fā)跟進、逐步逼近后發(fā)跟進、逐步逼近FollowupFollowupafterafterthethehairhairgraduallygraduallyapproaching
15、approaching我們開發(fā)兼容內核不能采取一步到位、而應采取逐步逼近的策略。Wehavedevelopedcompatiblewiththekernelcannottakeonestepbutshouldadoptagradualapproachofthestrategy.以系統(tǒng)調用界面為例,我們完全可以先擱置那些用于GUI、即win32k.sys的擴充系統(tǒng)調用,即便是對于248個常規(guī)系統(tǒng)調用也可以分期分批地實現。Thesystem
16、callinterfacefexamplewecansetasidethoseusedfthefirstGUIthewin32k.sysexpansionofsystemcallsevencallsftheconventionalsystem248canalsobeachievedinstages.實際上,我們甚至并無必要追求一個完整的實現。Infactweevendonotneedtopursueacompleteimplementa
17、tion.工程上有一個所謂2080原理,說是20%的工作量往往可以實現80%的功能,而剩下的20%功能卻往往需要80%的工作量才能實現。Wksonasocalled2080principlethatis20%ofthewkloadcanoftenachieve80%ofthefunctionwhiletheremaining20%ofthefeaturesareoftenrequiredtoachieve80%ofthewkload.如
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 眾賞文庫僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- Linux內核移植與USB驅動開發(fā).pdf
- linux內核
- linux0.11內核研究與內核編程實踐
- Linux內核開發(fā)者協(xié)作模式研究.pdf
- 基于Linux內核的打印機輔助系統(tǒng)的研究與開發(fā).pdf
- 基于數字簽名的Linux兼容內核上應用程序的安全機制.pdf
- 基于ep9315的linux2.6內核的bsp開發(fā)
- 基于Linux內核的無線視頻傳輸軟件平臺的研究與開發(fā).pdf
- linux內核(kemel)版本
- 基于Linux內核的實時數據轉發(fā)平臺的軟件研究與開發(fā).pdf
- 基于Linux內核的多進程應用程序的開發(fā).pdf
- 內核調為ie8(兼容)
- linux內核源代碼漫游
- 實驗5 linux內核的裁剪移植
- Linux內核實時性的研究與改進.pdf
- Linux內核實時性的研究與實踐.pdf
- 基于linux內核手機低功耗的研究與實現
- Linux內核安全測試的研究.pdf
- Linux操作系統(tǒng)內核分析與研究.pdf
- 深入分析linux內核鏈表
評論
0/150
提交評論