SlideShare una empresa de Scribd logo
1 de 33
Descargar para leer sin conexión
Linux Virtualization Goes
         Mobile

   Jim Huang ( 黃敬群 ) <jserv @ 0xlab.org>
                               Aug 15, 2009
                                  COSCUP
關於講者

宅色夫
宅色夫




                 自由軟體
                 ARM SoC
                   環保
                  Android


 搜尋結果洽好是本議程的提綱
昔有凱撒

我來,我見,我征服
I came, I saw, I conquered!
今有宅色夫

 我宅,我色,我舒服
I home, I suck, I comforted!
虛擬化兩大重點

我來,我見,我                 征服     Exec. Env. #1           Exec. Env. #2           Exec. Env. #3




I came, I saw, I conquered
                                                                                                    Main OS




                        舒服
                              Modified Guest OS      Modified Guest OS        Modified Guest OS



我宅,我色,我                       Virtual Hardware        Virtual Hardware         Virtual Hardware
                                                                                                  Para Modified
                                                                                                     Drivers
                                                  Virtual Machine Monitor


I home, I suck, I comforted                                      Hypervisor



                                                                  Hardware




             儘可能「征服」硬體 ( 充分使用系統資源 )
             軟體予以「舒服」 ( 提高使用比例與感受 )
Virtualization 技術很熱門,
但不是新玩意
Hypervisor: 早在 1967 年,即提出隔離
   Application 與 Hardware 的途徑
Virtualization 技術里程碑
                           1998                               2006
                                               2004
                 1972                                                                      2009
      1967                              2003                               2007
                                                      2005



                                                                                   2008

                         VMware              Trango            AMD-V
                          (x86)                               Virtual PC               Intel→ WindRiver
                VM/370 - 1st
             commercial product          Xen                 Open Kernel Labs
                                  VirtualLogix VLX                 OKL4
                                                                         Citrix→ Xen
                                              Intel VT-x, Intel VT-i
      CP-40                                                                 RedHat → KVM
 st
1 Full Virtualization                          NICTA L4 Microkernel +
                                               Qualcomm                     Sun → VirtualBox
   Hypervisor                                                               vmware→ Trango
                                                                            (VMware MVP)
Spam and virus      User tolerance for
                                 infected email
                                                     email downtime is
                                 account for over
                                 70% of all email    less than 30
                                 sent today          minutes


                            Security                Services



                                        Virtualization 技術的轉變:
                                        Embedded/Mobile


[2006] Toshiba W47T CDMA Phone

[2007] 3G phones from HTC, LG,                      Mobile
[2008] Samsung SPH-m800

[2008] Instinct™ and HTC Dream (G1) with Android

Source: Open Kernel Labs.

                  走入消費性
                  電子產品
那英《征服》
「就這樣被你征服 切斷了所有退路
 我的心情是堅固 我的決定是糊塗
 就這樣被你征服 喝下你藏好的毒
 我的劇情已落幕 我的愛恨已入土」
那英《征服》
「就這樣被你征服 切斷了所有退路
 我的心情是堅固 我的決定是糊塗
 就這樣被你征服 喝下你藏好的毒
 我的劇情已落幕 我的愛恨已入土」

 [ 佳句偶得 ]
切斷了所有退路 → Virtualization 的概念
喝下你藏好的毒 → Virtualization 的實做途徑
Virtual Machines
VM 允許在單一實體的機器上,運作多個
虛擬執行單元

App     App        App                  App        App
                                                         Xen
 Guest OS             Guest OS            Guest OS
  (Linux)             (NetBSD)            (Windows)
                                                         VMWare
      VM                 VM                   VM

      Virtual Machine Monitor (VMM) / Hypervisor
                                                         KVM

                      Hardware
                                                         QEMU
                                                         OKL4( 本議程探討對象 )


      切斷了所有退路 → Virtualization 的概念
      喝下你藏好的毒 → Virtualization 的實做途徑
• Hardware Virtualization                      • OS Virtualization
     VMM/Hypervisor Technology                     Virtualizes access to OS
     Virtualizes access to hardware                Single, standard OS kernel is
                                                     running per box
     Host OS and each guest has full OS –
      standard or special                           Connects natively to underlying
                                                     hardware
     VMware, Microsoft Virtual Server, XEN,
      Parallels                                     Virtuozzo, Sun Solaris Containers




         針對 Embedded/Mobile ,
        僅探討 Hardeware Virtualization



              切斷了所有退路 → Virtualization 的概念
              喝下你藏好的毒 → Virtualization 的實做途徑
A        A                    A        A        A        A     A




      OS              OS            OS                OS             OS



                           Virtualization Layer


                                Hardware


               What                                        Why

Abstraction                              提昇系統資源使用率
Partitioning                             提高安全性與平衡資源使用
Division/sharing                         縮短系統反應時間
Hypervisor                               God!
Full Virtualization




x86 硬體支援的多種保護模式
Paravirtualization
通用的作業系統中, user process 並非真的被隔離
1) 每個 process 對應到                                                              Address
                                                                              location in
   kernel memory ,而 kernel         Kernel mapping
                                                                               physical
                                                                               memory
   位址為所有 process 所共                                       Page Table
                                                      for kernel mapping
   享                               User mapping


2) 在 kernel mode                                               .
                                                               .
   中, kernel 可存取到任何                                            .
   page table ,當然包含                 Page Directory
                                                               .

   user process 的對應表
3) copy_from, copy_to                    page

                                                                           Address
                                                                           location
                                                                              in
                                         page                              physical
                                                        Page Table         memory
                                                     for user mapping


                                                           .
                             CR3
                                                           .
                                                           .
                                                           .
trapping kernel / user interactions
                          Trusted Process                                                               Kernel Space
                                                                           addr 2




               Linux Kernel       Interrupt Handler                   seal



                                                                                                      User Space
                                                                                                        of Process


                                                                                         data
                                unseal                                         addr 1
         Interposition                   TSC            Isolation
                                seal
                                            
    Hypervisor
                                                                                        Virtual Addr.




       Fast IPC 成為
    Embedded Hypervisor
        成敗的關鍵
等等,小小的手機跑什麼虛擬化?
Mobile/Consumer Electronics 生態改變
  隱藏的災難                 需要更彈性的設計




 大量引入客製化
                         難以預料的
 與 open source   產品設計
                          安全要求
     軟體




  component?             Executives?




                 Component 相互隔離
                 依據需求組合 Component
                 有彈性的組合與迴避複雜的授權爭議
LOVER = Linux Optimized for
                           Virtualization,
                       Embedded, and Realtime
                                 (OSDC.tw 2007)




OKLabs → OKL4 → L4 microkernel
WindRiver → Wind microkernel
TRANGO (now VMware MVP)
VirtualLogix VLX → Sun Microsystems Chorus
VMware MVP 讓你舒服!
               (video demo)




同時在Nokia N810 Tablet上執行WinCE與Android
Component 相互隔離
依據需求組合 Component
有彈性的組合與迴避複雜的授權爭議




         成本效益
         Time-to-Market
         (OKL4)
OKL4 introduces virtualization technology.
        OKL4 introduces virtualization technology.




 Qualcomm specific components:
 Qualcomm specific components:
OpenMAX, Qcamera, GPS, QCRIL
OpenMAX, Qcamera, GPS, QCRIL




                                                Android on
                                                Android on
                                            Qualcomm Platform
                                            Qualcomm Platform
                                                     (Source: QCT)
                                                      (Source: QCT)
Mobile/Consumer Electronics 生態改變
       隱藏的災難                     需要更彈性的設計




      大量引入客製化
                                    難以預料的
      與 open source    產品設計
                                     安全要求
          軟體




      component?                    Executives?




安全性
安全性
Mobile/Consumer Electronics 生態改變
         隱藏的災難                     需要更彈性的設計




        大量引入客製化
                                      難以預料的
        與 open source    產品設計
                                       安全要求
            軟體




        component?




複雜的授權
複雜的授權
Mobile/Consumer Electronics 生態改變
              隱藏的災難                     需要更彈性的設計




             大量引入客製化
                                            難以預料的
             與 open source    產品設計
                                             安全要求
                 軟體




             component?


                                               OKL4 on Openmoko demo
                                               OKL4 on Openmoko demo


                                      Smaller TCB
                                      Fault isolation
                                      Control access using caps
                                      Improves separation of trusted and
特製的 Driver
特製的 Driver                                    un-trusted subsystems
讓你舒服


   OKL4 特色:
   OKL4 特色:
  緊繃 (capability)
  緊繃 (capability)
 有彈性 (component)
 有彈性 (component)
 身手矯健 (Fast IPC)
 身手矯健 (Fast IPC)
 嬌小可愛 (10k LoC)      虛擬化
                     虛擬化
 嬌小可愛 (10k LoC)
 蘿莉 (10 years dev)
 蘿莉 (10 years dev)
免授權金 (BSD License)
免授權金 (BSD License)
隨時等你來開 .... 發
隨時等你來開 .... 發
OK:Linux
OK:Android
OK:Symbian
OK:Windows
Virtualization Goes Mobile
我來,我見,我征服                     切斷了所有退路 → Virtualization 的概念
                              喝下你藏好的毒 → Virtualization 的實做途徑
I came, I saw, I conquered

                               隱藏的災難                   需要更彈性的設計
我宅,我色,我舒服
I home, I suck, I comforted


                              大量引入客製化
                                                          難以預料的
                              與 open source   產品設計
                                                           安全要求
                                  軟體




                              component?                  Executives?
整體運算模式的轉變、多元的消費性電子產品設計需求
安全性要求、與 open source 軟體銜接、引入專屬技術
         與功能導向的運算
參考資料
• The Motorola Evoke QA4: A Case Study in Mobile Virtualization,
    Gernot Heiser, Open Kernel Labs, Inc.
• Embedded VMM for Portable Virtual Machines, Naveen Kalla,
    Patrice Guelah, and Scott R. Armstrong
• VMX Framework Performance and Power Management White
    Paper, VirtualMetrix, Inc.
• OKL4: http://en.wikipedia.org/wiki/OKL4
• OKLabs: http://www.ok-labs.com/
• L4HQ → L4 Community: http://l4hq.org/

Más contenido relacionado

La actualidad más candente (10)

Summer Project: Microkernel (2013)
Summer Project: Microkernel (2013)Summer Project: Microkernel (2013)
Summer Project: Microkernel (2013)
 
Taiwanese Experience in IT
Taiwanese Experience in ITTaiwanese Experience in IT
Taiwanese Experience in IT
 
Symantec system recovery 2011產品技術訓練
Symantec system recovery 2011產品技術訓練Symantec system recovery 2011產品技術訓練
Symantec system recovery 2011產品技術訓練
 
Symantec System Recovery 2011_0320
Symantec System Recovery 2011_0320Symantec System Recovery 2011_0320
Symantec System Recovery 2011_0320
 
Unity台北場優化分享 II
Unity台北場優化分享 IIUnity台北場優化分享 II
Unity台北場優化分享 II
 
Symantec Backup Exec 2012 產品介紹_0320
Symantec Backup Exec 2012 產品介紹_0320Symantec Backup Exec 2012 產品介紹_0320
Symantec Backup Exec 2012 產品介紹_0320
 
Ssr2011 for 三心二益
Ssr2011 for 三心二益Ssr2011 for 三心二益
Ssr2011 for 三心二益
 
Double take 6.0 實機體驗營
Double take 6.0 實機體驗營Double take 6.0 實機體驗營
Double take 6.0 實機體驗營
 
Tiny6410um hw-20101026
Tiny6410um hw-20101026Tiny6410um hw-20101026
Tiny6410um hw-20101026
 
Symantec Backup Exec 2012 產品技術訓練
Symantec Backup Exec 2012 產品技術訓練Symantec Backup Exec 2012 產品技術訓練
Symantec Backup Exec 2012 產品技術訓練
 

Similar a Linux Virtualization Goes Mobile

X86平台三种不同的虚拟化之路
X86平台三种不同的虚拟化之路X86平台三种不同的虚拟化之路
X86平台三种不同的虚拟化之路Jasson wong
 
关于服务器虚拟化的测试汇报
关于服务器虚拟化的测试汇报关于服务器虚拟化的测试汇报
关于服务器虚拟化的测试汇报博 孟
 
三通it学院-KVM虚拟化技术
三通it学院-KVM虚拟化技术三通it学院-KVM虚拟化技术
三通it学院-KVM虚拟化技术suncbing1
 
建國科大雲端中心成立記者會~與采威國際產學合作~Cafe 企業雲端伺服器演講講義
建國科大雲端中心成立記者會~與采威國際產學合作~Cafe 企業雲端伺服器演講講義建國科大雲端中心成立記者會~與采威國際產學合作~Cafe 企業雲端伺服器演講講義
建國科大雲端中心成立記者會~與采威國際產學合作~Cafe 企業雲端伺服器演講講義采威國際
 
BAS010_虛擬化基礎_v190330 (View online)
BAS010_虛擬化基礎_v190330 (View online)BAS010_虛擬化基礎_v190330 (View online)
BAS010_虛擬化基礎_v190330 (View online)rwp99346
 
BAS010_虛擬化基礎_v190330
BAS010_虛擬化基礎_v190330BAS010_虛擬化基礎_v190330
BAS010_虛擬化基礎_v190330rwp99346
 
WIN2003 - 介紹 V Mware, 並實地操作
WIN2003 - 介紹 V Mware, 並實地操作WIN2003 - 介紹 V Mware, 並實地操作
WIN2003 - 介紹 V Mware, 並實地操作阿狗 郭
 
Windows Azure Virtual Machine Services for Developers
Windows Azure Virtual Machine Services for DevelopersWindows Azure Virtual Machine Services for Developers
Windows Azure Virtual Machine Services for DevelopersJeff Chu
 
BAS010_虛擬化基礎_v190325-Draft
BAS010_虛擬化基礎_v190325-DraftBAS010_虛擬化基礎_v190325-Draft
BAS010_虛擬化基礎_v190325-Draftrwp99346
 
方建国 -V mware-ha实战1
方建国 -V mware-ha实战1方建国 -V mware-ha实战1
方建国 -V mware-ha实战1landece
 
透明计算与云计算
透明计算与云计算透明计算与云计算
透明计算与云计算longhao
 
Acronis iomega文件备份和虚拟机数据保护方案
Acronis iomega文件备份和虚拟机数据保护方案Acronis iomega文件备份和虚拟机数据保护方案
Acronis iomega文件备份和虚拟机数据保护方案yeung_kevin
 
虚拟化环境下文件系统性能研究
虚拟化环境下文件系统性能研究虚拟化环境下文件系统性能研究
虚拟化环境下文件系统性能研究博 孟
 
虎尾科大報告
虎尾科大報告虎尾科大報告
虎尾科大報告琮凱 蘇
 
VMware如何使用,最好用的虚拟机,VMware有哪些功能?关于虚拟机V...
VMware如何使用,最好用的虚拟机,VMware有哪些功能?关于虚拟机V...VMware如何使用,最好用的虚拟机,VMware有哪些功能?关于虚拟机V...
VMware如何使用,最好用的虚拟机,VMware有哪些功能?关于虚拟机V...wensheng wei
 
从网格计算到云计算
从网格计算到云计算从网格计算到云计算
从网格计算到云计算Riquelme624
 
賽門鐵克 VMware 完整解決方案
賽門鐵克 VMware 完整解決方案賽門鐵克 VMware 完整解決方案
賽門鐵克 VMware 完整解決方案Wales Chen
 
云计算与开源 刘黎明 世纪互联
云计算与开源  刘黎明  世纪互联云计算与开源  刘黎明  世纪互联
云计算与开源 刘黎明 世纪互联Liming Liu
 

Similar a Linux Virtualization Goes Mobile (20)

X86平台三种不同的虚拟化之路
X86平台三种不同的虚拟化之路X86平台三种不同的虚拟化之路
X86平台三种不同的虚拟化之路
 
Hyper V Final
Hyper  V FinalHyper  V Final
Hyper V Final
 
关于服务器虚拟化的测试汇报
关于服务器虚拟化的测试汇报关于服务器虚拟化的测试汇报
关于服务器虚拟化的测试汇报
 
三通it学院-KVM虚拟化技术
三通it学院-KVM虚拟化技术三通it学院-KVM虚拟化技术
三通it学院-KVM虚拟化技术
 
建國科大雲端中心成立記者會~與采威國際產學合作~Cafe 企業雲端伺服器演講講義
建國科大雲端中心成立記者會~與采威國際產學合作~Cafe 企業雲端伺服器演講講義建國科大雲端中心成立記者會~與采威國際產學合作~Cafe 企業雲端伺服器演講講義
建國科大雲端中心成立記者會~與采威國際產學合作~Cafe 企業雲端伺服器演講講義
 
BAS010_虛擬化基礎_v190330 (View online)
BAS010_虛擬化基礎_v190330 (View online)BAS010_虛擬化基礎_v190330 (View online)
BAS010_虛擬化基礎_v190330 (View online)
 
BAS010_虛擬化基礎_v190330
BAS010_虛擬化基礎_v190330BAS010_虛擬化基礎_v190330
BAS010_虛擬化基礎_v190330
 
WIN2003 - 介紹 V Mware, 並實地操作
WIN2003 - 介紹 V Mware, 並實地操作WIN2003 - 介紹 V Mware, 並實地操作
WIN2003 - 介紹 V Mware, 並實地操作
 
Windows Azure Virtual Machine Services for Developers
Windows Azure Virtual Machine Services for DevelopersWindows Azure Virtual Machine Services for Developers
Windows Azure Virtual Machine Services for Developers
 
BAS010_虛擬化基礎_v190325-Draft
BAS010_虛擬化基礎_v190325-DraftBAS010_虛擬化基礎_v190325-Draft
BAS010_虛擬化基礎_v190325-Draft
 
方建国 -V mware-ha实战1
方建国 -V mware-ha实战1方建国 -V mware-ha实战1
方建国 -V mware-ha实战1
 
透明计算与云计算
透明计算与云计算透明计算与云计算
透明计算与云计算
 
Acronis iomega文件备份和虚拟机数据保护方案
Acronis iomega文件备份和虚拟机数据保护方案Acronis iomega文件备份和虚拟机数据保护方案
Acronis iomega文件备份和虚拟机数据保护方案
 
虚拟化环境下文件系统性能研究
虚拟化环境下文件系统性能研究虚拟化环境下文件系统性能研究
虚拟化环境下文件系统性能研究
 
虎尾科大報告
虎尾科大報告虎尾科大報告
虎尾科大報告
 
VMware如何使用,最好用的虚拟机,VMware有哪些功能?关于虚拟机V...
VMware如何使用,最好用的虚拟机,VMware有哪些功能?关于虚拟机V...VMware如何使用,最好用的虚拟机,VMware有哪些功能?关于虚拟机V...
VMware如何使用,最好用的虚拟机,VMware有哪些功能?关于虚拟机V...
 
从网格计算到云计算
从网格计算到云计算从网格计算到云计算
从网格计算到云计算
 
賽門鐵克 VMware 完整解決方案
賽門鐵克 VMware 完整解決方案賽門鐵克 VMware 完整解決方案
賽門鐵克 VMware 完整解決方案
 
云计算与开源 刘黎明 世纪互联
云计算与开源  刘黎明  世纪互联云计算与开源  刘黎明  世纪互联
云计算与开源 刘黎明 世纪互联
 
Wang Chao
Wang ChaoWang Chao
Wang Chao
 

Más de National Cheng Kung University

PyPy's approach to construct domain-specific language runtime
PyPy's approach to construct domain-specific language runtimePyPy's approach to construct domain-specific language runtime
PyPy's approach to construct domain-specific language runtimeNational Cheng Kung University
 
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明National Cheng Kung University
 
給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明
給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明
給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明National Cheng Kung University
 
進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明
進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明
進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明National Cheng Kung University
 
Develop Your Own Operating Systems using Cheap ARM Boards
Develop Your Own Operating Systems using Cheap ARM BoardsDevelop Your Own Operating Systems using Cheap ARM Boards
Develop Your Own Operating Systems using Cheap ARM BoardsNational Cheng Kung University
 
Lecture notice about Embedded Operating System Design and Implementation
Lecture notice about Embedded Operating System Design and ImplementationLecture notice about Embedded Operating System Design and Implementation
Lecture notice about Embedded Operating System Design and ImplementationNational Cheng Kung University
 
中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學
中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學
中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學National Cheng Kung University
 
F9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded SystemsF9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded SystemsNational Cheng Kung University
 

Más de National Cheng Kung University (20)

PyPy's approach to construct domain-specific language runtime
PyPy's approach to construct domain-specific language runtimePyPy's approach to construct domain-specific language runtime
PyPy's approach to construct domain-specific language runtime
 
Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
2016 年春季嵌入式作業系統課程說明
2016 年春季嵌入式作業系統課程說明2016 年春季嵌入式作業系統課程說明
2016 年春季嵌入式作業系統課程說明
 
Interpreter, Compiler, JIT from scratch
Interpreter, Compiler, JIT from scratchInterpreter, Compiler, JIT from scratch
Interpreter, Compiler, JIT from scratch
 
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明
 
Construct an Efficient and Secure Microkernel for IoT
Construct an Efficient and Secure Microkernel for IoTConstruct an Efficient and Secure Microkernel for IoT
Construct an Efficient and Secure Microkernel for IoT
 
The Internals of "Hello World" Program
The Internals of "Hello World" ProgramThe Internals of "Hello World" Program
The Internals of "Hello World" Program
 
Virtual Machine Constructions for Dummies
Virtual Machine Constructions for DummiesVirtual Machine Constructions for Dummies
Virtual Machine Constructions for Dummies
 
給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明
給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明
給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明
 
從線上售票看作業系統設計議題
從線上售票看作業系統設計議題從線上售票看作業系統設計議題
從線上售票看作業系統設計議題
 
進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明
進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明
進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明
 
Xvisor: embedded and lightweight hypervisor
Xvisor: embedded and lightweight hypervisorXvisor: embedded and lightweight hypervisor
Xvisor: embedded and lightweight hypervisor
 
Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
Implement Runtime Environments for HSA using LLVM
Implement Runtime Environments for HSA using LLVMImplement Runtime Environments for HSA using LLVM
Implement Runtime Environments for HSA using LLVM
 
Priority Inversion on Mars
Priority Inversion on MarsPriority Inversion on Mars
Priority Inversion on Mars
 
Develop Your Own Operating Systems using Cheap ARM Boards
Develop Your Own Operating Systems using Cheap ARM BoardsDevelop Your Own Operating Systems using Cheap ARM Boards
Develop Your Own Operating Systems using Cheap ARM Boards
 
Lecture notice about Embedded Operating System Design and Implementation
Lecture notice about Embedded Operating System Design and ImplementationLecture notice about Embedded Operating System Design and Implementation
Lecture notice about Embedded Operating System Design and Implementation
 
Explore Android Internals
Explore Android InternalsExplore Android Internals
Explore Android Internals
 
中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學
中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學
中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學
 
F9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded SystemsF9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
 

Linux Virtualization Goes Mobile

  • 1. Linux Virtualization Goes Mobile Jim Huang ( 黃敬群 ) <jserv @ 0xlab.org> Aug 15, 2009 COSCUP
  • 3. 宅色夫 自由軟體 ARM SoC 環保 Android 搜尋結果洽好是本議程的提綱
  • 6. 虛擬化兩大重點 我來,我見,我 征服 Exec. Env. #1 Exec. Env. #2 Exec. Env. #3 I came, I saw, I conquered Main OS 舒服 Modified Guest OS Modified Guest OS Modified Guest OS 我宅,我色,我 Virtual Hardware Virtual Hardware Virtual Hardware Para Modified Drivers Virtual Machine Monitor I home, I suck, I comforted Hypervisor Hardware 儘可能「征服」硬體 ( 充分使用系統資源 ) 軟體予以「舒服」 ( 提高使用比例與感受 )
  • 8. Hypervisor: 早在 1967 年,即提出隔離 Application 與 Hardware 的途徑
  • 9. Virtualization 技術里程碑 1998 2006 2004 1972 2009 1967 2003 2007 2005 2008 VMware Trango AMD-V (x86) Virtual PC Intel→ WindRiver VM/370 - 1st commercial product Xen Open Kernel Labs VirtualLogix VLX OKL4 Citrix→ Xen Intel VT-x, Intel VT-i CP-40 RedHat → KVM st 1 Full Virtualization NICTA L4 Microkernel + Qualcomm Sun → VirtualBox Hypervisor vmware→ Trango (VMware MVP)
  • 10. Spam and virus User tolerance for infected email email downtime is account for over 70% of all email less than 30 sent today minutes Security Services Virtualization 技術的轉變: Embedded/Mobile [2006] Toshiba W47T CDMA Phone [2007] 3G phones from HTC, LG, Mobile [2008] Samsung SPH-m800 [2008] Instinct™ and HTC Dream (G1) with Android Source: Open Kernel Labs. 走入消費性 電子產品
  • 12. 那英《征服》 「就這樣被你征服 切斷了所有退路 我的心情是堅固 我的決定是糊塗 就這樣被你征服 喝下你藏好的毒 我的劇情已落幕 我的愛恨已入土」 [ 佳句偶得 ] 切斷了所有退路 → Virtualization 的概念 喝下你藏好的毒 → Virtualization 的實做途徑
  • 13. Virtual Machines VM 允許在單一實體的機器上,運作多個 虛擬執行單元 App App App App App Xen Guest OS Guest OS Guest OS (Linux) (NetBSD) (Windows) VMWare VM VM VM Virtual Machine Monitor (VMM) / Hypervisor KVM Hardware QEMU OKL4( 本議程探討對象 ) 切斷了所有退路 → Virtualization 的概念 喝下你藏好的毒 → Virtualization 的實做途徑
  • 14. • Hardware Virtualization • OS Virtualization  VMM/Hypervisor Technology  Virtualizes access to OS  Virtualizes access to hardware  Single, standard OS kernel is running per box  Host OS and each guest has full OS – standard or special  Connects natively to underlying hardware  VMware, Microsoft Virtual Server, XEN, Parallels  Virtuozzo, Sun Solaris Containers 針對 Embedded/Mobile , 僅探討 Hardeware Virtualization 切斷了所有退路 → Virtualization 的概念 喝下你藏好的毒 → Virtualization 的實做途徑
  • 15. A A A A A A A OS OS OS OS OS Virtualization Layer Hardware What Why Abstraction 提昇系統資源使用率 Partitioning 提高安全性與平衡資源使用 Division/sharing 縮短系統反應時間 Hypervisor God!
  • 18. 通用的作業系統中, user process 並非真的被隔離 1) 每個 process 對應到 Address location in kernel memory ,而 kernel Kernel mapping physical memory 位址為所有 process 所共 Page Table for kernel mapping 享 User mapping 2) 在 kernel mode . . 中, kernel 可存取到任何 . page table ,當然包含 Page Directory . user process 的對應表 3) copy_from, copy_to page Address location in page physical Page Table memory for user mapping . CR3 . . .
  • 19. trapping kernel / user interactions Trusted Process Kernel Space addr 2   Linux Kernel Interrupt Handler seal   User Space of Process   data unseal addr 1 Interposition TSC Isolation  seal  Hypervisor Virtual Addr. Fast IPC 成為 Embedded Hypervisor 成敗的關鍵
  • 21. Mobile/Consumer Electronics 生態改變 隱藏的災難 需要更彈性的設計 大量引入客製化 難以預料的 與 open source 產品設計 安全要求 軟體 component? Executives? Component 相互隔離 依據需求組合 Component 有彈性的組合與迴避複雜的授權爭議
  • 22. LOVER = Linux Optimized for Virtualization, Embedded, and Realtime (OSDC.tw 2007) OKLabs → OKL4 → L4 microkernel WindRiver → Wind microkernel TRANGO (now VMware MVP) VirtualLogix VLX → Sun Microsystems Chorus
  • 23. VMware MVP 讓你舒服! (video demo) 同時在Nokia N810 Tablet上執行WinCE與Android
  • 25. OKL4 introduces virtualization technology. OKL4 introduces virtualization technology. Qualcomm specific components: Qualcomm specific components: OpenMAX, Qcamera, GPS, QCRIL OpenMAX, Qcamera, GPS, QCRIL Android on Android on Qualcomm Platform Qualcomm Platform (Source: QCT) (Source: QCT)
  • 26.
  • 27. Mobile/Consumer Electronics 生態改變 隱藏的災難 需要更彈性的設計 大量引入客製化 難以預料的 與 open source 產品設計 安全要求 軟體 component? Executives? 安全性 安全性
  • 28. Mobile/Consumer Electronics 生態改變 隱藏的災難 需要更彈性的設計 大量引入客製化 難以預料的 與 open source 產品設計 安全要求 軟體 component? 複雜的授權 複雜的授權
  • 29. Mobile/Consumer Electronics 生態改變 隱藏的災難 需要更彈性的設計 大量引入客製化 難以預料的 與 open source 產品設計 安全要求 軟體 component? OKL4 on Openmoko demo OKL4 on Openmoko demo Smaller TCB Fault isolation Control access using caps Improves separation of trusted and 特製的 Driver 特製的 Driver un-trusted subsystems
  • 30. 讓你舒服 OKL4 特色: OKL4 特色: 緊繃 (capability) 緊繃 (capability) 有彈性 (component) 有彈性 (component) 身手矯健 (Fast IPC) 身手矯健 (Fast IPC) 嬌小可愛 (10k LoC) 虛擬化 虛擬化 嬌小可愛 (10k LoC) 蘿莉 (10 years dev) 蘿莉 (10 years dev) 免授權金 (BSD License) 免授權金 (BSD License) 隨時等你來開 .... 發 隨時等你來開 .... 發
  • 32. Virtualization Goes Mobile 我來,我見,我征服 切斷了所有退路 → Virtualization 的概念 喝下你藏好的毒 → Virtualization 的實做途徑 I came, I saw, I conquered 隱藏的災難 需要更彈性的設計 我宅,我色,我舒服 I home, I suck, I comforted 大量引入客製化 難以預料的 與 open source 產品設計 安全要求 軟體 component? Executives? 整體運算模式的轉變、多元的消費性電子產品設計需求 安全性要求、與 open source 軟體銜接、引入專屬技術 與功能導向的運算
  • 33. 參考資料 • The Motorola Evoke QA4: A Case Study in Mobile Virtualization, Gernot Heiser, Open Kernel Labs, Inc. • Embedded VMM for Portable Virtual Machines, Naveen Kalla, Patrice Guelah, and Scott R. Armstrong • VMX Framework Performance and Power Management White Paper, VirtualMetrix, Inc. • OKL4: http://en.wikipedia.org/wiki/OKL4 • OKLabs: http://www.ok-labs.com/ • L4HQ → L4 Community: http://l4hq.org/