Forums

Plz help me finding the logic for implementing the BCC2 and ECC2 in OSEK RTOS

Started by alag...@gmail.com July 26, 2007
hi,
i am developing OSEK RTOS. we already implemented the BCC1 and ECC1 in
our RTOS.. its working fine in application also...
Bcc1 and Ecc1 will support the following
1.One Task per priority

now we r upgrading our RTOS to support BCC2 and ECC2 conformance
class.
BCC2 and Ecc2 will support the following
1.More number of task per priority
2.More no. of activation of a task

did any one written the code for implementing the bcc2 and ecc2.i need
some startup logic to implement the above said.

i want know whether i have make changes in the scheduler logic....

i already tried in one way but it doesn't helped me... please can any
one give their suggestion to solve this problem.

with regards,
Alagusakthi

Hi,



I think for BCC2 you have to make no big changes. BCC2 is the same like BCC1 
plus the support of more than one task with the same priority and multiple 
task activation. ECC2 is like ECC1 plus more than one task with the same 
priority and multiple activation of basic tasks. Basic tasks and extended 
tasks differ in their number of states. Basic tasks in OSEK-OS can be in the 
states 'ready', 'running', and suspended. Extended tasks can be additionally 
in the state 'waiting'. For your scheduling policy this means, that you have 
to support non-preemptive scheduling for basic tasks and preemptive 
scheduling for extended tasks. In BCC2 and ECC2 tasks with the same priority 
are allowed. In the case of two or more readdy tasks this means that the 
scheduler always chooses the task with the lower activation time and 
switches it to the 'running' state.



Yes, I have source code of an OSEK-OS, but sorry, I am not allowed to give 
it to you.



Best regards,



Olaf Barheine


<alagusakthi@gmail.com> schrieb im Newsbeitrag 
news:1185445293.825350.229440@x35g2000prf.googlegroups.com...
> hi, > i am developing OSEK RTOS. we already implemented the BCC1 and ECC1 in > our RTOS.. its working fine in application also... > Bcc1 and Ecc1 will support the following > 1.One Task per priority > > now we r upgrading our RTOS to support BCC2 and ECC2 conformance > class. > BCC2 and Ecc2 will support the following > 1.More number of task per priority > 2.More no. of activation of a task > > did any one written the code for implementing the bcc2 and ecc2.i need > some startup logic to implement the above said. > > i want know whether i have make changes in the scheduler logic.... > > i already tried in one way but it doesn't helped me... please can any > one give their suggestion to solve this problem. > > with regards, > Alagusakthi >
hi Barheine,

thanks for ur reply..

"In BCC2 and ECC2 tasks with the same priority are allowed. In the
case of two or more readdy tasks this means that the
scheduler always chooses the task with the lower activation time and
switches it to the 'running' state."


sorry i didnt get u.... please give me an example so that i can get an
idea... in my rtos i dont have activation time concept... i didnt get
clear with activation time concept... please tell some thing about
activation time....
so that i will imple ment in my rtos code...

with regards,
Alagusakthi

Hello,

> sorry i didnt get u.... please give me an example so that i can get an > idea... in my rtos i dont have activation time concept... i didnt get > clear with activation time concept... please tell some thing about > activation time.... > so that i will imple ment in my rtos code...
In OSEK extended tasks can be running, waiting, suspended or in the ready state. The activation time is the time a task changes from suspended into the ready state. At that point the tasks gets the processor and starts its first command. This is nothing special. Earlier you have written that you have already implemeted BCC1 and ECC1. So, you should already have an ActivateTask()-function. Maybe, it would be easier for you to study the specification of OSEK, especially the state modell, the scheduling policy, the task activation etc. There is also a book about OSEK from Matthias Homann who gives an good overview and introduction, but it is German. Did you already visit the homepage http://www.osek-vdx.org ? Best regards, Olaf Barheine
On Jul 27, 11:08 am, "Olaf Barheine" <barhe...@gmx.net> wrote:
> Hello, > > > sorry i didnt get u.... please give me an example so that i can get an > > idea... in my rtos i dont have activation time concept... i didnt get > > clear with activation time concept... please tell some thing about > > activation time.... > > so that i will imple ment in my rtos code... > > In OSEK extended tasks can be running, waiting, suspended or in the ready > state. The activation time is the time a task changes from suspended into > the ready state. At that point the tasks gets the processor and starts its > first command. This is nothing special. Earlier you have written that you > have already implemeted BCC1 and ECC1. So, you should already have an > ActivateTask()-function. > > Maybe, it would be easier for you to study the specification of OSEK, > especially the state modell, the scheduling policy, the task activation etc. > There is also a book about OSEK from Matthias Homann who gives an good > overview and introduction, but it is German. Did you already visit the > homepagehttp://www.osek-vdx.org? > > Best regards, > > Olaf Barheine
hi Barheine, thanks for ur mail.... yah now i understood the activate time ..... yes in my RTOS i have ActivateTask function... that will change task frm suspend to ready state or even to running state... its all happening in my rtos with out any problem....
>>In BCC2 and ECC2 tasks with the same priority >>are allowed. In the case of two or more readdy tasks this means that the >>scheduler always chooses the task with the lower activation time and >>switches it to the 'running' state.
will u please tell me how the lower activation time helps me to implement BCC2 and ECC2... yes i visited that site already... but i didnt study the OSEK from Matthias Homann book for RTOS... i will serach that wesite now... with regards, Alagusakthi
Hello,

> will u please tell me how the lower activation time helps me to > implement BCC2 and ECC2... >
I think this is very straightforward: 1) The scheduler searches all tasks which are in the 'ready' or 'running' state 2) From this set of running and ready tasks the scheduler determines the set of tasks with the highest priority. 3) From this set of highest priorty tasks the scheduler chooses that one, which is the oldest, i.e. that one with the lowest activation time. That's all, isn't it? But remember that for BCC2 the tasks are non-preemptive and for ECC2 preemptions are allowed. Best reagrds, Olaf Barheine
Hello,

> will u please tell me how the lower activation time helps me to > implement BCC2 and ECC2... >
I think this is very straightforward: 1) The scheduler searches all tasks which are in the 'ready' or 'running' state 2) From this set of running and ready tasks the scheduler determines the set of tasks with the highest priority. 3) From this set of highest priorty tasks the scheduler chooses that one, which is the oldest, i.e. that one with the lowest activation time. That's all, isn't it? But remember that for BCC2 the tasks are non-preemptive and for ECC2 preemptions are allowed. Best reagrds, Olaf Barheine
hi,

> > will u please tell me how the lower activation time helps me to > > implement BCC2 and ECC2... > > I think this is very straightforward:
sorry if i asked u in wrong manner.... thanks for the needful reply. please tell me any other things i need to concenrate for imlementing it.now iam doing the analysis for implementing in our RTOS with our team members. with regards, Alagusakthi