Embedded 版 (精华区)
发信人: vmlinuz (生活将因为你而美丽), 信区: Embedded_system
标 题: Linux as an Embedded Operating System (3)
发信站: 哈工大紫丁香 (2001年06月01日08:38:57 星期五), 转信
POSIX and Linux
POSIX is a movement to standardize the features and interfaces that a Unix-
like operating system must have. The idea is to improve the portability of
software written for Unix, making the jobs of Unix programmers much easier.
Some real-time extensions, known as POSIX.1b or IEEE 1003.1b, have been
added to the standard. These extensions include facilities such as
semaphores, memory locking, clocks and timers, message queues, and
preemptive prioritized scheduling.
Using POSIX as a basis for standardizing real-time operating system features
has been rightly criticized.2 The standard is big, clumsy, and bloated with
features appropriate for desktop Unix workstations but unhelpful in embedded
systems. The standards-making body is dominated by workstation manufacturers
unwilling to make concessions to vendors and users of RTOSs. Also, the POSIX
system calls reflect the arcane and cumbersome syntax of Unix system calls,
so that an operation that takes one or two calls in VxWorks or pSOS+ may
take close to a dozen POSIX calls. Unix programmers are accustomed to this
annoyance, but embedded system programmers find it frustrating.
A number of Linux developers are working on implementing POSIX.1b features
in Linux.3 This movement has already seen some success, and the effort
continues. The POSIX memory-locking facilities and the functions which
determine the scheduling algorithm have been implemented. On the other hand,
the timer functions and POSIX.1b signals are not yet complete. And perhaps
most damaging, the POSIX semaphore and message queue features, which are
essential for any serious RTOS, are not yet available.
One promising development for POSIX-based Linux is the implementation of
POSIX threads, which are defined in POSIX.1c (or IEEE 1003.1c). Within a
process you can have multiple threads, all sharing the same address space.
This matches quite well the familiar embedded system concept of a task.
Some implementations of POSIX threads are already available for Linux.
While the POSIX approach to implementing a real-time Linux holds some
promise, presently and for the foreseeable future only the "softest" real-
time applications can be implemented using the POSIX.1b functions. The
fundamental problem faced when attempting to graft POSIX.1b functionality
onto Linux is the fact that Linux has a non-preemtable kernel. So
implementing "hard" real-time features without radically changing the
design of the kernel would seem to be impossible. However, at least one
group has succeeded in accomplishing just that.
(TO BE CONTINUED)
--
※ 来源:·哈工大紫丁香 bbs.hit.edu.cn·[FROM: mtlab4.hit.edu.cn]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.187毫秒