- 论坛徽章:
- 2
|
嵌入式里面最重要的不是运行速度,而是对中断、异常 等的响应速度。
当然,这个速度是有场合之分的,因此嵌入式系统才归类为硬实时和软实时。
虽然运行速度会影响系统的可调度性,但是相比响应速度对系统的影响,这个因素往往权重不大。
诚然,你可以通过很多方式得知这个信息:Linux/FreeBSD 提供部分软实时功能,NetBSD暂时没有提供实时性。这些通用系统都还没能提供硬实时能力。
当前只能在没有实时性要求的场合(或者说要求不高),使用NetBSD。NetBSD社区正在做相关工作。
不过,可以看看NetBSD的优势[from http://en.wikipedia.org/wiki/NetBSD]
This platform independence helps greatly in developing embedded systems, especially starting in NetBSD 1.6, with the entire toolchain of compilers, assemblers, linkers, and other tools fully supporting cross-compiling. The NetBSD cross-compiling framework allows a complete NetBSD system for an architecture to be built from another system of different architecture (usually fastest or with more hardware resources), even of different operating system since the framework supports most POSIX-compliant systems.
NetBSD’s portability is due to its unique Modular Portability Layer (MPL). With the MPL, the driver is completely isolated from the hardware platform, I/O instructions or no I/O instructions, interlocking, retry error recovery, bounce buffers, memory type boundaries, scatter/gather maps in host bridges, even peripherals which use pseudo-DMA to write a buffer RAM with host CPU copy-in and copy-out, all are transparently handled beneath the driver layer. Moreover, several embedded systems using NetBSD have required no additional software development other than toolchain and target rehost.[1]
With Linux, however, device driver code must be reworked for every new architecture. As a consequence, in recent porting efforts by NetBSD and Linux developers, NetBSD has taken as little as 10% of the time to port to new hardware. Engineers ported NetBSD to the SuperH processor core in under six weeks; Linux took three months. NetBSD was ported to the AMD x86-64 architecture (now known as AMD64) in about a month; Linux took six months.
简单来说,
1 NetBSD在提供一个完整操作系统的同时,还提供了一个完整的交叉编译框架,而不是一个单一内核,或者一个单一系统。
2 NetBSD抽象设备相关于设备无关,使得NetBSD的移植和驱动的开发时间,不过是开发Linux平台的10%
另外一个问题,关于硬件特殊性。
NetBSD同样分 MI 和 MD 两部分,为什么不可以利用硬件特殊性?我没有理解你的问题。
你可以找找eCos的资料,它是一款硬实时的开源系统,它的可移植性也依赖于类似MPL的HAL,全称是hardware abstraction layer.
also http://wasabisystems.com/pdfs/Linux_or_BSD.pdf
[ 本帖最后由 gvim 于 2006-12-21 13:05 编辑 ] |
|