[go: up one dir, main page]

CN118519683B - A method and system for operating an embedded hybrid kernel supporting hard real-time - Google Patents

A method and system for operating an embedded hybrid kernel supporting hard real-time Download PDF

Info

Publication number
CN118519683B
CN118519683B CN202410980645.XA CN202410980645A CN118519683B CN 118519683 B CN118519683 B CN 118519683B CN 202410980645 A CN202410980645 A CN 202410980645A CN 118519683 B CN118519683 B CN 118519683B
Authority
CN
China
Prior art keywords
time
hard real
real
domain
interrupt
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410980645.XA
Other languages
Chinese (zh)
Other versions
CN118519683A (en
Inventor
张昆
郑国玲
王大维
许振龙
李林
朱其星
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Jingrong Lianchuang Technology Co ltd
Shandong Institute of Space Electronic Technology
Original Assignee
Chengdu Jingrong Lianchuang Technology Co ltd
Shandong Institute of Space Electronic Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Jingrong Lianchuang Technology Co ltd, Shandong Institute of Space Electronic Technology filed Critical Chengdu Jingrong Lianchuang Technology Co ltd
Priority to CN202410980645.XA priority Critical patent/CN118519683B/en
Publication of CN118519683A publication Critical patent/CN118519683A/en
Application granted granted Critical
Publication of CN118519683B publication Critical patent/CN118519683B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses an embedded mixed kernel operation method and system supporting hard real time, which relates to the field of embedded equipment, the invention uses an interrupt pipeline to realize the separation processing of hard real time domain IRQ and Linux domain IRQ, judges the IRQ interrupt type, interrupts processing, creates a hard real time thread data structure of the hard real time domain, initializes the hard real time dispatch related data structure and switches to the real time domain for execution, carries out real time thread dispatch, carries out the steps of application program development, the method has the advantages that the function expansion of the Linux embedded operating system in the hard real-time field is realized, the high-instantaneity and high-stability operation of the hard real-time program under the embedded mixed kernel operating system are realized, the universality of the embedded mixed kernel operating system under the hard real-time scene is improved, the problem of the existing real-time operating system on the compatibility of Linux ecology is avoided, and the pressure of a developer for migrating the original application to the embedded mixed kernel operating system supporting the hard real-time is reduced.

Description

一种支持硬实时的嵌入式混合内核操作方法及系统A method and system for operating an embedded hybrid kernel supporting hard real-time

技术领域Technical Field

本发明涉及嵌入式设备领域,具体涉及一种支持硬实时的嵌入式混合内核操作方法及系统。The present invention relates to the field of embedded devices, and in particular to an embedded hybrid kernel operation method and system supporting hard real-time.

背景技术Background Art

当前嵌入式Linux操作系统由于其设计之初仅考虑了资源共享和吞吐率,在实时性上基本没有考虑,因此对Linux实时性的提升成为了Linux系统在嵌入式领域得到稳定应用和应用拓展的关键问题。The current embedded Linux operating system was designed with only resource sharing and throughput in mind, with little consideration given to real-time performance. Therefore, improving Linux real-time performance has become a key issue for the stable application and expansion of Linux systems in the embedded field.

标准Linux在实时性的方面做出了改进,其改进始于Linux2.6,在Linux2.6实现了以下功能以提升系统实时性:Standard Linux has made improvements in real-time performance, which began with Linux 2.6. In Linux 2.6, the following features were implemented to improve system real-time performance:

1、实现cfs调度器;1. Implement cfs scheduler;

2、实现posix 1003.1b realtime实时扩展;2. Implement POSIX 1003.1b realtime extension;

3、实现中断线程化;3. Realize interrupt threading;

4、实现抢占机制;4. Implement the preemption mechanism;

5、实现高精度时钟。5. Achieve high-precision clock.

尽管标准Linux做出了改进,它仍然存在很多制约实时性的因素,包括:Despite the improvements made to standard Linux, it still has many real-time limitations, including:

1、内核依然存在大量的不可抢占区间;1. The kernel still has a large number of non-preemptible intervals;

2、存在大量关闭中断操作,增大了中断延迟,降低了系统实时性;2. There are a large number of interrupt shutdown operations, which increases the interrupt delay and reduces the real-time performance of the system;

3、主要中断未线程化(包括软中断),仍然是系统最高优先级,只要相应中断时间产生,内核将立即执行相应中断处理以及软中断,待所有挂起的中断和软中断处理完毕后才执行正常任务,实时任务得不到实时性保证。3. The main interrupts are not threaded (including soft interrupts) and are still the highest priority of the system. As long as the corresponding interrupt time occurs, the kernel will immediately execute the corresponding interrupt processing and soft interrupts. Normal tasks will not be executed until all pending interrupts and soft interrupts are processed. Real-time tasks cannot be guaranteed in real time.

除了上述对标准Linux进行实时性改造的技术手段之外,为了提升嵌入式Linux的实时性,业界还通过对内核合入RT-PREEMPT补丁实现RT-PREEMT Linux来提升实时性。RT-PREEMPT在相当长一段时期以patch形式存在,RT-PREEMT Linux提升实时性主要体现在以下方面:In addition to the above-mentioned technical means of real-time transformation of standard Linux, in order to improve the real-time performance of embedded Linux, the industry also integrates the RT-PREEMPT patch into the kernel to implement RT-PREEMT Linux to improve the real-time performance. RT-PREEMPT has existed in the form of a patch for a long period of time. The main aspects of RT-PREEMT Linux's real-time performance improvement are as follows:

1、使内核尽可能可抢占(内核关中断关抢占除外);1. Make the kernel as preemptible as possible (except for kernel shutdown interrupt preemption);

2、除系统时钟外,主要中断实现了线程化(中断处理可调度);2. Except for the system clock, the main interrupts are threaded (interrupt processing can be scheduled);

3、spinlock锁转换为rt_mutex(不再关中断、允许抢占,更适合于中断线程化)。3. The spinlock lock is converted to rt_mutex (no longer disabling interrupts, allowing preemption, and more suitable for interrupt threading).

尽管通过以上手段,提升了RT-PREEMT Linux的实时性,但仍存在影响实时性的因素,且该因素难以完全控制,主要包括以下几点:Although the above measures have improved the real-time performance of RT-PREEMT Linux, there are still factors that affect the real-time performance, and these factors are difficult to fully control, mainly including the following points:

1、系统存在直接调用关中断和关抢占的行为,这会继续导致某些条件下中断、调度延迟的增大(例如内存管理子系统中存在关抢占耗时较长的操作);1. The system directly calls to disable interrupts and preemption, which will continue to increase interrupt and scheduling delays under certain conditions (for example, there is a time-consuming operation to disable preemption in the memory management subsystem);

2、部分驱动程序实现并未考虑实时性,特别是USB、PCI这样的以驱动栈形式存在的驱动;2. Some driver implementations do not take real-time into consideration, especially drivers such as USB and PCI that exist in the form of driver stacks;

3、中断处理本身,虽然大部分中断已经线程化,但单就timer中断,若定时器较多或者单个定时器耗时长,也会给系统响应时间带来不确定性。3. Interrupt processing itself. Although most interrupts have been threaded, if there are too many timers or a single timer takes a long time, it will also bring uncertainty to the system response time.

发明内容Summary of the invention

针对现有技术中的上述不足,本发明提供的一种支持硬实时的嵌入式混合内核操作方法及系统解决了现有嵌入式系统实时性差、兼容性差的问题。In view of the above-mentioned deficiencies in the prior art, the present invention provides an embedded hybrid kernel operation method and system supporting hard real-time, which solves the problems of poor real-time performance and poor compatibility of the existing embedded systems.

为了达到上述发明目的,本发明采用的技术方案为:In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is:

提供一种支持硬实时的嵌入式混合内核操作方法,其包括以下步骤:A method for operating an embedded hybrid kernel supporting hard real-time is provided, comprising the following steps:

S1、通过中断管道,定义一个高优先级处理阶段,使收到中断请求后运行注册到硬实时域的中断处理程序;S1. Define a high-priority processing stage through the interrupt pipeline so that the interrupt handler registered in the hard real-time domain is run after receiving the interrupt request;

S2、通过硬实时域的中断处理程序判断当前中断请求是否为硬实时域中断,若是则进入步骤S3;否则进入步骤S4;S2, judging whether the current interrupt request is a hard real-time domain interrupt through the interrupt processing program of the hard real-time domain, if so, proceeding to step S3; otherwise, proceeding to step S4;

S3、使硬实时域和Linux域同时处于中断禁止状态,处理硬实时域中断,进入步骤S5;S3, making the hard real-time domain and the Linux domain both in the interrupt disabled state, processing the hard real-time domain interrupt, and proceeding to step S5;

S4、将当前中断请求交由Linux域中断处理程序进行处理,并使Linux域进入中断禁止状态、硬实时域保持正常状态,直至完成当前中断请求的处理;S4, handing over the current interrupt request to the Linux domain interrupt handler for processing, and making the Linux domain enter the interrupt disabled state, and the hard real-time domain maintains a normal state until the processing of the current interrupt request is completed;

S5、创建硬实时线程调度的数据结构,保存硬实时调度与双域相关的关键信息,实现在不破坏Linux系统上线程调度模型的同时,确保硬实时任务调度的实时性;S5. Create a data structure for hard real-time thread scheduling, save key information related to hard real-time scheduling and dual domains, and ensure the real-time performance of hard real-time task scheduling without destroying the thread scheduling model on the Linux system;

S6、配置调度策略,创建并初始化硬实时调度相关数据结构,实现任务域切换、驱动热切换,以及从非实时域切换到实时域执行;S6. Configure the scheduling strategy, create and initialize the hard real-time scheduling related data structure, implement task domain switching, drive hot switching, and switch from non-real-time domain to real-time domain execution;

S7、基于调度策略调度硬实时线程。S7. Schedule hard real-time threads based on scheduling policies.

进一步地,步骤S2中判断当前中断请求是否为硬实时域中断的具体方式为:通过硬实时域的中断处理程序对当前中断请求在硬实时域进行检查,若当前中断请求在硬实时域存在相应的处理函数,则判定该中断请求为硬实时域中断;否则判定该中断请求为Linux域中断。Furthermore, in step S2, the specific method for determining whether the current interrupt request is a hard real-time domain interrupt is: the current interrupt request is checked in the hard real-time domain by the interrupt handler of the hard real-time domain. If the current interrupt request has a corresponding processing function in the hard real-time domain, the interrupt request is determined to be a hard real-time domain interrupt; otherwise, the interrupt request is determined to be a Linux domain interrupt.

进一步地,步骤S3中使硬实时域和Linux域处于中断禁止状态的具体方法分别为:Furthermore, the specific methods for placing the hard real-time domain and the Linux domain in the interrupt disabled state in step S3 are:

引入虚拟中断替换原生Linux内核的中断,通过修改虚拟中断标志位使Linux域虚拟中断, Linux域进入中断禁止状态;Introduce virtual interrupts to replace native Linux kernel interrupts. Modify the virtual interrupt flag to enable virtual interrupts in the Linux domain, and the Linux domain enters the interrupt disabled state.

通过修改硬实时域接口标志位,使硬实时域进入中断禁止状态。By modifying the hard real-time domain interface flag bit, the hard real-time domain enters the interrupt disabled state.

进一步地,步骤S5中硬实时线程调度的数据结构包括struct hrt_arch_tcb tcb字段、struct hrt_sched *sched字段、struct hrt_class *sched_class字段;Furthermore, the data structure of the hard real-time thread scheduling in step S5 includes a struct hrt_arch_tcb tcb field, a struct hrt_sched *sched field, and a struct hrt_class *sched_class field;

struct hrt_arch_tcb tcb字段,用于保存架构相关信息;struct hrt_arch_tcb tcb field, used to store architecture related information;

struct hrt_sched *sched字段,用于保存硬实时调度相关的信息;The struct hrt_sched *sched field is used to store information related to hard real-time scheduling;

struct hrt_class *sched_class字段,用于保存硬实时类线程相关信息。The struct hrt_class *sched_class field is used to store information related to hard real-time threads.

进一步地,步骤S6中创建并初始化硬实时调度相关数据结构,实现任务域切换、驱动热切换,以及从非实时域切换到实时域执行的具体方法为:Furthermore, in step S6, the specific method of creating and initializing the hard real-time scheduling related data structure, realizing task domain switching, driving hot switching, and switching from the non-real-time domain to the real-time domain for execution is:

创建一个Linux域线程,记为影子线程;Create a Linux domain thread, recorded as a shadow thread;

创建并初始化硬实时调度相关数据结构;Create and initialize hard real-time scheduling related data structures;

在Linux原生的主调度接口中,增加一个劫持操作,将影子线程设置为当前cpu的劫持线程;In the native Linux main scheduling interface, add a hijacking operation to set the shadow thread as the hijacking thread of the current CPU;

触发一次Linux标准调度,切换到下一个任务的尾部,调用域切换流程,从而完成影子线程从非实时域到实时域的切换;Trigger a Linux standard schedule, switch to the tail of the next task, call the domain switching process, and complete the switch of the shadow thread from the non-real-time domain to the real-time domain;

通过硬实时驱动框架中的硬实时驱动,在任务域切换的同时,通过硬实时线程中对硬实时域下设备文件描述符的引用,完成驱动热切换,将驱动从Linux域切换到硬实时域;Through the hard real-time driver in the hard real-time driver framework, when the task domain is switched, the driver hot switch is completed by referencing the device file descriptor in the hard real-time domain in the hard real-time thread, and the driver is switched from the Linux domain to the hard real-time domain.

将硬实时域线程结构加入到硬实时调度器的就绪队列,等待硬实时调度器调度运行,直到放弃cpu或者退出硬实时域;若放弃cpu或者退出硬实时域,则返回到触发一次Linux标准调度的流程没有完成的剩余部分。The hard real-time domain thread structure is added to the ready queue of the hard real-time scheduler, waiting for the hard real-time scheduler to schedule and run until the CPU is abandoned or the hard real-time domain is exited; if the CPU is abandoned or the hard real-time domain is exited, the remaining part of the process that triggers a Linux standard scheduling is returned and not completed.

进一步地,硬实时驱动框架包括预定义的实时类设备和驱动实现、硬实时驱动编程接口,以及硬实时驱动应用接口;Further, the hard real-time driver framework includes predefined real-time class devices and driver implementations, a hard real-time driver programming interface, and a hard real-time driver application interface;

预定义的实时类设备和驱动实现包括预定义的协议设备和名字设备;其中所有面向消息的设备均属于协议设备,其余设备属于名字设备;应用通过posix socket操作协议设备;The predefined real-time devices and driver implementations include predefined protocol devices and name devices; all message-oriented devices are protocol devices, and the rest are name devices; applications operate protocol devices through POSIX sockets;

硬实时驱动编程接口,用于提供时钟服务、任务管理服务、同步服务、中断管理服务、非实时信号服务、实时内存分配服务、用户态内存访问服务、实时内核控制台输出服务和异常检查机制服务;Hard real-time driver programming interface, used to provide clock services, task management services, synchronization services, interrupt management services, non-real-time signal services, real-time memory allocation services, user-mode memory access services, real-time kernel console output services and exception checking mechanism services;

硬实时驱动应用接口,面向于内核态的应用和用户态的应用,用于为使用硬实时驱动框架的内核态应用和用户态应用提供接口支撑。The hard real-time driver application interface is oriented to kernel-mode applications and user-mode applications, and is used to provide interface support for kernel-mode applications and user-mode applications that use the hard real-time driver framework.

进一步地,退出硬实时域的具体方法为:Furthermore, the specific method of exiting the hard real-time domain is:

调用硬实时域的suspend函数,为硬实时线程结构设置一个降级标志;Call the suspend function of the hard real-time domain and set a degradation flag for the hard real-time thread structure;

进入硬实时域主调度函数,在主调度函数入口将当前的运行域从实时降级到非实时;Enter the main scheduling function of the hard real-time domain, and downgrade the current operation domain from real-time to non-real-time at the entrance of the main scheduling function;

从就绪队列取出优先级最高的就绪硬实时任务取代自己运行;其中若当前就绪队列中只有硬实时IDLE任务,则返回到之前被抢占的Linux域任务。Take out the highest priority ready hard real-time task from the ready queue to replace itself; if there is only hard real-time IDLE task in the current ready queue, return to the previously preempted Linux domain task.

进一步地,通过工具链中alias属性的功能,对已有的标准POSIX接口进行封装,以动态库的形式将硬实时服务接口暴露给用户,使用户在编译阶段加入该动态库,实现从普通Linux任务到硬实时域任务的转换。Furthermore, through the alias attribute function in the tool chain, the existing standard POSIX interface is encapsulated and the hard real-time service interface is exposed to users in the form of a dynamic library, so that users can add the dynamic library during the compilation stage to realize the conversion from ordinary Linux tasks to hard real-time domain tasks.

提供一种支持硬实时的嵌入式混合内核操作系统,其包括硬实时中断管理模块、硬实时任务处理模块和硬实时驱动支持模块、Linux域,以及在Linux内核的基础上扩展得到的硬实时域;其中硬实时域的优先级高于Linux域;Provided is an embedded hybrid kernel operating system supporting hard real-time, comprising a hard real-time interrupt management module, a hard real-time task processing module, a hard real-time driver support module, a Linux domain, and a hard real-time domain expanded on the basis of the Linux kernel; wherein the priority of the hard real-time domain is higher than that of the Linux domain;

硬实时中断管理模块,用于通过中断管道,定义一个高优先级处理阶段,使收到中断请求后运行注册到硬实时域的中断处理程序;通过硬实时域的中断处理程序判断当前中断请求是否为硬实时域中断,若是则使硬实时域和Linux域同时处于中断禁止状态,处理硬实时域中断;否则将当前中断请求交由Linux域中断处理程序进行处理,并使Linux域进入中断禁止状态、硬实时域保持正常状态,直至完成当前中断请求的处理;The hard real-time interrupt management module is used to define a high-priority processing stage through the interrupt pipeline, so that the interrupt handler registered in the hard real-time domain is run after receiving the interrupt request; the interrupt handler of the hard real-time domain determines whether the current interrupt request is a hard real-time domain interrupt, and if so, the hard real-time domain and the Linux domain are both in the interrupt disabled state to process the hard real-time domain interrupt; otherwise, the current interrupt request is handed over to the Linux domain interrupt handler for processing, and the Linux domain is put into the interrupt disabled state, and the hard real-time domain remains in a normal state until the processing of the current interrupt request is completed;

硬实时任务处理模块,用于创建硬实时线程调度的数据结构,保存硬实时调度与双域相关的关键信息,实现在不破坏Linux系统上线程调度模型的同时,确保硬实时任务调度的实时性;配置调度策略,创建并初始化硬实时调度相关数据结构,实现任务域切换、驱动热切换,以及从非实时域切换到实时域执行;基于调度策略调度硬实时线程;The hard real-time task processing module is used to create the data structure of hard real-time thread scheduling, save the key information related to hard real-time scheduling and dual domains, and ensure the real-time performance of hard real-time task scheduling without destroying the thread scheduling model on the Linux system; configure the scheduling strategy, create and initialize the data structure related to hard real-time scheduling, realize task domain switching, drive hot switching, and switch from non-real-time domain to real-time domain execution; schedule hard real-time threads based on the scheduling strategy;

硬实时驱动支持模块,用于通过开发硬实时驱动框架,对实时类设备和驱动实现做出定义与实现,使同一个硬件设备在硬实时域和Linux域都有对应的设备描述符,使得通过驱动热切换可以实现同一个驱动设备在双域之间切换。The hard real-time driver support module is used to define and implement real-time devices and driver implementations by developing a hard real-time driver framework, so that the same hardware device has corresponding device descriptors in both the hard real-time domain and the Linux domain, and the same driver device can be switched between the two domains through driver hot switching.

进一步地,系统还包括:Furthermore, the system also includes:

硬实时应用支持模块,用于通过工具链中alias属性的功能,对已有的标准POSIX接口进行封装,以动态库的形式将硬实时服务接口暴露给用户,使用户在编译阶段加入该动态库,实现从普通Linux任务到硬实时域任务的转换。The hard real-time application support module is used to encapsulate the existing standard POSIX interface through the alias attribute function in the tool chain, and expose the hard real-time service interface to the user in the form of a dynamic library, so that the user can add the dynamic library during the compilation stage to realize the conversion from ordinary Linux tasks to hard real-time domain tasks.

本发明的有益效果为:本发明通过断管道实现对硬实时域IRQ和Linux域IRQ的分离处理,判断IRQ中断类型,中断处理,创建硬实时域的硬实时线程数据结构,初始化硬实时调度相关数据结构并切换到实时域执行,进行实时线程调度,实现了对Linux嵌入式操作系统在硬实时领域功能的扩展,实现了硬实时程序在嵌入式混合内核操作系统下的高实时性和高稳定性运行,提升了嵌入式混合内核操作系统在硬实时场景下的通用性,规避了现有实时操作系统对Linux生态的兼容性问题,降低了开发者将原有应用迁移到支持硬实时的嵌入式混合内核操作系统上的压力,同时也降低了开发者使用实时性接口开发硬实时程序的难度和复杂度。The beneficial effects of the present invention are as follows: the present invention realizes the separation processing of hard real-time domain IRQ and Linux domain IRQ through the interrupt pipeline, judges the IRQ interrupt type, interrupts the processing, creates the hard real-time thread data structure of the hard real-time domain, initializes the hard real-time scheduling related data structure and switches to the real-time domain for execution, performs real-time thread scheduling, realizes the expansion of the functions of the Linux embedded operating system in the hard real-time field, realizes the high real-time and high stability operation of the hard real-time program under the embedded hybrid kernel operating system, improves the versatility of the embedded hybrid kernel operating system in the hard real-time scenario, avoids the compatibility problem of the existing real-time operating system with the Linux ecosystem, reduces the pressure on developers to migrate the original application to the embedded hybrid kernel operating system that supports hard real-time, and also reduces the difficulty and complexity of developers using real-time interfaces to develop hard real-time programs.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1为本方法的流程示意图;Fig. 1 is a schematic flow diagram of the method;

图2为本系统的双域结构示意图;FIG2 is a schematic diagram of the dual-domain structure of the present system;

图3为中断处理核心流程中的实例图;FIG3 is an example diagram of the interrupt processing core process;

图4为不同中断类型下双域的状态示意图;FIG4 is a schematic diagram of the state of the dual domain under different interrupt types;

图5为硬实时线程调度的数据结构示意图;FIG5 is a schematic diagram of a data structure for hard real-time thread scheduling;

图6为实现的硬实时域线程结构与Linux域的关联示意图;FIG6 is a schematic diagram showing the association between the implemented hard real-time domain thread structure and the Linux domain;

图7为硬实时驱动框架示意图;FIG7 is a schematic diagram of a hard real-time drive framework;

图8为实施例中提供独立于底层系统的通用API的示意图;FIG8 is a schematic diagram of providing a general API independent of the underlying system in an embodiment;

图9为采用优先级数组实现调度的示意图;FIG9 is a schematic diagram of implementing scheduling using a priority array;

图10为采用FIFO队列方式实现调度的示意图。FIG. 10 is a schematic diagram of implementing scheduling using a FIFO queue method.

具体实施方式DETAILED DESCRIPTION

下面对本发明的具体实施方式进行描述,以便于本技术领域的技术人员理解本发明,但应该清楚,本发明不限于具体实施方式的范围,对本技术领域的普通技术人员来讲,只要各种变化在所附的权利要求限定和确定的本发明的精神和范围内,这些变化是显而易见的,一切利用本发明构思的发明创造均在保护之列。The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.

如图1和图2所示,该支持硬实时的嵌入式混合内核操作方法包括以下步骤:As shown in FIG. 1 and FIG. 2 , the embedded hybrid kernel operation method supporting hard real-time includes the following steps:

S1、通过中断管道,定义一个高优先级处理阶段,使收到中断请求(IRQ)后运行注册到硬实时域的中断处理程序;S1. Define a high-priority processing stage through the interrupt pipeline so that the interrupt handler registered in the hard real-time domain is run after receiving the interrupt request (IRQ);

S2、通过硬实时域的中断处理程序判断当前中断请求是否为硬实时域中断,若是则进入步骤S3;否则进入步骤S4;S2, judging whether the current interrupt request is a hard real-time domain interrupt through the interrupt processing program of the hard real-time domain, if so, proceeding to step S3; otherwise, proceeding to step S4;

S3、使硬实时域和Linux域同时处于中断禁止状态,处理硬实时域中断,进入步骤S5;S3, making the hard real-time domain and the Linux domain both in the interrupt disabled state, processing the hard real-time domain interrupt, and proceeding to step S5;

S4、将当前中断请求交由Linux域中断处理程序进行处理,并使Linux域进入中断禁止状态、硬实时域保持正常状态,直至完成当前中断请求的处理;S4, handing over the current interrupt request to the Linux domain interrupt handler for processing, and making the Linux domain enter the interrupt disabled state, and the hard real-time domain maintains a normal state until the processing of the current interrupt request is completed;

S5、创建硬实时线程调度的数据结构,保存硬实时调度与双域相关的关键信息,实现在不破坏Linux系统上线程调度模型的同时,确保硬实时任务调度的实时性;S5. Create a data structure for hard real-time thread scheduling, save key information related to hard real-time scheduling and dual domains, and ensure the real-time performance of hard real-time task scheduling without destroying the thread scheduling model on the Linux system;

S6、配置调度策略,创建并初始化硬实时调度相关数据结构,实现任务域切换、驱动热切换,以及从非实时域切换到实时域执行;S6. Configure the scheduling strategy, create and initialize the hard real-time scheduling related data structure, implement task domain switching, drive hot switching, and switch from non-real-time domain to real-time domain execution;

S7、基于调度策略调度硬实时线程。S7. Schedule hard real-time threads based on the scheduling strategy.

该支持硬实时的嵌入式混合内核操作系统包括硬实时中断管理模块、硬实时任务处理模块、硬实时应用支持模块和硬实时驱动支持模块、Linux域,以及在Linux内核的基础上扩展得到的硬实时域;其中硬实时域的优先级高于Linux域;The embedded hybrid kernel operating system supporting hard real-time includes a hard real-time interrupt management module, a hard real-time task processing module, a hard real-time application support module, a hard real-time driver support module, a Linux domain, and a hard real-time domain expanded on the basis of the Linux kernel; wherein the priority of the hard real-time domain is higher than that of the Linux domain;

硬实时中断管理模块的核心是利用中断管道的方法,来实现硬实时域与Linux域在中断处理上的划分和传递。具体来说,硬实时中断管理模块用于通过中断管道,定义一个高优先级处理阶段,使收到中断请求后运行注册到硬实时域的中断处理程序;通过硬实时域的中断处理程序判断当前中断请求是否为硬实时域中断,若是则使硬实时域和Linux域同时处于中断禁止状态,处理硬实时域中断;否则将当前中断请求交由Linux域中断处理程序进行处理,并使Linux域进入中断禁止状态、硬实时域保持正常状态,直至完成当前中断请求的处理;The core of the hard real-time interrupt management module is to use the interrupt pipe method to realize the division and transfer of interrupt processing between the hard real-time domain and the Linux domain. Specifically, the hard real-time interrupt management module is used to define a high-priority processing stage through the interrupt pipe, so that the interrupt handler registered to the hard real-time domain is run after receiving an interrupt request; the hard real-time domain interrupt handler determines whether the current interrupt request is a hard real-time domain interrupt, and if so, the hard real-time domain and the Linux domain are both in the interrupt disabled state to process the hard real-time domain interrupt; otherwise, the current interrupt request is handed over to the Linux domain interrupt handler for processing, and the Linux domain is put into the interrupt disabled state, while the hard real-time domain remains in a normal state until the processing of the current interrupt request is completed;

硬实时任务处理模块的核心是通过新增数据结构、配置调度策略、实现任务域切换的方法,来实现硬实时域与Linux域在任务处理上的关联和解耦。具体来说,硬实时任务处理模块用于创建硬实时线程调度的数据结构,保存硬实时调度与双域相关的关键信息,实现在不破坏Linux系统上线程调度模型的同时,确保硬实时任务调度的实时性;配置调度策略,创建并初始化硬实时调度相关数据结构,实现任务域切换、驱动热切换,以及从非实时域切换到实时域执行;基于调度策略调度硬实时线程;The core of the hard real-time task processing module is to achieve the association and decoupling of the hard real-time domain and the Linux domain in task processing by adding new data structures, configuring scheduling strategies, and implementing task domain switching. Specifically, the hard real-time task processing module is used to create data structures for hard real-time thread scheduling, save key information related to hard real-time scheduling and dual domains, and ensure the real-time performance of hard real-time task scheduling without destroying the thread scheduling model on the Linux system; configure scheduling strategies, create and initialize hard real-time scheduling-related data structures, implement task domain switching, drive hot switching, and switch from non-real-time domain to real-time domain execution; schedule hard real-time threads based on scheduling strategies;

硬实时应用支持模块,用于通过工具链中alias属性的功能,对已有的标准POSIX接口进行封装,以动态库的形式将硬实时服务接口暴露给用户,使用户在编译阶段加入该动态库,实现从普通Linux任务到硬实时域任务的转换;The hard real-time application support module is used to encapsulate the existing standard POSIX interface through the alias attribute function in the tool chain, and expose the hard real-time service interface to the user in the form of a dynamic library, so that the user can add the dynamic library during the compilation stage to realize the conversion from ordinary Linux tasks to hard real-time domain tasks;

硬实时驱动支持模块,用于通过开发硬实时驱动框架,对实时类设备和驱动实现做出定义与实现,使同一个硬件设备在硬实时域和Linux域都有对应的设备描述符,使得通过驱动热切换可以实现同一个驱动设备在双域之间切换,同时提供了独立于底层系统的通用API,方便用户和开发者开展驱动移植工作。The hard real-time driver support module is used to define and implement real-time devices and driver implementations by developing a hard real-time driver framework, so that the same hardware device has corresponding device descriptors in both the hard real-time domain and the Linux domain, so that the same driver device can be switched between the two domains through driver hot switching. At the same time, a general API independent of the underlying system is provided to facilitate users and developers to carry out driver transplantation.

在具体实施过程中,如图3所示,在中断到达系统后,通过中断处理核心流程中的中断管道,实现一个轻量级的高优先处理阶段,由该阶段负责处理系统接收到的中断。In the specific implementation process, as shown in FIG3 , after the interrupt reaches the system, a lightweight high priority processing stage is implemented through the interrupt pipeline in the interrupt processing core process, which is responsible for processing the interrupt received by the system.

在具体实施过程中,判断当前中断请求是否为硬实时域中断的具体方式为:通过硬实时域的中断处理程序对当前中断请求在硬实时域进行检查,若当前中断请求在硬实时域存在相应的处理函数,则判定该中断请求为硬实时域中断;否则判定该中断请求为Linux域中断。In the specific implementation process, the specific method for determining whether the current interrupt request is a hard real-time domain interrupt is: the current interrupt request is checked in the hard real-time domain through the interrupt handler of the hard real-time domain. If the current interrupt request has a corresponding processing function in the hard real-time domain, the interrupt request is determined to be a hard real-time domain interrupt; otherwise, the interrupt request is determined to be a Linux domain interrupt.

在具体实施过程中,中断管道在Linux域,引入虚拟中断来替换原生Linux内核的中断。硬件上的中断操作,即通过操作硬件寄存器控制本地CPU开关中断,由硬实时域实现接口进行控制。In the specific implementation process, the interrupt pipeline in the Linux domain introduces virtual interrupts to replace the native Linux kernel interrupts. The interrupt operation on the hardware, that is, controlling the local CPU switch interrupt by operating the hardware register, is controlled by the hard real-time domain implementation interface.

如图4所示,若经过判断,IRQ为硬实时域中断,则Linux域的虚拟中断的进入通过修改对应标志位实现屏蔽,Linux域进入中断禁止状态,硬实时域的中断通过硬实时域接口修改标志位,使得硬实时域进入中断禁止状态。若经过判断,IRQ为Linux域中断,则Linux域的虚拟中断的进入通过修改对应标志位实现屏蔽,Linux域进入中断禁止状态,硬实时域保持正常状态接收外部中断。As shown in Figure 4, if it is determined that the IRQ is a hard real-time domain interrupt, the entry of the virtual interrupt of the Linux domain is shielded by modifying the corresponding flag bit, and the Linux domain enters the interrupt disabled state. The interrupt of the hard real-time domain modifies the flag bit through the hard real-time domain interface, so that the hard real-time domain enters the interrupt disabled state. If it is determined that the IRQ is a Linux domain interrupt, the entry of the virtual interrupt of the Linux domain is shielded by modifying the corresponding flag bit, and the Linux domain enters the interrupt disabled state. The hard real-time domain remains in a normal state to receive external interrupts.

当Linux域进入中断禁止状态、硬实时域保持正常状态时,外部中断信号仍然可以投递到CPU并被硬实时域注册的中断处理程序打断并抢占。When the Linux domain enters the interrupt disabled state and the hard real-time domain remains in the normal state, the external interrupt signal can still be delivered to the CPU and interrupted and preempted by the interrupt handler registered by the hard real-time domain.

在具体实施过程中,如图5所示,硬实时线程调度的数据结构包括struct hrt_arch_tcb tcb字段、struct hrt_sched *sched字段、struct hrt_class *sched_class字段;In the specific implementation process, as shown in FIG5 , the data structure of the hard real-time thread scheduling includes the struct hrt_arch_tcb tcb field, the struct hrt_sched *sched field, and the struct hrt_class *sched_class field;

struct hrt_arch_tcb tcb字段,用于保存架构相关信息;struct hrt_arch_tcb tcb field, used to store architecture related information;

struct hrt_sched *sched字段,用于保存硬实时调度相关的信息;The struct hrt_sched *sched field is used to store information related to hard real-time scheduling;

struct hrt_class *sched_class字段,用于保存硬实时类线程相关信息。The struct hrt_class *sched_class field is used to store information related to hard real-time threads.

如图6所示,通过该数据结构的实现,系统完成了Linux域与硬实时域二者在各自域上的调度的解耦,减少了系统潜在的交叉风险。As shown in FIG6 , through the implementation of this data structure, the system completes the decoupling of the scheduling of the Linux domain and the hard real-time domain in their respective domains, reducing the potential cross-risk of the system.

在具体实施过程中,配置调度策略的具体方法为:用户根据自身业务情况,通过宏配置选择来选用不同的调度策略,即通过宏配置,将调度策略选择为优先级数组的方式或者FIFO的方式。In the specific implementation process, the specific method of configuring the scheduling strategy is: the user selects different scheduling strategies through macro configuration according to their own business conditions, that is, through macro configuration, the scheduling strategy is selected as a priority array method or a FIFO method.

在具体实施过程中,创建并初始化硬实时调度相关数据结构,实现任务域切换、驱动热切换,以及从非实时域切换到实时域执行的具体方法为:In the specific implementation process, the specific methods for creating and initializing hard real-time scheduling related data structures, implementing task domain switching, driving hot switching, and switching from non-real-time domain to real-time domain execution are as follows:

创建一个Linux域线程,记为影子线程(host线程);Create a Linux domain thread, recorded as a shadow thread (host thread);

创建并初始化硬实时调度相关数据结构;Create and initialize hard real-time scheduling related data structures;

在Linux原生的主调度接口中,增加一个劫持操作,将影子线程设置为当前cpu的劫持线程;In the native Linux main scheduling interface, add a hijacking operation to set the shadow thread as the hijacking thread of the current CPU;

触发一次Linux标准调度(即执行__schedule()-->context_switch()这个流程),切换到下一个任务的尾部,调用域切换流程,从而完成影子线程从非实时域到实时域的切换;Trigger a Linux standard schedule (i.e. execute the process of __schedule()-->context_switch()), switch to the end of the next task, call the domain switching process, and complete the switch of the shadow thread from the non-real-time domain to the real-time domain;

通过硬实时驱动框架中的硬实时驱动,在任务域切换的同时,通过硬实时线程中对硬实时域下设备文件描述符的引用,完成驱动热切换,将驱动从Linux域切换到硬实时域;Through the hard real-time driver in the hard real-time driver framework, when the task domain is switched, the driver hot switch is completed by referencing the device file descriptor in the hard real-time domain in the hard real-time thread, and the driver is switched from the Linux domain to the hard real-time domain.

将硬实时域线程结构加入到硬实时调度器的就绪队列,等待硬实时调度器调度运行(即基于调度策略调度硬实时线程),直到放弃cpu或者退出硬实时域;若放弃cpu或者退出硬实时域,则返回到触发一次Linux标准调度的流程(即返回到前面__schedule()的流程)没有完成的剩余部分。系统将运行在Linux域,直到下一次该线程再次调用“硬实时升级”接口函数才能再次升级到硬实时域。The hard real-time domain thread structure is added to the ready queue of the hard real-time scheduler, waiting for the hard real-time scheduler to schedule and run (i.e., schedule the hard real-time thread based on the scheduling policy) until the CPU is abandoned or the hard real-time domain is exited; if the CPU is abandoned or the hard real-time domain is exited, the remaining part of the process that triggers a Linux standard schedule (i.e., returns to the previous __schedule() process) is not completed. The system will run in the Linux domain until the next time the thread calls the "hard real-time upgrade" interface function again to upgrade to the hard real-time domain again.

如图7所示,硬实时驱动框架包括预定义的实时类设备和驱动实现、硬实时驱动编程接口,以及硬实时驱动应用接口;As shown in FIG7 , the hard real-time driver framework includes predefined real-time class devices and driver implementations, a hard real-time driver programming interface, and a hard real-time driver application interface;

预定义的实时类设备和驱动实现包括预定义的协议设备和名字设备;如嵌入式场景下常用的实时UART、实时SPI、实时GPIO、实时CAN、实时NET等;其中所有面向消息的设备均属于协议设备,其余设备属于名字设备;应用通过posix socket操作协议设备;Predefined real-time devices and driver implementations include predefined protocol devices and named devices, such as real-time UART, real-time SPI, real-time GPIO, real-time CAN, and real-time NET, which are commonly used in embedded scenarios. All message-oriented devices are protocol devices, and the rest are named devices. Applications operate protocol devices through posix sockets.

硬实时驱动编程接口,用于提供时钟服务、任务管理服务、同步服务、中断管理服务、非实时信号服务和其他通用服务(包括实时内存分配服务、用户态内存访问服务、实时内核控制台输出服务和异常检查机制服务);Hard real-time driver programming interface, used to provide clock services, task management services, synchronization services, interrupt management services, non-real-time signal services and other general services (including real-time memory allocation services, user-mode memory access services, real-time kernel console output services and exception checking mechanism services);

硬实时驱动应用接口,面向于内核态的应用和用户态的应用,用于为使用硬实时驱动框架的内核态应用和用户态应用提供接口支撑。The hard real-time driver application interface is oriented to kernel-mode applications and user-mode applications, and is used to provide interface support for kernel-mode applications and user-mode applications that use the hard real-time driver framework.

此外,如图8所示,硬实时驱动框架提供了独立于底层系统的通用API,方便用户和开发者开展驱动移植工作,具体是指两个方面:其一是,将硬实时驱动应用接口,再做一次抽象的封装,形成封装库,提供给应用程序使用;其二是,将硬实时的硬件驱动,再做一次抽象封装,形成硬件抽象层,提供给开发者和用户使用,硬件抽象层能够将底层驱动代码多次封装为不同接口,从而实现代码的复用,适合需要协议栈配合的驱动。In addition, as shown in Figure 8, the hard real-time driver framework provides a common API that is independent of the underlying system, making it easier for users and developers to carry out driver transplantation work. Specifically, it refers to two aspects: first, the hard real-time driver application interface is abstractly encapsulated again to form a encapsulation library, which is provided to the application program; second, the hard real-time hardware driver is abstractly encapsulated again to form a hardware abstraction layer, which is provided to developers and users. The hardware abstraction layer can encapsulate the underlying driver code into different interfaces multiple times, thereby realizing code reuse, which is suitable for drivers that require protocol stack cooperation.

在具体实施过程中,退出硬实时域的具体方法为:In the specific implementation process, the specific method of exiting the hard real-time domain is:

调用硬实时域的suspend函数,为硬实时线程结构设置一个降级标志;Call the suspend function of the hard real-time domain and set a degradation flag for the hard real-time thread structure;

进入硬实时域主调度函数,在主调度函数入口将当前的运行域从实时降级到非实时;Enter the main scheduling function of the hard real-time domain, and downgrade the current operation domain from real-time to non-real-time at the entrance of the main scheduling function;

从就绪队列取出优先级最高的就绪硬实时任务取代自己运行;其中若当前就绪队列中只有硬实时IDLE任务,则返回到之前被抢占的Linux域任务;Take out the highest priority ready hard real-time task from the ready queue to replace itself; if there is only hard real-time IDLE task in the current ready queue, return to the previously preempted Linux domain task;

硬实时线程就绪后,根据宏配置的情况,采用优先级数组或FIFO队列方式,调度硬实时线程。如图9所示,采用优先级数组实现的具体方式为:After the hard real-time thread is ready, it is scheduled using the priority array or FIFO queue method according to the macro configuration. As shown in Figure 9, the specific method of using the priority array is:

1)实现两个关键数据结构,分别是优先级位图和优先级数组,均位于就绪队列;1) Implement two key data structures, namely priority bitmap and priority array, both of which are located in the ready queue;

2)优先级数组用以记录硬实时系统中哪个优先级段有就绪的任务,如果有则对应的bit位为1,否则为0;2) The priority array is used to record which priority segment in the hard real-time system has ready tasks. If there are any, the corresponding bit is 1, otherwise it is 0;

3)利用优先级位图,通过位图算法,使用指令集,找到优先级数组中存在就绪任务且优先级最高的优先级数组索引;3) Using the priority bitmap, through the bitmap algorithm, using the instruction set, find the priority array index with the highest priority in the priority array where there is a ready task;

4)根据数组索引,从优先级数组中找到对应优先级的队列上的队列头;4) According to the array index, find the queue head of the queue of the corresponding priority from the priority array;

5)从队列上添加或者摘除任务。5) Add or remove tasks from the queue.

如图10所示,采用FIFO队列方式实现调度硬实时线程的具体方式为:As shown in FIG10 , the specific method of scheduling hard real-time threads using the FIFO queue method is as follows:

1)将一个cpu上的所有硬实时线程结构全部组织在一个链表上,链表上的所有硬实时线程采用低优先级到高优先级、同优先级FIFO的组织方式挂接;1) All hard real-time thread structures on a CPU are organized in a linked list. All hard real-time threads on the linked list are connected in a FIFO organization from low priority to high priority with the same priority.

2)每次将一个硬实时线程加入链表时,都是从链表尾部(高优先级)向链表头部方向遍历,找到优先级小于等于当前硬实时优先级的线程时插入其中。2) Each time a hard real-time thread is added to the linked list, it is traversed from the tail (high priority) of the linked list to the head of the linked list, and when a thread with a priority less than or equal to the current hard real-time priority is found, it is inserted into the linked list.

在具体实施过程中,利用工具链中alias属性的功能,对已有的标准POSIX接口进行封装,以动态库的形式将硬实时服务接口暴露给用户,用户在编译阶段加入这套动态库,就能够实现从普通Linux任务到硬实时域任务的转换具体是指,通过alias属性的功能封装实现动态库,从而令用户只需要在编译阶段通过链接动态库的方式就能将任务编译为硬实时域的任务,这种实现方法能够令希望用户态业务在不同的环境上运行时使用不同的系统的业务开发人员,只需要维护一套业务代码,在编译时针对不同的运行环境,在编译工程中进行微调即可实现其诉求。In the specific implementation process, the function of the alias attribute in the tool chain is used to encapsulate the existing standard POSIX interface, and the hard real-time service interface is exposed to the user in the form of a dynamic library. The user can add this dynamic library in the compilation stage to achieve the conversion from ordinary Linux tasks to hard real-time domain tasks. Specifically, the dynamic library is implemented through the function encapsulation of the alias attribute, so that the user only needs to link the dynamic library in the compilation stage to compile the task into a hard real-time domain task. This implementation method enables business developers who want to use different systems when running user-mode businesses in different environments only to maintain a set of business codes, and to achieve their demands by making fine adjustments in the compilation project for different operating environments during compilation.

在本发明的一个实施例中,进行了实时性优化的Linux系统处理实时任务的具体流程为:In one embodiment of the present invention, the specific process of processing real-time tasks in a real-time optimized Linux system is as follows:

1)系统在收到IRQ硬件中断后,进入中断处理过程,系统进入到中断禁止状态;1) After receiving the IRQ hardware interrupt, the system enters the interrupt processing process and enters the interrupt disabled state;

2)完成中断处理后,系统恢复到能够正常接收外部硬件中断的过程;2) After completing the interrupt processing, the system returns to the process of being able to normally receive external hardware interrupts;

3)设置系统调度策略和进程优先级,其中系统的调度策略包括分时调度策略、先到先服务和时间片轮转的实时调度策略,其中实时进程的优先级为0-99,普通进程的优先级为100-139;3) Set the system scheduling strategy and process priority. The system scheduling strategy includes time-sharing scheduling strategy, first-come-first-served and time-slice round-robin real-time scheduling strategy. The priority of real-time process is 0-99, and the priority of ordinary process is 100-139;

4)按照系统调度策略和进程优先级进行任务调度;4) Schedule tasks according to system scheduling strategy and process priority;

5)使用标准POSIX接口进行应用开发,需要设置应用的优先级,运行应用前需要设置系统调度策略。5) When using the standard POSIX interface for application development, you need to set the application priority and the system scheduling policy before running the application.

将该流程与本发明进行对比,可以看出包含以下差异:Comparing this process with the present invention, it can be seen that the following differences are included:

①、IRQ处理设计与实现的差异:①. Differences between IRQ processing design and implementation:

现有技术采用关中断的方式处理IRQ。本发明通过中断管道、虚拟中断和硬实时域的新接口,实现了硬实时域IRQ和Linux域IRQ在中断处理上的划分和传递,Linux域IRQ不会影响硬实时域IRQ的处理,如果有硬实时域IRQ,则整个系统进入到中断禁止状态。The prior art processes IRQ by disabling interrupts. The present invention realizes the division and transfer of hard real-time domain IRQ and Linux domain IRQ in interrupt processing through interrupt pipeline, virtual interrupt and new interface of hard real-time domain. Linux domain IRQ will not affect the processing of hard real-time domain IRQ. If there is hard real-time domain IRQ, the whole system enters the interrupt disabled state.

②、实时任务调度设计与实现的差异:② Differences between real-time task scheduling design and implementation:

现有技术的调度策略包括分时调度策略、先到先服务和时间片轮转的实时调度策略,其中实时进程的优先级为0-99,普通进程的优先级为100-139,系统按照系统当前设置的调度策略和进程优先级进行任务调度。本发明在调度方面新增了数据结构来专门表示硬实时线程,这个结构保存了硬实时调度与双域相关的关键信息,同时还在数据结构上与Linux域的线程数据结构进行了关联,使得硬实时线程与普通Linux线程即分离又有一一对应的关系;在具体的调度方式方面,硬实时调度实现了两种不同的组织方式,包括优先级数组和FIFO队列方式,用户可根据自身业务情况,通过宏配置选择来选用不同的调度策略。The scheduling strategies of the prior art include time-sharing scheduling strategies, first-come-first-served and time-slice rotating real-time scheduling strategies, where the priority of real-time processes is 0-99, and the priority of ordinary processes is 100-139. The system schedules tasks according to the scheduling strategies and process priorities currently set by the system. The present invention adds a data structure in scheduling to specifically represent hard real-time threads. This structure stores key information related to hard real-time scheduling and dual domains, and is also associated with the thread data structure of the Linux domain in the data structure, so that hard real-time threads and ordinary Linux threads are separated and have a one-to-one correspondence; in terms of specific scheduling methods, hard real-time scheduling implements two different organizational methods, including priority arrays and FIFO queue methods. Users can choose different scheduling strategies through macro configuration selection according to their own business conditions.

③、实时应用开发方式差异:③. Differences in real-time application development methods:

现有技术使用标准POSIX接口进行应用开发,需要设置应用的优先级,运行应用前需要设置系统调度策略。本发明利用工具链中alias属性的功能,对已有的标准POSIX接口进行封装,以动态库的形式将硬实时服务接口暴露给用户,用户在编译阶段加入这套动态库,就能够实现从普通Linux任务到硬实时域任务的转换。The prior art uses the standard POSIX interface for application development, which requires setting the application priority and setting the system scheduling strategy before running the application. The present invention uses the alias attribute function in the tool chain to encapsulate the existing standard POSIX interface and expose the hard real-time service interface to the user in the form of a dynamic library. The user can add this dynamic library during the compilation stage to realize the conversion from ordinary Linux tasks to hard real-time domain tasks.

④、驱动支持差异:④. Driver support differences:

现有技术支持非硬实时的字符设备、块设备和网络接口,无统一的驱动框架,开发遵循内核模块的开发要求。本发明实现了硬实时驱动框架,对实时类设备和驱动实现做出了定义与实现,包括协议设备和名字设备,通过以上定义与实现,同一个硬件设备在硬实时域和Linux域都有对应的设备描述符,通过对引用不同域的设备文件描述符来实现双域下驱动的热切换,同时硬实时驱动支持模块提供了独立于底层系统的通用API,方便用户和开发者开展驱动移植工作。The existing technology supports non-hard real-time character devices, block devices and network interfaces, has no unified driver framework, and the development follows the development requirements of the kernel module. The present invention implements a hard real-time driver framework, defines and implements real-time devices and driver implementations, including protocol devices and name devices. Through the above definition and implementation, the same hardware device has corresponding device descriptors in the hard real-time domain and the Linux domain, and hot switching of drivers in the dual domains is achieved by referencing device file descriptors in different domains. At the same time, the hard real-time driver support module provides a general API independent of the underlying system, which is convenient for users and developers to carry out driver transplantation.

由此可见,本发明与上述现有技术的差异包括但不限于对于IRQ的处理过程、对于实时线程的调度过程、开发者对实时接口的使用方式。本发明提出的利用中断管道实现对硬实时域IRQ和Linux域IRQ的分离处理,判断IRQ中断类型,中断处理,创建硬实时域的硬实时线程数据结构,初始化硬实时调度相关数据结构并切换到实时域执行,进行实时线程调度,进行实施应用程序开发这些步骤,实现了对Linux嵌入式操作系统在硬实时领域功能的扩展,实现了硬实时程序在嵌入式混合内核操作系统下的高实时性和高稳定性运行,提升了嵌入式混合内核操作系统在硬实时场景下的通用性,规避了现有实时操作系统对Linux生态的兼容性问题,降低了开发者将原有应用迁移到支持硬实时的嵌入式混合内核操作系统上的压力,同时也降低了开发者使用实时性接口开发硬实时程序的难度和复杂度。It can be seen that the differences between the present invention and the above-mentioned prior art include but are not limited to the processing process for IRQ, the scheduling process for real-time threads, and the developer's use of real-time interfaces. The present invention proposes to use interrupt pipes to realize the separation of hard real-time domain IRQ and Linux domain IRQ, determine the IRQ interrupt type, interrupt processing, create hard real-time thread data structure of hard real-time domain, initialize hard real-time scheduling related data structure and switch to real-time domain execution, perform real-time thread scheduling, and implement application development. These steps realize the expansion of the functions of Linux embedded operating system in the hard real-time field, realize the high real-time and high stability operation of hard real-time programs under embedded hybrid kernel operating system, improve the versatility of embedded hybrid kernel operating system in hard real-time scenarios, avoid the compatibility issues of existing real-time operating system with Linux ecology, reduce the pressure on developers to migrate original applications to embedded hybrid kernel operating system supporting hard real-time, and also reduce the difficulty and complexity of developers using real-time interface to develop hard real-time programs.

综上所述,本发明保留了原生Linux系统的生态友好性,且对Linux已有的各级应用都能够实现兼容性,为开发者提供了良好的开发生态,也有利于实施Linux应用的迁移;本发明能够实现硬实时场景下中断、调度的时延确定性,系统能够广泛适用于嵌入式硬实时场景,助力国产嵌入式领域的发展;本发明降低了支持硬实时的嵌入式系统部署的复杂度,解决了适用于硬实时场景下的嵌入式系统部署困难的问题;本发明降低了系统及各级应用的开发方面的存储复杂度和难度,为开发者、运营者和用户提供了便利。In summary, the present invention retains the ecological friendliness of the native Linux system, and can achieve compatibility with existing Linux applications at all levels, providing developers with a good development ecology and facilitating the migration of Linux applications; the present invention can achieve the delay determinism of interrupts and scheduling in hard real-time scenarios, and the system can be widely used in embedded hard real-time scenarios, promoting the development of the domestic embedded field; the present invention reduces the complexity of deployment of embedded systems that support hard real-time, and solves the problem of difficult deployment of embedded systems suitable for hard real-time scenarios; the present invention reduces the storage complexity and difficulty in the development of systems and applications at all levels, providing convenience for developers, operators and users.

Claims (10)

1.一种支持硬实时的嵌入式混合内核操作方法,其特征在于,包括以下步骤:1. A method for operating an embedded hybrid kernel supporting hard real-time, characterized in that it comprises the following steps: S1、通过中断管道,定义一个高优先级处理阶段,使收到中断请求后运行注册到硬实时域的中断处理程序;S1. Define a high-priority processing stage through the interrupt pipeline so that the interrupt handler registered in the hard real-time domain is run after receiving the interrupt request; S2、通过硬实时域的中断处理程序判断当前中断请求是否为硬实时域中断,若是则进入步骤S3;否则进入步骤S4;S2, judging whether the current interrupt request is a hard real-time domain interrupt through the interrupt processing program of the hard real-time domain, if so, proceeding to step S3; otherwise, proceeding to step S4; S3、使硬实时域和Linux域同时处于中断禁止状态,处理硬实时域中断,进入步骤S5;S3, making the hard real-time domain and the Linux domain both in the interrupt disabled state, processing the hard real-time domain interrupt, and proceeding to step S5; S4、将当前中断请求交由Linux域中断处理程序进行处理,并使Linux域进入中断禁止状态、硬实时域保持正常状态,直至完成当前中断请求的处理;S4, handing over the current interrupt request to the Linux domain interrupt handler for processing, and making the Linux domain enter the interrupt disabled state, and the hard real-time domain maintains a normal state until the processing of the current interrupt request is completed; S5、创建硬实时线程调度的数据结构,保存硬实时调度与双域相关的关键信息,实现在不破坏Linux系统上线程调度模型的同时,确保硬实时任务调度的实时性;S5. Create a data structure for hard real-time thread scheduling, save key information related to hard real-time scheduling and dual domains, and ensure the real-time performance of hard real-time task scheduling without destroying the thread scheduling model on the Linux system; S6、配置调度策略,创建并初始化硬实时调度相关数据结构,实现任务域切换、驱动热切换,以及从非实时域切换到实时域执行;S6. Configure the scheduling strategy, create and initialize the hard real-time scheduling related data structure, implement task domain switching, drive hot switching, and switch from non-real-time domain to real-time domain execution; S7、基于调度策略调度硬实时线程。S7. Schedule hard real-time threads based on scheduling policies. 2.根据权利要求1所述的支持硬实时的嵌入式混合内核操作方法,其特征在于,步骤S2中判断当前中断请求是否为硬实时域中断的具体方式为:通过硬实时域的中断处理程序对当前中断请求在硬实时域进行检查,若当前中断请求在硬实时域存在相应的处理函数,则判定该中断请求为硬实时域中断;否则判定该中断请求为Linux域中断。2. The method for operating an embedded hybrid kernel supporting hard real-time according to claim 1 is characterized in that the specific manner of determining whether the current interrupt request is a hard real-time domain interrupt in step S2 is as follows: the current interrupt request is checked in the hard real-time domain by an interrupt handler in the hard real-time domain; if the current interrupt request has a corresponding processing function in the hard real-time domain, the interrupt request is determined to be a hard real-time domain interrupt; otherwise, the interrupt request is determined to be a Linux domain interrupt. 3.根据权利要求1所述的支持硬实时的嵌入式混合内核操作方法,其特征在于,步骤S3中使硬实时域和Linux域处于中断禁止状态的具体方法分别为:3. The method for operating an embedded hybrid kernel supporting hard real-time according to claim 1, characterized in that the specific methods for making the hard real-time domain and the Linux domain in the interrupt disabled state in step S3 are respectively: 引入虚拟中断替换原生Linux内核的中断,通过修改虚拟中断标志位使Linux域虚拟中断, Linux域进入中断禁止状态;Introduce virtual interrupts to replace native Linux kernel interrupts. Modify the virtual interrupt flag to enable virtual interrupts in the Linux domain, and the Linux domain enters the interrupt disabled state. 通过修改硬实时域接口标志位,使硬实时域进入中断禁止状态。By modifying the hard real-time domain interface flag bit, the hard real-time domain enters the interrupt disabled state. 4.根据权利要求1所述的支持硬实时的嵌入式混合内核操作方法,其特征在于,步骤S5中硬实时线程调度的数据结构包括struct hrt_arch_tcb tcb字段、struct hrt_sched *sched字段、struct hrt_class *sched_class字段;4. The method for operating an embedded hybrid kernel supporting hard real-time according to claim 1, characterized in that the data structure of the hard real-time thread scheduling in step S5 includes a struct hrt_arch_tcb tcb field, a struct hrt_sched *sched field, and a struct hrt_class *sched_class field; struct hrt_arch_tcb tcb字段,用于保存架构相关信息;struct hrt_arch_tcb tcb field, used to store architecture related information; struct hrt_sched *sched字段,用于保存硬实时调度相关的信息;The struct hrt_sched *sched field is used to store information related to hard real-time scheduling; struct hrt_class *sched_class字段,用于保存硬实时类线程相关信息。The struct hrt_class *sched_class field is used to store information related to hard real-time threads. 5.根据权利要求1所述的支持硬实时的嵌入式混合内核操作方法,其特征在于,步骤S6中创建并初始化硬实时调度相关数据结构,实现任务域切换、驱动热切换,以及从非实时域切换到实时域执行的具体方法为:5. The method for operating an embedded hybrid kernel supporting hard real-time according to claim 1, characterized in that the specific method for creating and initializing hard real-time scheduling related data structures in step S6, realizing task domain switching, driving hot switching, and switching from a non-real-time domain to a real-time domain for execution is: 创建一个Linux域线程,记为影子线程;Create a Linux domain thread, recorded as a shadow thread; 创建并初始化硬实时调度相关数据结构;Create and initialize hard real-time scheduling related data structures; 在Linux原生的主调度接口中,增加一个劫持操作,将影子线程设置为当前cpu的劫持线程;In the native Linux main scheduling interface, add a hijacking operation to set the shadow thread as the hijacking thread of the current CPU; 触发一次Linux标准调度,切换到下一个任务的尾部,调用域切换流程,从而完成影子线程从非实时域到实时域的切换;Trigger a Linux standard schedule, switch to the tail of the next task, call the domain switching process, and complete the switch of the shadow thread from the non-real-time domain to the real-time domain; 通过硬实时驱动框架中的硬实时驱动,在任务域切换的同时,通过硬实时线程中对硬实时域下设备文件描述符的引用,完成驱动热切换,将驱动从Linux域切换到硬实时域;Through the hard real-time driver in the hard real-time driver framework, when the task domain is switched, the driver hot switch is completed by referencing the device file descriptor in the hard real-time domain in the hard real-time thread, and the driver is switched from the Linux domain to the hard real-time domain. 将硬实时域线程结构加入到硬实时调度器的就绪队列,等待硬实时调度器调度运行,直到放弃cpu或者退出硬实时域;若放弃cpu或者退出硬实时域,则返回到触发一次Linux标准调度的流程没有完成的剩余部分。The hard real-time domain thread structure is added to the ready queue of the hard real-time scheduler, waiting for the hard real-time scheduler to schedule and run until the CPU is abandoned or the hard real-time domain is exited; if the CPU is abandoned or the hard real-time domain is exited, the remaining part of the process that triggers a Linux standard scheduling is returned and not completed. 6.根据权利要求5所述的支持硬实时的嵌入式混合内核操作方法,其特征在于,硬实时驱动框架包括预定义的实时类设备和驱动实现、硬实时驱动编程接口,以及硬实时驱动应用接口;6. The method for operating an embedded hybrid kernel supporting hard real-time according to claim 5, characterized in that the hard real-time driver framework includes predefined real-time class devices and driver implementations, hard real-time driver programming interfaces, and hard real-time driver application interfaces; 预定义的实时类设备和驱动实现包括预定义的协议设备和名字设备;其中所有面向消息的设备均属于协议设备,其余设备属于名字设备;应用通过posix socket操作协议设备;The predefined real-time devices and driver implementations include predefined protocol devices and name devices; all message-oriented devices are protocol devices, and the rest are name devices; applications operate protocol devices through POSIX sockets; 硬实时驱动编程接口,用于提供时钟服务、任务管理服务、同步服务、中断管理服务、非实时信号服务、实时内存分配服务、用户态内存访问服务、实时内核控制台输出服务和异常检查机制服务;Hard real-time driver programming interface, used to provide clock services, task management services, synchronization services, interrupt management services, non-real-time signal services, real-time memory allocation services, user-mode memory access services, real-time kernel console output services, and exception checking mechanism services; 硬实时驱动应用接口,面向于内核态的应用和用户态的应用,用于为使用硬实时驱动框架的内核态应用和用户态应用提供接口支撑。The hard real-time driver application interface is oriented to kernel-mode applications and user-mode applications, and is used to provide interface support for kernel-mode applications and user-mode applications that use the hard real-time driver framework. 7.根据权利要求5所述的支持硬实时的嵌入式混合内核操作方法,其特征在于,退出硬实时域的具体方法为:7. The method for operating an embedded hybrid kernel supporting hard real-time according to claim 5, wherein the specific method for exiting the hard real-time domain is: 调用硬实时域的suspend函数,为硬实时线程结构设置一个降级标志;Call the suspend function of the hard real-time domain and set a degradation flag for the hard real-time thread structure; 进入硬实时域主调度函数,在主调度函数入口将当前的运行域从实时降级到非实时;Enter the main scheduling function of the hard real-time domain, and downgrade the current operation domain from real-time to non-real-time at the entrance of the main scheduling function; 从就绪队列取出优先级最高的就绪硬实时任务取代自己运行;其中若当前就绪队列中只有硬实时IDLE任务,则返回到之前被抢占的Linux域任务。Take out the highest priority ready hard real-time task from the ready queue to replace itself; if there is only hard real-time IDLE task in the current ready queue, return to the previously preempted Linux domain task. 8.根据权利要求1所述的支持硬实时的嵌入式混合内核操作方法,其特征在于,通过工具链中alias属性的功能,对已有的标准POSIX接口进行封装,以动态库的形式将硬实时服务接口暴露给用户,使用户在编译阶段加入该动态库,实现从普通Linux任务到硬实时域任务的转换。8. The method for operating an embedded hybrid kernel supporting hard real-time according to claim 1 is characterized in that the existing standard POSIX interface is encapsulated through the function of the alias attribute in the tool chain, and the hard real-time service interface is exposed to the user in the form of a dynamic library, so that the user can add the dynamic library during the compilation stage to realize the conversion from ordinary Linux tasks to hard real-time domain tasks. 9.一种支持硬实时的嵌入式混合内核操作系统,其特征在于,包括硬实时中断管理模块、硬实时任务处理模块和硬实时驱动支持模块、Linux域,以及在Linux内核的基础上扩展得到的硬实时域;其中硬实时域的优先级高于Linux域;9. An embedded hybrid kernel operating system supporting hard real-time, characterized in that it comprises a hard real-time interrupt management module, a hard real-time task processing module, a hard real-time driver support module, a Linux domain, and a hard real-time domain expanded on the basis of the Linux kernel; wherein the priority of the hard real-time domain is higher than that of the Linux domain; 硬实时中断管理模块,用于通过中断管道,定义一个高优先级处理阶段,使收到中断请求后运行注册到硬实时域的中断处理程序;通过硬实时域的中断处理程序判断当前中断请求是否为硬实时域中断,若是则使硬实时域和Linux域同时处于中断禁止状态,处理硬实时域中断;否则将当前中断请求交由Linux域中断处理程序进行处理,并使Linux域进入中断禁止状态、硬实时域保持正常状态,直至完成当前中断请求的处理;The hard real-time interrupt management module is used to define a high-priority processing stage through the interrupt pipeline, so that the interrupt handler registered in the hard real-time domain is run after receiving the interrupt request; the interrupt handler of the hard real-time domain determines whether the current interrupt request is a hard real-time domain interrupt, and if so, the hard real-time domain and the Linux domain are both in the interrupt disabled state to process the hard real-time domain interrupt; otherwise, the current interrupt request is handed over to the Linux domain interrupt handler for processing, and the Linux domain is put into the interrupt disabled state, and the hard real-time domain remains in a normal state until the processing of the current interrupt request is completed; 硬实时任务处理模块,用于创建硬实时线程调度的数据结构,保存硬实时调度与双域相关的关键信息,实现在不破坏Linux系统上线程调度模型的同时,确保硬实时任务调度的实时性;配置调度策略,创建并初始化硬实时调度相关数据结构,实现任务域切换、驱动热切换,以及从非实时域切换到实时域执行;基于调度策略调度硬实时线程;The hard real-time task processing module is used to create the data structure of hard real-time thread scheduling, save the key information related to hard real-time scheduling and dual domains, and ensure the real-time performance of hard real-time task scheduling without destroying the thread scheduling model on the Linux system; configure the scheduling strategy, create and initialize the data structure related to hard real-time scheduling, realize task domain switching, drive hot switching, and switch from non-real-time domain to real-time domain execution; schedule hard real-time threads based on the scheduling strategy; 硬实时驱动支持模块,用于通过开发硬实时驱动框架,对实时类设备和驱动实现做出定义与实现,使同一个硬件设备在硬实时域和Linux域都有对应的设备描述符,使得通过驱动热切换可以实现同一个驱动设备在双域之间切换。The hard real-time driver support module is used to define and implement real-time devices and driver implementations by developing a hard real-time driver framework, so that the same hardware device has corresponding device descriptors in both the hard real-time domain and the Linux domain, and the same driver device can be switched between the two domains through driver hot switching. 10.根据权利要求9所述的支持硬实时的嵌入式混合内核操作系统,其特征在于,还包括:10. The embedded hybrid kernel operating system supporting hard real-time according to claim 9, characterized in that it also includes: 硬实时应用支持模块,用于通过工具链中alias属性的功能,对已有的标准POSIX接口进行封装,以动态库的形式将硬实时服务接口暴露给用户,使用户在编译阶段加入该动态库,实现从普通Linux任务到硬实时域任务的转换。The hard real-time application support module is used to encapsulate the existing standard POSIX interface through the alias attribute function in the tool chain, and expose the hard real-time service interface to the user in the form of a dynamic library, so that the user can add the dynamic library during the compilation stage to realize the conversion from ordinary Linux tasks to hard real-time domain tasks.
CN202410980645.XA 2024-07-22 2024-07-22 A method and system for operating an embedded hybrid kernel supporting hard real-time Active CN118519683B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410980645.XA CN118519683B (en) 2024-07-22 2024-07-22 A method and system for operating an embedded hybrid kernel supporting hard real-time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410980645.XA CN118519683B (en) 2024-07-22 2024-07-22 A method and system for operating an embedded hybrid kernel supporting hard real-time

Publications (2)

Publication Number Publication Date
CN118519683A CN118519683A (en) 2024-08-20
CN118519683B true CN118519683B (en) 2024-09-24

Family

ID=92275791

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410980645.XA Active CN118519683B (en) 2024-07-22 2024-07-22 A method and system for operating an embedded hybrid kernel supporting hard real-time

Country Status (1)

Country Link
CN (1) CN118519683B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115599530A (en) * 2022-11-25 2023-01-13 北京国科环宇科技股份有限公司(Cn) Hard real-time optimization transformation method based on Linux kernel

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7748003B2 (en) * 2004-12-20 2010-06-29 International Business Machines Corporation Hard real-time response
CN103389913B (en) * 2013-07-30 2017-03-29 武汉邮电科学研究院 A kind of Real-time Interrupt Processing method for linux system
CN103559045B (en) * 2013-11-21 2017-05-10 青岛大学 Hardware real-time operation system
KR20160110509A (en) * 2014-03-24 2016-09-21 인텔 코포레이션 Syncronization of interrupt processing to reduce power consumption
CN105373425A (en) * 2015-10-28 2016-03-02 浪潮(北京)电子信息产业有限公司 Method and device for performance optimization of embedded Linux system
CN111008100B (en) * 2019-10-16 2021-09-21 格力电器(杭州)有限公司 Linux real-time operating system interrupt response time test system and method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115599530A (en) * 2022-11-25 2023-01-13 北京国科环宇科技股份有限公司(Cn) Hard real-time optimization transformation method based on Linux kernel

Also Published As

Publication number Publication date
CN118519683A (en) 2024-08-20

Similar Documents

Publication Publication Date Title
JP4057989B2 (en) Scheduling method and information processing system
US7926062B2 (en) Interrupt and exception handling for multi-streaming digital processors
EP1716486B1 (en) Methods and apparatus for task management in a multi-processor system
JP3920818B2 (en) Scheduling method and information processing system
EP2316091B1 (en) Protected mode scheduling of operations
US8028292B2 (en) Processor task migration over a network in a multi-processor system
US8161453B2 (en) Method and apparatus for implementing task management of computer operations
JP5295228B2 (en) System including a plurality of processors and method of operating the same
US20010034751A1 (en) Real-time OS simulator
KR20040105685A (en) Processor system, task control method on computer system, computer program
KR20050000487A (en) Scheduling method and realtime processing system
KR20050016170A (en) Method and system for performing real-time operation
KR20050004688A (en) Scheduling method and information processing system
KR20070083460A (en) How and System to Run Multiple Kernels Simultaneously
Nakajima et al. Integrated management of priority inversion in real-time mach
US6108744A (en) Software interrupt mechanism
CN115237556A (en) Scheduling method and device, chip, electronic device and storage medium
CN118519683B (en) A method and system for operating an embedded hybrid kernel supporting hard real-time
JPH11272480A (en) On-chip real time os
WO2000070482A1 (en) Interrupt and exception handling for multi-streaming digital processors
US7320044B1 (en) System, method, and computer program product for interrupt scheduling in processing communication
JPH0895803A (en) Task scheduling method
JPH09160790A (en) Device and method for task schedule
KR102575773B1 (en) Processor capable of processing external service requests using a symmetrical interface
JP2001155001A (en) Method and device for controlling multiprocessor task

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant