
6411c04840de6b9810fa8930b053a9f7.ppt
- Количество слайдов: 20
嵌入式操作系统研究简介 (部分举例) 陈香兰 2008. 3. 5 University of Science and Technology of China
提纲 嵌入式操作系统的多样性 n 嵌入式内存扩容技术举例 n University of Science and Technology of China 2
嵌入式市场的多样性导致嵌入式操作系统 的多样性 信息家电 军事方面 n 嵌入式Internet应用 University of Science and Technology of China 3
嵌入式微处理器 n 1000多种硬件处理器,MPU、MCU、DSP、 SOC l ARM RISC Ø ARM l TMS 320 DSP Ø TI l Trimedia Ø Philips l Strong. ARM Ø Intel, ru SA 1110 (已被PXA 250替代) l Xscale Ø Intel,ARM V 5 TE兼容产品,如PXA 250 l MIPS RISC Ø MIPS l Dragon. Ball Ø Motorala University of Science and Technology of China 4
典型的嵌入式操作系统 近 200种操作系统,Vx. Works,QNX, Win. CE,Palm OS n 面向SOC的RTOS:Symbian的Epoc、 ATI的Nucleus、Express logic的Threadx n 开放源码的OS:u. CLinux,u. C/OS, RTEMS n 典型性能指标: n 内核大小:几K~几百K l 调度时间片:几十ms l 实时进程/线程响应时间: 20~40 us? l 普通进程响应时间: 20 us~几百ms? l University of Science and Technology of China 5
嵌入式操作系统的多样性 n n n 多地址空间 vs. 单地址空间 有MMU vs. 没有MMU 多进程 vs. 单进程多线程 多用户 vs. 单用户 模块化+动态加载 vs. 静态联编 标准C库支持 vs. 部分C库支持 是否可配置 是否可移植 是否易编程 是否支持实时调度 低功耗 University of Science and Technology of China 6
嵌入式内存压缩技术研究 n L. Yang, R. P. Dick, H. Lekatsas, and S. Chakradhar, “CRAMES: Compressed RAM for Embedded Systems, ” Proc. Int. Conf. Hardware/Software Codesign and System Synthesis, pp. 93– 98, Sep. 2005. Notes: NEC used this technology in their cellphones in June 2007. l Operating system technique to double usable memory in embedded systems without changing applications, or hardware, and with little or no performance or power penalty. l l 已获专利 University of Science and Technology of China 7
n motivation: 内存是稀缺资源,没有硬盘提供交换区 l 在嵌入式环境中,加大内存 l Ø 增加成本 Ø 增加体积、功耗 l n 硬件设计赶不上应用的变化 解决思路 不增加硬件、不改变硬件 l 在现有内存容量的基础上,动态增加有效的内存容量 l n 方法: l n 压缩,利用交换技术和缺页技术 限制:需要MMU的支持 University of Science and Technology of China 8
n Main problems l l l Does the technique allow existing applications to execute without performance and energy consumption penalties? Can new applications with working data sets that were originally too large for physical memory be automatically made to execute smoothly? What compression algorithm should be used, and when should compression and decompression be performed? How should the compressed RAM area be managed to minimize memory overhead? How should the technique be evaluated for use in embedded systems? University of Science and Technology of China 9
n Methods Take advantage of the operating system (OS) virtual memory swapping mechanism l Multiple compression techniques and memory allocation methods were experimentally evaluated; l Ø Bzip 2,zlib default, zlib level 1, zlib level 9, RLE, LZRW 1 A, LZO l n Dynamically adjust the size of the compressed area during operation based on the amount of memory required Implementation a loadable Linux kernel module l This technique can easily be ported to other modern OSs. l University of Science and Technology of China 10
University of Science and Technology of China 11
不带MMU的内存扩展技术 n L. Bai, L. Yang, and R. P. Dick, “Automated Compile-Time and Run-Time Techniques to Increase Usable Memory in MMU-Less Embedded Systems, ” in Proc. Int. Conf. Compilers, Architecture & Synthesis for Embedded Systems, pp. 125– 135, Oct. 2006. l Notes: Compiler-assisted on-line data compression technique permits substantial increases in usable memory on MMU-less embedded systems, such as sensor network nodes. University of Science and Technology of China 12
n motivation: l n 分析: l n 内存是稀缺资源,没有MMU What MMU does? 思路: Software MMU (MEMMU) l 压缩 l n 方法: Compile-time compress l Runtime uncompress l n 适用于: 内存非常小的系统,而且不带MMU l 例如:无线传感器 l University of Science and Technology of China 13
n Main problem: Transparent to user l Intelligently determine which pages to compress and when to compress them to minimize performance and energy penalties. l Ø This is particularly challenging for low-end embedded systems without MMUs. Control the organization of compressed and uncompressed memory regions and the migration of data between them to maximize the increase in usable memory while minimizing performance and energy penalties. l Design a compression algorithm that has l Ø low performance overhead, Ø low memory requirements, Ø and a good compression ratio University of Science and Technology of China 14
method n MEMMU divides physical RAM into three regions: l the reserved region, Ø OS,MEMMU l the compressed region, Ø application l and the uncompressed region. Ø Application n the size of each region is decided by compile-time analysis of application memory requirements l and estimated compression ratio. l University of Science and Technology of China 15
The application view n With MEMMU Software-maintained University of Science and Technology of China 16
n Handle-based Data Access Virtual address page num l Mapping array l If maps to uncompressed region, … 2. If has not been accessed before (no mapping) 1. Ø Allocate an uncompressed page, and map Ø May be need replacement 3. If maps to compressed region Ø Decompressed, move, new map Ø May be need replacement University of Science and Technology of China 17
n To be transparent: Those routines runtime library l Need compiler transformations l n 换入/换出 抖动? n 压缩区域,页面大小不一致 碎片? University of Science and Technology of China 18
University of Science and Technology of China 19
交换技术和缺页技术 虚拟空间 物理内存 交换区 换入 换出 缺页 MMU,TLB,页表 University of Science and Technology of China 20
6411c04840de6b9810fa8930b053a9f7.ppt