CN102306112B - Method for improving scheduling flexibility and resource utilization rate of automotive open system architecture operating system (AUTOSAR OS) based on Contract - Google Patents

Method for improving scheduling flexibility and resource utilization rate of automotive open system architecture operating system (AUTOSAR OS) based on Contract Download PDF

Info

Publication number
CN102306112B
CN102306112B CN 201110230201 CN201110230201A CN102306112B CN 102306112 B CN102306112 B CN 102306112B CN 201110230201 CN201110230201 CN 201110230201 CN 201110230201 A CN201110230201 A CN 201110230201A CN 102306112 B CN102306112 B CN 102306112B
Authority
CN
China
Prior art keywords
contract
server
autosar
scheduling
module
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.)
Expired - Fee Related
Application number
CN 201110230201
Other languages
Chinese (zh)
Other versions
CN102306112A (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.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN 201110230201 priority Critical patent/CN102306112B/en
Publication of CN102306112A publication Critical patent/CN102306112A/en
Application granted granted Critical
Publication of CN102306112B publication Critical patent/CN102306112B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to a method for improving the scheduling flexibility and resource utilization rate of an automotive open system architecture operating system (AUTOSAR OS) based on Contract. An abstraction layer is added to the original AUTOSAR OS software platform structure. The abstraction layer is formed by four modules including a core module, a dynamic reclamation module, a hierarchical scheduling module and a spare capacity sharing module. Owing to the application of the Contract model to the AUTOSAR OS, the AUTOSAR OS can satisfy complex time requirements from users more easily. Besides, based on the introduction of the Contract model, the AUTOSAR OS can meet dynamically-changed time requirements. Compared with the prior art, the invention has the following benefits: (1) based on a Contract model, the complex time requirements from users are satisfied; (2) the maximum resource demand and schedulability of the system can be ensured by resource reversion and on-line/off-line schedulability analysis; (3) the resource utilization rate is optimized by reclaiming and re-distributing the capacities of idle processors; and (4) a user can freely select the most appropriate scheduling algorithm to schedule corresponding tasks.

Description

Based on the raising AUTOSAR OS dispatching flexibility of contract and the method for resource utilization
Technical field
The present invention relates to embedded real-time operating system to resource scheduling mechanism, especially a kind of based on the raising AUTOSAR OS dispatching flexibility of contract and the method for resource utilization.
Background technology
The Contract model is the interface between application layer and dispatch layer, and it has proposed the abstract of a higher level, makes the developer only need to formulate the needs of application program, and does not need the parameter correlation of these demands and specific dispatching algorithm is joined.AUTOSAR (AUTomotive Open System Architecture) is a standardized open automobile software architecture.AUTOSAR OS is the embedded real-time operating system that meets the AUTOSAR standard, is the RTOS of the multitask uniprocessor of a static configuration.The AUTOSAR standard of institute of the present invention reference is the 3.0.1 version, and realizes at the OS that meets the AUTOSAR standard by Zhejiang University's independent research---on SmartOSEK OS.
In the real-time system field, traditional idea thinks that RTOS only need to satisfy automobile function statement of requirements book official hour demand and get final product.In fact, under nowadays more occasion, common many of the task of soft real-time task when strong in RTOS.In addition, along with the continuous lifting of the processing power of the microprocessor of using at automotive field, satisfy those time demands and become relatively easy.Yet because increasing functional unit is integrated on a processor, become more and more important for the partition problem of processor resource.So in most AUTOSAR OS implementation procedure, the developer conflicts mutually for fear of the problem because of resource occupation between different task, each task can only apply for minimum resource when configuration.Under such configuration prerequisite, can be lower for the overall utilization rate of processor resource.After introducing the contract model, just can be on several task assignments to a contract, just can form through consultation reclaim dynamically idle processor resource and be assigned on server corresponding to busy contract between contract and contract like this, thus dirigibility and the utilization factor of the scheduling of resource of raising RTOS.
In present real time operating system, there are the following problems: carry out owing to will a plurality of functional modules being mapped to a processor, for the corresponding task of each functional module is collided, need to reduce the resource occupation amount of each task, thereby cause the decline of whole processor resource utilization factor.
Summary of the invention
Purpose of the present invention will solve the deficiency that above-mentioned technology exists just, and a kind of raising AUTOSAR OS dispatching flexibility based on contract and the method for resource utilization are provided, be used for improving the embedded real-time operating system dirigibility and to the utilization factor of resource based on the method for contract.
The present invention solves the technical scheme that its technical matters adopts: general AUTOSAR OS is static configuration, thisly based on the raising AUTOSAR OS dispatching flexibility of contract and the method for resource utilization, the contract model is applied on AUTOSAR OS, make AUTOSAR OS be more prone to satisfied for the time demand of the complexity of user's proposition, after meanwhile introducing the contract model, can also make AUTOSAR OS support the time demand of dynamic change.
Increase one deck level of abstraction on original AUTOSAR OS software platform structure, this level of abstraction is respectively nucleus module core, dynamic recycling module Dynamic reclamation, layering scheduler module Hierarchical scheduling and spare capacity sharing module Spare capacity sharing by four module compositions;
(1), specify the attribute of contract and relevant operation by nucleus module, the attribute of Contract is exactly some parameters, be used for creating contract, carry out the negotiation between contract, binding task is used for guaranteeing the resource reservation mechanism of minimum resource requirements to server and RTOS;
(2), dynamically recycling module is a functional module, carries out dynamically when having the idle processor ability by dynamic recycling module in system and reclaims, and distributes those server there is no the idle processor ability of the hang-up of use by the spare capacity sharing module; If when operation, due to the abnormal end of task or completed the extra idle processor ability that produced before dispatching point, configuration according to contract, share the cooperation of two modules by dynamic recovery and spare capacity, these idle processing poweies can be assigned on those different server that need extra processing power.
(3), carry out overall scheduling and local scheduling by the layering scheduler module, the layering scheduling mainly occurs in two aspects---overall scheduling and local scheduling.As shown in Figure 2, overall scheduling be used for to determine which server can the access processor resource, and local scheduling is the scheduling in server inside, is used for determining which task of scheduling carries out.
In the present invention, the method can be assigned to certain contract to several task, the attribute of configuration contract, the attribute of these contract have comprised that the negotiation that creates between contract, contract, binding task are to the relevant parameter of server and resource reservation mechanism.Guarantee the minimized resource demand of AUTOSAR OS by resource reservation mechanism, by the schedulability that contract consults and negotiation mechanism (Schedulability Analysis of online and offline) guarantees the OS task again.
In the present invention, the method has been introduced the contract model, and every a plurality of task are corresponding to a contract, is configured for the scheduling strategy of each contract.The user just can select most suitable scheduling strategy to satisfy the demand of oneself from the numerous senior real-time scheduling of present realization like this, can realize different task is specified different scheduling strategies.
As preferably, after contracts is ready, these contracts need to hold consultation, can estimate it test by schedulability, whether system can check has enough resources to satisfy the minimum resource requirements of the new contract that adds in the situation that guarantee before to have the normal operation of contracts; Pass through if consult, system can keep the minimum resource requirements that enough resource budgets satisfy the new contract that adds, server that simultaneously can a newly-built corresponding contract, server is the software object of contract under system running state, and it has stored all information of contract; Server can manage the executive condition that is tied to the task above it, as long as task has been bound to above a certain server, the layering scheduler will be dispatched its execution so.In accompanying drawing 2, global scheduler is the fixed priority scheduling (FP) based on sporadic server, and local scheduler has three, and the algorithm of realization is respectively EDF, FP and FIFO.
The present invention compared with prior art, useful effect is:
1. based on the contract model, can satisfy the time demand of user's complexity.
By on resource reservation and line/line under Schedulability Analysis guarantee minimum resource requirements and the schedulability of system.
3. by reclaiming and heavily distributing the idle processor ability to obtain more excellent resource utilization.
4. the user can freely select most suitable dispatching algorithm to dispatch corresponding tasks.
Description of drawings
Fig. 1 uses the present invention's SmartSAR software platform configuration diagram before;
Fig. 2 is the hierarchy scheduling model schematic diagram;
Fig. 3 uses the present invention's SmartSAR software platform framework afterwards;
Fig. 4 is the implementation of task in SmartOSEK OS.
Embodiment
The invention will be further described below in conjunction with drawings and Examples:
The present invention is at the RTOS that meets the AUTOSAR standard of Zhejiang University's independent research---obtained realization on SmartOSEK OS.Other modules of SmartOSEK OS and SmartSAR software platform closely are connected, before not introducing the present invention, the software platform framework of SmartSAR after introducing the present invention, has increased the another one submodule as shown in Figure 3 as shown in Figure 1 in SmartOSEK OS module.
Introducing the present invention after SmartOSEK, the data structure of definition is as follows:
The attribute of table 1.contract structure
Parameter name Parametric description
max_period The maximum cycle of Server.
min_budget The executive capability of each cycle minimum of Server.
deadline The closing time of Server
D=T Whether equal the cycle closing time of Server.
budget_overran The budget of current moving of task is expired.
deadline_missed Current task has surpassed closing time.
granularity Indication needs to use the mode of extra spare capacity and use additional free ability: continuous, discrete or nothing.
min_period The minimum period of Server.
max_budget Available maximum budget.
utilization_set Bdget, the set of period} order idol are used for discrete spare capacity and distribute.
importance Be used for the fixed priority that continuous spare capacity distributes.
quality In continuous spare capacity distributes, two relative scales that the identical server of fixed priority distributes.
scheduling policy The local scheduler scheduling strategy is selected: FP, EDF, FIFO, NON.
The extra attribute of table 2.server structure
Parameter name Parametric description
priority Scheduling parameter.
vres_id The id. of API
Task Be tied to the tasks. on server
task_num Be tied to the number of the task on server.
task_finished_num The number of the task that completes in one-period.
sporadic server Sporadic server is assigned on this server.
spare_capacity The ability of the free time of system assignment.
used_capacity Server has made the ability of using up.
Table 3.sporadic server structure
Parameter name Parametric description
replenishment queue Be used for storing the array of prolongation and idle processor ability quantity.
Alarm [2] Indicate which alarm can replenish to the processor ability that after date is consumed.
remaining budget The upper budget that there is no the accumulation of use of Server.
budget start When sporadic server entered activated state from idle condition, task began to carry out, and the processor ability begins to be consumed.
What table 1 was listed is the description of attribute and each attribute of the contract in SmartOSEK OS.Basically all information that comprised contract due to server are so table 2 attribute of having listed except contract is described with corresponding.It should be noted that some module is extendible, the attribute that belongs to these modules is also extendible.In AUTOSAR OS, server can be considered to special task to be dispatched by global scheduler.The present invention adopts the sporadic server based on fixed priority to dispatch server.The sporadic server that is each server use that table 3 is described.
By accompanying drawing 3 as can be known, can't change original OS kernel after introducing the present invention, the user can determine whether to need to use function of the present invention by macro switch in OS.The present invention at the detailed processing flow chart of SmartOSEK as shown in Figure 4.
Concrete implementation step is as follows:
(1) according to the attribute of the contract of definition in application demand allocation list 1, generate contract.
(2) to holding consultation between each contract, the schedulability of judgement system, if non-scheduling carry out (3), if could dispatch carry out (4)
(3) return to mistake, system's non-scheduling, refusal adds the request of this contract
(4) server that a newly-built contract is corresponding and corresponding sporadic server is set
(5) the processor ability of free time dynamically reclaimed reservation process machine resource
(6) task is tied on the server that has accordingly the processor ability
(7) OS begins the task that is assigned on different server is dispatched, Sporadic server utilizes Fixed Priority Schedule Algorithm that the different server that is assigned to above it is dispatched, and different server adopts different scheduling strategies (EDF, FP, FIFO) task of dispatching distribution on it.
(8) after all tasks are all carried out end, OS dynamically recycles the device resource again and redistributes
Although describe the present invention by above-mentioned instantiation; but the present invention is not limited to above-mentioned example; related personnel for this area; can be according to technical scheme of the present invention and thought; make other various changes and distortion, and all these should belong in the protection domain of claim of the present invention.

Claims (2)

1. one kind based on the raising AUTOSAR OS dispatching flexibility of contract and the method for resource utilization, it is characterized in that: increase one deck level of abstraction on original AUTomotive Open System Architecture OS software platform structure, this level of abstraction is respectively nucleus module core, dynamic recycling module Dynamic reclamation, layering scheduler module Hierarchical scheduling and spare capacity sharing module Spare capacity sharing by four module compositions;
(1), specify the attribute of contract and relevant operation by nucleus module, the attribute of Contract is exactly some parameters, be used for creating contract, carry out the negotiation between contract, binding task is used for guaranteeing the resource reservation mechanism of minimum resource requirements to server and embedded real-time operating system RTOS;
(2), when having the idle processor ability by dynamic recycling module in system, execution is dynamically reclaimed, and distributes those server there is no the idle processor ability of the hang-up of use by the spare capacity sharing module; If when operation, due to the abnormal end of task or completed the extra idle processor ability that produced before dispatching point, the different server that these idle processing poweies can be assigned to according to the method for appointment in contract needs processor ability gets on;
(3), carry out overall scheduling and local scheduling by the layering scheduler module, overall scheduling is used for determining which server can the access processor resource, and local scheduling is the scheduling in server inside, is used for determining which task of scheduling carries out;
After contracts is ready, these contracts need to hold consultation, can estimate it test by schedulability, and whether system can check has enough resources to satisfy the minimum resource requirements of the new contract that adds in the situation that guarantee before to have the normal operation of contracts; Pass through if consult, system can keep the minimum resource requirements that enough resource budgets satisfy the new contract that adds, server that simultaneously can a newly-built corresponding contract, server is the software object of contract under system running state, and it has stored all information of contract; Server can manage the executive condition that is tied to the task above it, as long as task has been bound to above a certain server, the layering scheduler will be dispatched its execution so;
Wherein contract refers to the interface Contract model between application layer and dispatch layer.
2. according to claim 1 based on the raising AUTOSAR OS dispatching flexibility of contract and the method for resource utilization, it is characterized in that: the method has been introduced the contract model, every a plurality of task is corresponding to a contract, is configured for the scheduling strategy of each contract.
CN 201110230201 2011-08-11 2011-08-11 Method for improving scheduling flexibility and resource utilization rate of automotive open system architecture operating system (AUTOSAR OS) based on Contract Expired - Fee Related CN102306112B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110230201 CN102306112B (en) 2011-08-11 2011-08-11 Method for improving scheduling flexibility and resource utilization rate of automotive open system architecture operating system (AUTOSAR OS) based on Contract

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110230201 CN102306112B (en) 2011-08-11 2011-08-11 Method for improving scheduling flexibility and resource utilization rate of automotive open system architecture operating system (AUTOSAR OS) based on Contract

Publications (2)

Publication Number Publication Date
CN102306112A CN102306112A (en) 2012-01-04
CN102306112B true CN102306112B (en) 2013-06-05

Family

ID=45379977

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110230201 Expired - Fee Related CN102306112B (en) 2011-08-11 2011-08-11 Method for improving scheduling flexibility and resource utilization rate of automotive open system architecture operating system (AUTOSAR OS) based on Contract

Country Status (1)

Country Link
CN (1) CN102306112B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113031927A (en) * 2021-03-26 2021-06-25 苏州挚途科技有限公司 Data input and output method, device and system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070101316A1 (en) * 2005-09-12 2007-05-03 Don Berndt Software Architecture and Program for the Concurrent Execution of Finite State Machine-Encoded Processes, on Single or Multiple-Processor-Based Embedded Systems
US20070204271A1 (en) * 2006-02-28 2007-08-30 Andrew Gaiarsa Method and system for simulating a multi-CPU/multi-core CPU/multi-threaded CPU hardware platform
CN101452404B (en) * 2008-12-09 2013-11-06 中兴通讯股份有限公司 Task scheduling apparatus and method for embedded operating system
CN101833477B (en) * 2010-05-28 2013-06-12 浙江大学 Aperiodic task scheduling method based on SmartOSEK OS
CN102096605B (en) * 2011-02-17 2012-10-03 成电汽车电子产业园(昆山)有限公司 Multi-level resource management implementation method in embedded real-time operation system
CN102135903B (en) * 2011-03-09 2013-01-09 上海交通大学 Hardware virtualization-based Xen real-time performance improving system and method thereof

Also Published As

Publication number Publication date
CN102306112A (en) 2012-01-04

Similar Documents

Publication Publication Date Title
US10574748B2 (en) Systems and methods for allocating one or more resources in a composite cloud environment
US9141433B2 (en) Automated cloud workload management in a map-reduce environment
Calheiros et al. Cost-effective provisioning and scheduling of deadline-constrained applications in hybrid clouds
Buyya et al. Gridsim: A toolkit for the modeling and simulation of distributed resource management and scheduling for grid computing
Lipari et al. A framework for hierarchical scheduling on multiprocessors: from application requirements to run-time allocation
Devi Soft real-time scheduling on multiprocessors
Ueter et al. Reservation-based federated scheduling for parallel real-time tasks
Leontyev et al. A hierarchical multiprocessor bandwidth reservation scheme with timing guarantees
Zhang et al. Energy-efficient tasks scheduling heuristics with multi-constraints in virtualized clouds
Duan et al. Performance and cost optimization for multiple large-scale grid workflow applications
CN102708003A (en) Method for allocating resources under cloud platform
CN109992418A (en) The multi-tenant big data platform resource priority level scheduling method and system of SLA perception
Davis et al. An investigation into server parameter selection for hierarchical fixed priority pre-emptive systems
Bini et al. The multi supply function abstraction for multiprocessors
Mascitti et al. Dynamic partitioned scheduling of real-time dag tasks on arm big. little architectures
CN116302519A (en) Micro-service workflow elastic scheduling method, system and equipment based on container cloud platform
CN116795541A (en) Resource scheduling and resource scheduling query method, equipment and medium
Walraven et al. Adaptive performance isolation middleware for multi-tenant saas
Panahi et al. The design of middleware support for real-time SOA
Isovic et al. Handling mixed sets of tasks in combined offline and online scheduled real-time systems
CN102306112B (en) Method for improving scheduling flexibility and resource utilization rate of automotive open system architecture operating system (AUTOSAR OS) based on Contract
Hu et al. Adaptive real-time scheduling of dynamic multiple-criticality applications on heterogeneous distributed computing systems
Richardson et al. An admission control protocol for real-time OSGi
Bassiri et al. On-line HW/SW partitioning and co-scheduling in reconfigurable computing systems
Kong et al. Guaranteed scheduling for (m, k)-firm deadline-constrained real-time tasks on multiprocessors

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB03 Change of inventor or designer information

Inventor after: Li Hong

Inventor after: Gu Zonghua

Inventor after: Chen Haojie

Inventor after: Wang Xuyang

Inventor after: Zhang Chengshuo

Inventor after: Wu Chaohui

Inventor before: Li Hong

Inventor before: Gu Zonghua

Inventor before: Chen Haojie

Inventor before: Wang Xuyang

Inventor before: Zhang Chengshuo

COR Change of bibliographic data

Free format text: CORRECT: INVENTOR; FROM: LI HONG GU ZONGHUA CHEN HAOJIE WANG XUYANG ZHANG CHENGSHUO TO: LI HONG GU ZONGHUA CHEN HAOJIE WANG XUYANG ZHANG CHENGSHUO WU ZHAOHUI

C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130605