Task delay

Joel Oliveira Pinto jollp at isep.ipp.pt
Mon May 6 14:07:31 UTC 2019


Hello Sebastian,

First of all, sorry for the delay in the reply and for not being clear in my question. Currently, I am finalizing the implementation of two scheduling algorithms: CBS (Constant Bandwidth Server) and CSS (Capacity Sharing and Stealing). In fact, CBS is a refactoring proposal that IMO improves the current CBS RTEMS implementation. BTW: Soon I will submit the tickets and the respective patches.

In the course of the CSS implementation I was looking for a way to postpone job releases. For instance, assuming that a job with an inter-arrival time is released at time t, I wanted to delay its release for y instants, i.e., from t to t+y, without interfering with the minimum inter-arrival time of the task specified initially.

 In the meantime, to solve the issue, I decided to wait until the job unblocks and then perform the following steps in order to delay its release:

_Thread_Set_state( the_thread, STATES_WAITING_FOR_PERIOD );
_Thread_Wait_flags_set( the_thread, THREAD_WAIT_STATE_BLOCKED );
_Thread_Add_timeout_ticks( the_thread, cpu_self, ticks );


This solves the problem since it blocks the job for a given time (using the functions _Thread_Set_state() and  _Thread_Add_timeout_ticks()), thus performing the desired delay on the job arrival without modifying the inter-arrival time previously defined with the Rate Monotonic Manager.

Is there an alternative way of achieving this goal?

Regards,

________________________________
From: Sebastian Huber <sebastian.huber at embedded-brains.de>
Sent: Tuesday, April 9, 2019 6:45:25 AM
To: Joel Oliveira Pinto; RTEMS
Subject: Re: Task delay

Hello Joel,

On 08/04/2019 23:24, Joel Oliveira Pinto wrote:
>
> Hey,
>
>
> I've been implementing a reservation-based scheduler in RTEMS and i've
> been searching how to postpone a job release or even to delay a task
> that is not the executing thread, and unfortunately, i'm having some
> troubles finding the solution. Did someone already find out how to do
> it or anyone as any clue ?
>

could you please describe a bit more what you want to achieve?

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20190506/9c43bdb8/attachment.html>


More information about the devel mailing list