This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: how to implement EDF scheduling in eCos


>> cyg_thread_create(4, simple_program, (cyg_addrword_t) 0, "Thread A",
>> (void *) stack[0], 4096, &simple_threadA, &thread_s[0], ? ? ? 11, 12, 13);
>> cyg_thread_create(4, simple_program, (cyg_addrword_t) 1, "Thread B",
>> (void *) stack[1], 4096, &simple_threadB, &thread_s[1], ? ? ? 21, 22, 23);
>> printf("Created threads with extended properties\n");
>>
>> Here 11,12,13 (and 21,22,23) are deadline, wcet, period of the first
>> (second) thread respectively.
>
> To avoid changing the kernel API, I suggest that you pass the deadline,
> wcet and period by using the sched_info parameter of the
> cyg_thread_create() call as the address of a scheduler-specific data
> structure.

Well, I think this part of the API is scheduler specific and an EDF
scheduler just differs from a MLQ scheduler. So, IMO it would be ok
the provide an API that is specific for the EDF scheduler. I believe,
the idea to *just* replace the MLQ scheduler by an EDF scheduler in
some application is not a wise one, so a different API should not hurt
that bad.

>> One more question is, there are kernel tests in eCos repository, are
>> they to check eCos kernel after such a modification?
>
> Many of the kernel tests will exercise the scheduler. Some of the
> existing kernel tests require a specific scheduler implementation, but
> many should be scheduler-independent.
>
> Unfortunately, the tests are written to assume that the sched_info
> parameter of the cyg_thread_create() call contains the initial thread
> priority. Some minor changes to the tests will therefore be necessary.
> You can always use cyg_thread_set_priority() to set an initial priority
> following thread creation.
>
> You should also consider writing your own scheduler-specific test(s).

I would not even consider to get all the existing scheduler tests
running. Many testcases won't work because the concepts of static
priorities and the EDF scheduler differ to much.

Just replacing the scheduler also is not enough, if you want to
provide EDF scheduling within eCos, e.g. the synchronisation protocols
implemented within the mutex have to be adapted for dynamic
priorities, too.

Ciao, Fabian

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]