注册 登录
自由的生活_软路由 返回首页

心想事成的个人空间 https://bbs.routerclub.com/?681 [收藏] [复制] [分享] [RSS]

日志

Kernel Mode Linux : Execute user processes in kernel mode

已有 928 次阅读2011-5-15 23:52 |个人分类:内核|

http://web.yl.is.s.u-tokyo.ac.jp/~tosh/kml/

以内核模式运行用户空间程序的补丁,应该会大量提高性能

Kernel Mode Linux is a technology which enables us to execute user programs in kernel mode. In Kernel Mode Linux, user programs can be executed as user processes that have the privilege level of kernel mode. The benefit of executing user programs in kernel mode is that the user programs can access a kernel address space directly. So, for example, user programs can invoke system calls very fast because it is unnecessary to switch between a kernel mode and a user mode by using costly software interruptions or context switches. Unlike kernel modules, user programs are executed as ordinary processes (except for their privilege level), so scheduling and paging are performed as usual.

Although it seems dangerous to let user programs access a kernel directly, safety of the kernel can be ensured, for example, by static type checking, software fault isolation, and so forth. For proof of concept, we are developing a system which is based on the combination of Kernel Mode Linux and Typed Assembly Language, TAL. (TAL can ensure safety of programs through its type checking and the type checking can be done at machine binary level. For more information about TAL, see TAL's page.)

Currently, IA-32, AMD64, and MicroBlaze are supported.

Limitations:

User processes executed in kernel mode should obey the following limitations. Otherwise, your system will be in an undefined state. In the worst-case scenario, your system will crash.

  • On IA-32, programs executed in kernel mode shouldn't modify their CS, DS, FS and SS registers.
  • On AMD64, programs executed in kernel mode shouldn't modify their CS register.
In addition, on AMD64, IA-32 binaries cannot be executed in kernel mode. Moreover, KML will not work as (fully-virtualized) IA-32 guests on hardware-assisted AMD64 virtual machine monitors. (Please note that it does work as AMD64 guests on the hardware-assisted VMM.)

路过

雷人

握手

鲜花

鸡蛋

评论 (0 个评论)

facelist doodle 涂鸦板

您需要登录后才可以评论 登录 | 注册

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-5-7 00:17 , Processed in 0.055911 second(s), 6 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

返回顶部