【24h】

A Declarative Language Approach to Device Configuration

机译:设备配置的声明性语言方法

获取原文
获取原文并翻译 | 示例
获取外文期刊封面目录资料

摘要

C remains the language of choice for hardware programming (device drivers, bus configuration, etc.): it is fast, allows low-level access, and is trusted by OS developers. However, the algorithms required to configure and reconfigure hardware devices and interconnects are becoming more complex and diverse, with the added burden of legacy support, "quirks", and hardware bugs to work around. Even programming PCI bridges in a modern PC is a surprisingly complex problem, and is getting worse as new functionality such as hotplug appears. Existing approaches use relatively simple algorithms, hard-coded in C and closely coupled with low-level register access code, generally leading to suboptimal configurations. We investigate the merits and drawbacks of a new approach: separating hardware configuration logic (algorithms to determine configuration parameter values) from mechanism (programming device registers). The latter we keep in C, and the former we encode in a declarative programming language with constraint-satisfaction extensions. As a test case, we have implemented full PCI configuration, resource allocation, and interrupt assignment in the Barrelfish research operating system, using a concise expression of efficient algorithms in constraint logic programming. We show that the approach is tractable, and can successfully configure a wide range of PCs with competitive runtime cost. Moreover, it requires about half the code of the C-based approach in Linux while offering considerably more functionality. Additionally it easily accommodates adaptations such as hotplug, fixed regions, and "quirks".
机译:C仍然是硬件编程(设备驱动程序,总线配置等)选择的语言:它速度快,允许低级访问并且受到OS开发人员的信任。但是,配置和重新配置硬件设备和互连所需的算法变得更加复杂和多样化,并增加了传统支持,“怪癖”和硬件错误的负担。甚至在现代PC中对PCI桥接器进行编程也是一个令人惊讶的复杂问题,并且随着诸如热插拔之类的新功能的出现而变得越来越糟。现有方法使用相对简单的算法,这些算法以C语言进行硬编码,并与低级寄存器访问代码紧密结合,通常会导致配置欠佳。我们研究了一种新方法的优缺点:将硬件配置逻辑(确定配置参数值的算法)与机制(编程设备寄存器)分开。后者使用C语言编写,而前者则使用具有约束满足扩展名的声明性编程语言进行编码。作为一个测试案例,我们使用约束逻辑编程中高效算法的简洁表达,在Barrelfish研究操作系统中实现了完整的PCI配置,资源分配和中断分配。我们证明了该方法是易于处理的,并且可以以具有竞争力的运行时成本成功配置各种PC。此外,它需要Linux中基于C的方法的一半代码,同时提供了更多的功能。此外,它还可以轻松适应诸如热插拔,固定区域和“怪癖”之类的适应。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号