日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關咨詢
選擇下列產品馬上在線溝通
服務時間:8:30-17:00
你可能遇到了下面的問題
關閉右側工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
驚動大神的JavaScript:在Web上運行Linux

一個叫Fabrice Bellard的程序員寫了一段Javascript在Web瀏覽器中啟動Linux(原網(wǎng)頁,我把這個網(wǎng)頁iframe在了下面),目前,你只能使用Firefox 4和Chrome 11運行這個Linux。這不是什么假的模仿Linux的東西,這是實實在在的運行一個Linux。這一舉動還引起了很多很牛人的關注,包括Javascript的創(chuàng)建者Brendan Eich。

網(wǎng)站建設哪家好,找創(chuàng)新互聯(lián)建站!專注于網(wǎng)頁設計、網(wǎng)站建設、微信開發(fā)、微信小程序、集團企業(yè)網(wǎng)站建設等服務項目。為回饋新老客戶創(chuàng)新互聯(lián)還提供了喀什免費建站歡迎大家使用!

 
 
 
  1.  
  2. IP route cache hash table entries: 1024 (order: 0, 4096 bytes)                    
  3. TCP established hash table entries: 1024 (order: 0, 4096 bytes)                   
  4. TCP bind hash table entries: 512 (order: -1, 2048 bytes)                          
  5. TCP: Hash tables configured (established 1024 bind 512)                           
  6. TCP reno registered                                                               
  7. checking if image is initramfs...it isn't (bad gzip magic numbers); looks like a  
  8. n initrd                                                                          
  9. Freeing initrd memory: 2048k freed                                                
  10. Total HugeTLB memory allocated, 0                                                 
  11. io scheduler noop registered                                                      
  12. io scheduler anticipatory registered                                              
  13. io scheduler deadline registered                                                  
  14. io scheduler cfq registered (default)                                             
  15. Real Time Clock Driver v1.12ac                                                    
  16. JS clipboard: I/O at 0x03c0                                                       
  17. Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled         
  18. serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16450                               
  19. RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize             
  20. loop: loaded (max 8 devices)                                                      
  21. TCP cubic registered                                                              
  22. NET: Registered protocol family 1                                                 
  23. NET: Registered protocol family 17                                                
  24. Using IPI Shortcut mode                                                           
  25. Time: pit clocksource has been installed.                                         
  26. RAMDISK: ext2 filesystem found at block 0                                         
  27. RAMDISK: Loading 2048KiB [1 disk] into ram disk... done.                          
  28. VFS: Mounted root (ext2 filesystem).                                              
  29. Freeing unused kernel memory: 124k freed                                          
  30. W  
  31. IP route cache hash table entries: 1024 (order: 0, 4096 bytes)                    
  32. TCP established hash table entries: 1024 (order: 0, 4096 bytes)                   
  33. TCP bind hash table entries: 512 (order: -1, 2048 bytes)                          
  34. TCP: Hash tables configured (established 1024 bind 512)                           
  35. TCP reno registered                                                               
  36. checking if image is initramfs...it isn't (bad gzip magic numbers); looks like a  
  37. n initrd                                                                          
  38. Freeing initrd memory: 2048k freed                                                
  39. Total HugeTLB memory allocated, 0                                                 
  40. io scheduler noop registered                                                      
  41. io scheduler anticipatory registered                                              
  42. io scheduler deadline registered                                                  
  43. io scheduler cfq registered (default)                                             
  44. Real Time Clock Driver v1.12ac                                                    
  45. JS clipboard: I/O at 0x03c0                                                       
  46. Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled         
  47. serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16450                               
  48. RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize             
  49. loop: loaded (max 8 devices)                                                      
  50. TCP cubic registered                                                              
  51. NET: Registered protocol family 1                                                 
  52. NET: Registered protocol family 17                                                
  53. Using IPI Shortcut mode                                                           
  54. Time: pit clocksource has been installed.                                         
  55. RAMDISK: ext2 filesystem found at block 0                                         
  56. RAMDISK: Loading 2048KiB [1 disk] into ram disk... done.                          
  57. VFS: Mounted root (ext2 filesystem).                                              
  58. Freeing unused kernel memory: 124k freed                                          
  59. Welcome to JS/Linux  

隨后,F(xiàn)abrice Bellard發(fā)布了相關的技術說明:http://bellard.org/jslinux/tech.html,從這份文檔中我們可以看到:

這個模似器完全由Javascript寫成

CPU仿真器使用的是QEMU(接近于原古的486),為了裝上Linux,其做了一些改動。

Javascript的終端本來可以使用termlib,但他還是自己寫了一個,因為OS的按鍵和Web瀏覽器不一樣(here)

Linux 使用了2.6.20內核,編譯配置在這里,并做了一些小改動。

磁盤用的是Ram Disk,在啟動的時候裝載。其文件系統(tǒng)由Buildroot 和BusyBox產生。

在Home目錄下有一個hello.c的程序,你可以使用TinyCC編譯(tcc,參看酷殼的這篇文章)

從這個事我有這些感觸,

在Web上運行一個Linux的操作系統(tǒng)不是問題。那么在Web上還有什么不能做的嗎?

Linux真是性能很高,在Javascript下運行感覺也不慢啊。

真是Techno-Geek。

原文鏈接:http://coolshell.cn/articles/4722.html#more-4722

【編輯推薦】

  1. 19個很有用的JavaScript庫強烈推薦
  2. 15款超棒的JavaScript開發(fā)工具推薦
  3. 從零開始學習jQuery之你必須知道的JavaScript
  4. 高性能WEB開發(fā)之如何加載JavaScript
  5. 泄露你的JavaScript技術很爛的五個表現(xiàn)

分享文章:驚動大神的JavaScript:在Web上運行Linux
轉載來源:http://m.5511xx.com/article/djhejcs.html