EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Self restarting property of RTOS-How it works?

Started by Unknown February 7, 2005
Dear all,
  I was going through the explaination for taskRestart() call in the
vxworks reference manual.I believe such a feature is available for most
of the RTOS in the market.This dicussion talks about vxworks,But it
applies in general for any rtos which offers a restarting facility.I am
looking for replys from a architecture perspective rather then os
specific discussion.

Vxworks reference manual for taskRestart() states the following:
"This routine "restarts" a task. The task is first terminated, and then
reinitialized with the same ID, priority, options, original entry
point, stack size, and parameters it had when it was terminated.
Self-restarting of a calling task is performed by the exception task.
The shell utilizes this routine to restart itself when aborted. "

I have never got a chance to use this call in my application,but
curious to learn how it works.Heres my doubt:

After restarting will the task start executing from the starting point
or will execute from where it left?(that means continue executing,from
the point where its terminated before restarting?).


Incase it starts executing from scratch from the place where its
spawned,will it not cause problems to my application?For eg,I am in
middle of some biomedical application and some task goes for a toss and
I restart it using this call,the task will start performing everything
from scratch which may not be suitable to the current status of
application(In terms of micro heart surgery,typically lets say the task
performing the cutting of tissues goes for a toss after some time,and I
restart,if it again starts cutting the tissues which is not required
for me,because I have already removed it!).

If its otherway around,for eg it starts executing from the point where
it got terminated,how does the task ensure it gets all the resources
like I/O device,semaphores or some other resource,which is required to
execute from the point where it was terminated?Because the time before
it restarts,may be there can be another high priority task which may
own the resources required by the current task and I feel this should
not be possible because it will cause problem to the entire
application.

In precise can someone clarify me how this taskRestart() call
work?Under what situations its preferred to use this call?What are the
pros and cons of using this call in our application?

Looking farward for your replys and advanced thanks for the same,

Regards,
s.subbarayan

You wil find an explanation and advices here:
http://www.bluedonkey.org/cgi-bin/twiki/bin/view/Books/VxWorksCookbookTheKernel#Restarting_a_Task
Look for restarting a task

s_subbarayan@rediffmail.com wrote:

snip

> After restarting will the task start executing from the starting point > or will execute from where it left?(that means continue executing,from > the point where its terminated before restarting?). > > > Incase it starts executing from scratch from the place where its > spawned,will it not cause problems to my application?For eg,I am in > middle of some biomedical application and some task goes for a toss
snip
>
Are you saying that it's acceptable in any way, shape or form for a task in a biomedical application to "go for a toss"? -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
> After restarting will the task start executing from the starting point > or will execute from where it left?(that means continue executing,from > the point where its terminated before restarting?).
Surely "restart" is self-explanatory?
> For eg,I am in > middle of some biomedical application and some task goes for a toss
Damn. Fell for the troll :-( *plonk* Al.
Al wrote:
> > After restarting will the task start executing from the starting
point
> > or will execute from where it left?(that means continue
executing,from
> > the point where its terminated before restarting?). > > Surely "restart" is self-explanatory?
If this is the case, your question mark is redundant.
> > > For eg,I am in > > middle of some biomedical application and some task goes for a toss > > Damn. Fell for the troll :-( >
Whenever someone asks a newbie question there are always would be gurus who feel obliged to be insulting even if the question was politely expressed. I think there is a pattern here.
> Al.
Right
"Tim Wescott" <tim@wescottnospamdesign.com> wrote in message
news:110f5dul9b2grdc@corp.supernews.com...
> s_subbarayan@rediffmail.com wrote: > > snip > > > After restarting will the task start executing from the starting point > > or will execute from where it left?(that means continue executing,from > > the point where its terminated before restarting?). > > > > > > Incase it starts executing from scratch from the place where its > > spawned,will it not cause problems to my application?For eg,I am in > > middle of some biomedical application and some task goes for a toss > > snip > > > > Are you saying that it's acceptable in any way, shape or form for a task > in a biomedical application to "go for a toss"? >
Oh, is that not acceptable? I hadn't fully divined your attitude toward the patients... Rufus
Hi,
While I appreciate your sincerity in replying,I would be happy if you
avoid circausism in your reply.When I say task goes for a toss-this
does not mean that always it goes to it,I was refering to the
exceptional condition,such exceptional conditions do happen in
biomedical world,if you could remember or read about THERMAC
radioactive machines which failed due to some problem.While people
take exceptional care for biomedical,some times human error do happen.
I believe you are also human being to accept errors and no ones GOD
here remember.
Regards,
s.subbarayan



Tim Wescott <tim@wescottnospamdesign.com> wrote in message news:<110f5dul9b2grdc@corp.supernews.com>...
> s_subbarayan@rediffmail.com wrote: > > snip > > > After restarting will the task start executing from the starting point > > or will execute from where it left?(that means continue executing,from > > the point where its terminated before restarting?). > > > > > > Incase it starts executing from scratch from the place where its > > spawned,will it not cause problems to my application?For eg,I am in > > middle of some biomedical application and some task goes for a toss > > snip > > > > Are you saying that it's acceptable in any way, shape or form for a task > in a biomedical application to "go for a toss"?
Well said!Some people are more interested in fishing for the errors in
the query ,leaving the crux of the main query....

"Lanarcam" <lanarcam1@yahoo.fr> wrote in message news:<1107855611.010433.245820@c13g2000cwb.googlegroups.com>...
> Al wrote: > > > After restarting will the task start executing from the starting > point > > > or will execute from where it left?(that means continue > executing,from > > > the point where its terminated before restarting?). > > > > Surely "restart" is self-explanatory? > > If this is the case, your question mark is redundant. > > > > > > For eg,I am in > > > middle of some biomedical application and some task goes for a toss > > > > Damn. Fell for the troll :-( > > > > Whenever someone asks a newbie question there are always would be gurus > who feel obliged to be insulting even if the question was politely > expressed. I think there is a pattern here. > > > Al. > > Right
"s.subbarayan" <s_subbarayan@rediffmail.com> wrote in message 
news:c396173e.0502082037.54b8b7e@posting.google.com...
> Hi, > While I appreciate your sincerity in replying,I would be happy if you > avoid circausism in your reply.When I say task goes for a toss-this > does not mean that always it goes to it,I was refering to the > exceptional condition,such exceptional conditions do happen in > biomedical world,if you could remember or read about THERMAC
Therac-25. Not a computer problem per se, but often used as an example of system failures due to design error.
> radioactive machines which failed due to some problem.While people > take exceptional care for biomedical,some times human error do happen. > I believe you are also human being to accept errors and no ones GOD > here remember. > Regards, > s.subbarayan > > > > Tim Wescott <tim@wescottnospamdesign.com> wrote in message > news:<110f5dul9b2grdc@corp.supernews.com>... >> s_subbarayan@rediffmail.com wrote: >> >> snip >> >> > After restarting will the task start executing from the starting point >> > or will execute from where it left?(that means continue executing,from >> > the point where its terminated before restarting?). >> > >> > >> > Incase it starts executing from scratch from the place where its >> > spawned,will it not cause problems to my application?For eg,I am in >> > middle of some biomedical application and some task goes for a toss >> >> snip >> >> > >> Are you saying that it's acceptable in any way, shape or form for a task >> in a biomedical application to "go for a toss"?
Top-posting fixed.

s.subbarayan wrote:
> > Tim Wescott <tim@wescottnospamdesign.com> wrote in message news:<110f5dul9b2grdc@corp.supernews.com>... > >>s_subbarayan@rediffmail.com wrote: >> >>snip >> >> >>>After restarting will the task start executing from the starting point >>>or will execute from where it left?(that means continue executing,from >>>the point where its terminated before restarting?). >>> >>> >>>Incase it starts executing from scratch from the place where its >>>spawned,will it not cause problems to my application?For eg,I am in >>>middle of some biomedical application and some task goes for a toss >> >>snip >> >> >>Are you saying that it's acceptable in any way, shape or form for a task >>in a biomedical application to "go for a toss"?
> > Hi, > While I appreciate your sincerity in replying,I would be happy if you > avoid circausism in your reply.When I say task goes for a toss-this > does not mean that always it goes to it,I was refering to the > exceptional condition,such exceptional conditions do happen in > biomedical world,if you could remember or read about THERMAC > radioactive machines which failed due to some problem.While people > take exceptional care for biomedical,some times human error do happen. > I believe you are also human being to accept errors and no ones GOD > here remember. > Regards, > s.subbarayan > > The Therac 25 killed because of piss-poor design in a piss-poor environment that allowed piss-poor software quality -- probably because people had the attitude that mistakes happen and errors that may kill me or you are acceptable as long as money is being made. For details on the Therac 25 accidents see http://www.embedded.com/showArticle.jhtml?articleID=55300689 and http://sunnyday.mit.edu/papers/therac.pdf. When those tasks "went for a toss" it was because several somebodies weren't paying a hell of a lot of attention. The _only_ excuse that can be granted is that the Therac 25 was one of the first systems where the software had the power to kill people. It's been 20 years, we should know better now. These days going to exceptional lengths to insure software quality in life-critical applications is no more playing god than changing your tires when they go bald, it's simply doing what should be done. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com

The 2024 Embedded Online Conference