当前位置:网站首页>[AUTOSAR eight OS]
[AUTOSAR eight OS]
2022-07-03 00:50:00 【Ke Yuqian】
AutoSAR 8、 ... and OS
1 Tasks
- Basic tasks (Basic Task)
- Extended tasks (Extended Task)
1.1 Basic tasks (Basic Task)
When the operating system is started , be-all Task All enter the suspended state ; Then from The user triggers what needs to be executed Task( Generally in DaVinci There are configurations in , Can generate code , For example, it is configured to initialize execution or 100ms Cycle execution ); Triggered Task Are directly ready , Waiting to be OS call ; At this time OS Will be based on Task Priority to schedule Task( If there is a high priority Task Ready ,OS Will suspend the ongoing Task, Give priority to high priority Task perform , Then continue to execute the suspended Task, Similar to interrupt nesting ).

1.2 Extended tasks (Extended Task)
The extended task has one more waiting state than the basic task , This state is when Task While running , Suddenly need an event ( Like just ADC Data update ), While waiting for this event ,Task Enter the waiting state and release CPU resources , Low priority Task You can continue to occupy CPU; When ADC The data update event is coming , Then let's wait Task Enter ready state , Because of the high priority , Then enter the running state .
2 Alarms
Alarms As the name suggests, it is an alarm clock , Role is Set a cycle timing , But it can not only be used to trigger Task, It can also be used to set a Event Events or Call A callback function .
Alarms The time benchmark of is generated by hardware timer Tick Time Decisive , Every Tick Time How much time can I spend in DaVinci Middle configuration . Every one of them Tick Time,System Counter Benga 1, Add to the preset value ,Alarm It was triggered .
3 Interrupts
- Interrupt priority is always higher than Task
- In the priority of interrupts, class I interrupts are greater than class II interrupts ;
- periodic Task And periodic interrupts can be processed periodically , But in the case of strict cycle requirements , It is better to use interrupt
3.1 Class I interrupt (Cat1)
- No access OS service , After the interruption, return directly to the interruption
- here OS Still follow the normal schedule
3.2 Class II interrupt (Cat2)
- Will visit some OS service ( some OS Service is not allowed , such as TerminateTask)
- Once after the interruption OS The rescheduling of .
3.3 The difference between class I and class II interrupts
- Class I interrupt : Because... Is not allowed OS service , Therefore, you cannot call Task2 Trigger function , You can only return to after exiting the interrupt Task1, And then wait OS Should be called Task2 I'll call it again when
- Class II interrupt : Because it is allowed to use OS Some services , At this time, we write Task2 Trigger function , Then a scheduling will occur directly when the interrupt ends and returns , because Task2 Triggered , High priority , Then go straight into Task2 function , etc. Task2 End of run , Back again Task1 Continue operation ( The following figure 2 situation ); Of course , It is also possible not to trigger other Task,OS The scheduling will still return to Task1 In the middle ( The following figure 1 situation )

4 IOC (Inter OS Application Communicator)
It opens a protected in memory IOC Area , For cross nuclear communication .
This area supports multiple input multiple output , from OS management , stay DaVinci Generally, it is generated automatically without modification , This is for understanding only
5 OS Resources
When at least two Task When accessing the same resource in parallel , There's probably something wrong with it ,OS Resources It is used to prevent parallel access errors

边栏推荐
猜你喜欢

kubernetes资源对象介绍及常用命令(五)-(NFS&PV&PVC)

Attributeerror: 'tuple' object has no attribute 'layer' problem solving

How to systematically learn machine learning

Shell 实现文件基本操作(sed-编辑、awk-匹配)

【AutoSAR 十一 通信相关机制】

Arduino开发之按键检测与正弦信号输出

百度智能云牵头打造智能云综合标准化平台

Linux Software: how to install redis service
![[overview of AUTOSAR four BSW]](/img/19/c2273bbedb7f8d859e5a3805ed5740.png)
[overview of AUTOSAR four BSW]

In the first half of 2022, there are 10 worth seeing, and each sentence can bring you strength!
随机推荐
指针进阶(一)
腾讯云免费SSL证书扩展文件含义
【AutoSAR 三 RTE概述】
leetcode-2115:从给定原材料中找到所有可以做出的菜
【AutoSAR 六 描述文件】
cordova-plugin-device获取设备信息插件导致华为审核不通过
The most painful programming problem in 2021, adventure of code 2021 Day24
Gan model architecture in mm
In the first half of 2022, there are 10 worth seeing, and each sentence can bring you strength!
【AutoSAR 十三 NVM】
Wechat applet obtains the information of an element (height, width, etc.) and converts PX to rpx.
【AutoSAR 四 BSW概述】
世平信息首席科学家吕喆:构建以数据和人员为中心的安全能力
Kubernetes resource object introduction and common commands (V) - (NFS & PV & PVC)
Automated defect analysis in electron microscopic images-论文阅读笔记
Shell 实现文件基本操作(sed-编辑、awk-匹配)
antv x6节点拖拽到画布上后的回调事件(踩大坑记录)
node_ Modules cannot be deleted
指针初阶(基础)
1.12 - Instructions