new to QNX

bridged with qdn.public.qnxrtp.applications
Post Reply
Karthik

new to QNX

Post by Karthik » Fri Apr 19, 2002 10:49 pm

Hi,

I was trying to write a scheduler as one of the processes running on top of
the Micro-kernel. I am not able to understnd the best way to approach the
problem. Assuming that I am trying to schedule real-time tasks, which are
periodic to start with.

Can anyone let me know what I could do?

Thanks,
Karthik

Jens H Jorgensen

Re: new to QNX

Post by Jens H Jorgensen » Fri Apr 19, 2002 10:49 pm

If you have some code which needs to be executed at a regular rate then you
should look at following functions:

ConnectAttach() - to setup a message channel for receiving timer events
timer_create() - create a timer
timer_settime() - setup the timer
MsgReceive() - for receiving the timer event. Run this one in its own
thread.

If you need you timer tick to be at a higher priority level than any others
then set the priority with SIGEV_PULSE_INIT() before timer_create()

--
Jens

"Karthik" <ckatik@yahoo.com> wrote in message
news:a9prk0$fkd$1@inn.qnx.com...
Hi,

I was trying to write a scheduler as one of the processes running on top
of
the Micro-kernel. I am not able to understnd the best way to approach the
problem. Assuming that I am trying to schedule real-time tasks, which are
periodic to start with.

Can anyone let me know what I could do?

Thanks,
Karthik

Karthik

Re: new to QNX

Post by Karthik » Sat Apr 20, 2002 10:34 pm

Thanks Jens.

But I thought that if there are multiple events which need to be processed,
that is more processes enter at the same time, I should be able to decide
which one to schedule (based on an algorithm) among those. In order to do
that, can I read the event queue till I reach the end of the queue or
something like that? I do not have any idea regarding the number of events
that I need to read either....

I hope the point that I am trying to make is clear.

Karthik

"Jens H Jorgensen" <jhj@remove-nospam-videk.com> wrote in message
news:a9q04c$ijo$1@inn.qnx.com...
If you have some code which needs to be executed at a regular rate then
you
should look at following functions:

ConnectAttach() - to setup a message channel for receiving timer events
timer_create() - create a timer
timer_settime() - setup the timer
MsgReceive() - for receiving the timer event. Run this one in its own
thread.

If you need you timer tick to be at a higher priority level than any
others
then set the priority with SIGEV_PULSE_INIT() before timer_create()

--
Jens

"Karthik" <ckatik@yahoo.com> wrote in message
news:a9prk0$fkd$1@inn.qnx.com...
Hi,

I was trying to write a scheduler as one of the processes running on top
of
the Micro-kernel. I am not able to understnd the best way to approach
the
problem. Assuming that I am trying to schedule real-time tasks, which
are
periodic to start with.

Can anyone let me know what I could do?

Thanks,
Karthik



Cowboy

Re: new to QNX

Post by Cowboy » Mon Apr 22, 2002 7:25 pm

Previously, Karthik wrote in qdn.public.qnxrtp.applications:
Thanks Jens.

But I thought that if there are multiple events which need to be processed,
that is more processes enter at the same time, I should be able to decide
which one to schedule (based on an algorithm) among those. In order to do
that, can I read the event queue till I reach the end of the queue or
something like that? I do not have any idea regarding the number of events
that I need to read either....

I hope the point that I am trying to make is clear.
Not really.

If I'm seeing this correctly, you plan to have several tasks that all
must run at the same priority level, and you feel the adaptive round-robin
that the OS uses is not adequate ?

--
Cowboy

Humor in the Court:
Q. Doctor, did you say he was shot in the woods?
A. No, I said he was shot in the lumbar region.

Post Reply

Return to “qdn.public.qnxrtp.applications”