[工学]09嵌入式系统及应用-面向行业的嵌入式操作系统-OSEK-VDX.pptVIP

  • 7
  • 0
  • 约2.18万字
  • 约 50页
  • 2018-03-27 发布于浙江
  • 举报

[工学]09嵌入式系统及应用-面向行业的嵌入式操作系统-OSEK-VDX.ppt

[工学]09嵌入式系统及应用-面向行业的嵌入式操作系统-OSEK-VDX

Mixed preemptive scheduling If preemptable and non preemptable tasks are mixed on the same system, the resulting policy is called mixed preemptive scheduling. Many applications comprise only few parallel tasks with a long execution time, for which a full preemptive operating system would be convenient and many short tasks with a defined execution time where non preemptive scheduling would be more efficient. 3.5 Termination of tasks In the OSEK operating system, a task can only terminate itself (self-termination). The OSEK operating system provides the service ChainTask to ensure that a dedicated task activation is performed just after the termination of the running task. Each task shall terminate itself at the end of its code. Ending the task without a call to TerminateTask or ChainTask is strictly forbidden and causes undefined behaviour. 4 Application modes Many ECUs may execute completely independent applications as e.g. factory test, Flash pro-gramming or normal operation. allow an OSEK operating system to come up under different modes of operation. The minimum number of supported application modes is one. It is intended only for modes of operation that are totally mutually exclusive. Once the operating system has been started, it shall not be allowed to change the application mode. Typically each application mode uses its own subset of all tasks, ISRs, alarms and timing conditions, although there is no limitation to having a task or ISR running in different modes. 5 Interrupt processing two ISR categories: ISR category 1 The ISR does not use an operating system service. After the ISR is finished, processing continues exactly at the instruction where the interrupt has occurred. ISRs of this category have the least overhead. ISR category 2 The OSEK operating system provides an ISR-frame to prepare a run-time environment for a dedicated user routine. During system generation the user routine is assigned to the interrupt. Inside the ISR no reschedulin

文档评论(0)

1亿VIP精品文档

相关文档