- 论坛徽章:
- 0
|
Normal
0
My research work of Ph.d study is "Smart Real-Time
Operating System". It targets on building a real-time control system in
the general-purpose operating system: Linux. It is called real-time supported Linux
(RTS-Linux).
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
Normal
0
In the RTS-Linux,
the RTS driver coexists with the standard Linux kernel. The modification is
mostly insides RTS driver. Thus it would be easy to ported RTS extension on
more hardware platforms and higher-version Linux. RTS driver is a virtual layer
including the data abstraction of tasks and the control operations on the
tasks. It also provides the APIs to interact with the kernel and control the
real-time executive. We decomposed the kernel according to the subsystem’s
conceptual dependencies. Figure 1 shows the architecture of the RTS-Linux
kernel. Linux kernel is composed of five major subsystems: the scheduler, the
memory manager, the file system, the network interface and the inter-process
communication. The real-time scheduling is the role of a virtual device
driver (RTS driver).
![]()
Normal
0
Figure 1 Architecture of RTS-Linux
In the RTS-Linux,
all real-time processes have access to all the services and APIs presented by
the standard Linux. Figure 2 illustrates the relationship of APIs shared by
real-time tasks and the standard Linux kernel. Standard Linux kernel and
real-time subsystem sharing the main primitives such as synchronous and
asynchronous I/O control, mutex mechanism, interrupt handling and timer/clock
mechanism. And asynchronous I/O control may be used in soft-real-time control.
In hard real-time control, synchronous I/O control or Directly Memery Access
(DMA) is more suitable to its timing requirements.
![]()
Figure 2 Shared APIs and IPC
between two parts of RTS-Linux
The RTS driver
holds a scheduler to schedule multiple real-time tasks using multiple flexible
scheduling policies. The main role of real-time scheduling is to guarantee
timing critical of tasks. There are many ways to manifest the timing constrains
and scheduling policies. By default, RTS-Linux provides a priority-based
preemptive scheduler where each task is assigned a specified priority. The
scheduler chooses an eligible task from all the tasks that are ready to execute
by examining their priorities. If a task becomes ready and has a higher
priority than the executing task, it will preempt the executing task to shorten
the response time. The scheduler supports aperiodic tasks as well as periodic
tasks. For a periodic task, its period and offset (starting time) are
specified. In order to improve the scheduler, a set of new features is optional
to be inserted. For example, no single policy is appropriate for all applications.
RTS-Linux allows developers to write their own scheduler.
The tasks queue
keeps track of the status of the multiple tasks. Tasks having the same status
are queued into the proper list. When a scheduler plans, the first task in the
list will be taken. The queue management also provides the necessary insert and
removal primitives.
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/7273/showart_1915748.html |
|