| Author |
Message |
Guest
|
Posted:
Mon Feb 07, 2005 7:55 am Post subject:
Self restarting property of RTOS-How it works? |
|
|
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 |
|
| Back to top |
|
 |
Lanarcam
Guest
|
|
| Back to top |
|
 |
Tim Wescott
Guest
|
Posted:
Mon Feb 07, 2005 9:22 pm Post subject:
Re: Self restarting property of RTOS-How it works? |
|
|
s_subbarayan@rediffmail.com wrote:
snip
| Quote: | 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
| Quote: |
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 |
|
| Back to top |
|
 |
Al
Guest
|
Posted:
Tue Feb 08, 2005 3:53 am Post subject:
Re: Self restarting property of RTOS-How it works? |
|
|
| Quote: | 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?
| Quote: | For eg,I am in
middle of some biomedical application and some task goes for a toss
|
Damn. Fell for the troll :-(
*plonk*
Al. |
|
| Back to top |
|
 |
Lanarcam
Guest
|
Posted:
Tue Feb 08, 2005 2:40 pm Post subject:
Re: Self restarting property of RTOS-How it works? |
|
|
Al wrote:
| Quote: | 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.
| Quote: |
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.
Right |
|
| Back to top |
|
 |
Rufus V. Smith
Guest
|
Posted:
Tue Feb 08, 2005 8:03 pm Post subject:
Re: Self restarting property of RTOS-How it works? |
|
|
"Tim Wescott" <tim@wescottnospamdesign.com> wrote in message
news:110f5dul9b2grdc@corp.supernews.com...
| Quote: | 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 |
|
| Back to top |
|
 |
s.subbarayan
Guest
|
Posted:
Wed Feb 09, 2005 7:57 am Post subject:
Re: Self restarting property of RTOS-How it works? |
|
|
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>...
| Quote: | 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"? |
|
|
| Back to top |
|
 |
s.subbarayan
Guest
|
Posted:
Wed Feb 09, 2005 7:57 am Post subject:
Re: Self restarting property of RTOS-How it works? |
|
|
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>...
| Quote: | 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 |
|
|
| Back to top |
|
 |
Hank Oredson
Guest
|
Posted:
Wed Feb 09, 2005 7:57 am Post subject:
Re: Self restarting property of RTOS-How it works? |
|
|
"s.subbarayan" <s_subbarayan@rediffmail.com> wrote in message
news:c396173e.0502082037.54b8b7e@posting.google.com...
| Quote: | 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.
| Quote: | 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"? |
|
|
| Back to top |
|
 |
Tim Wescott
Guest
|
Posted:
Wed Feb 09, 2005 1:43 pm Post subject:
Re: Self restarting property of RTOS-How it works? |
|
|
Top-posting fixed.
s.subbarayan wrote:
| Quote: |
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 |
|
| Back to top |
|
 |
CBFalconer
Guest
|
Posted:
Wed Feb 09, 2005 3:28 pm Post subject:
Re: Self restarting property of RTOS-How it works? |
|
|
**** top-posting fixed ****
"s.subbarayan" wrote:
| Quote: | Tim Wescott <tim@wescottnospamdesign.com> wrote in message
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"?
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.
|
Please do not toppost. Your answer belongs after the material to
which you reply, after snipping whatever is not germane.
There is a language barrier here. You are both expressing the same
concern for the medical patient. THERAC, IIRC, was due to the
silly use of a language and system that did not catch overflows
(such as most C systems).
--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson |
|
| Back to top |
|
 |
Jan Vorbrüggen
Guest
|
Posted:
Wed Feb 09, 2005 4:29 pm Post subject:
Re: Self restarting property of RTOS-How it works? |
|
|
| Quote: | There is a language barrier here. You are both expressing the same
concern for the medical patient. THERAC, IIRC, was due to the
silly use of a language and system that did not catch overflows
(such as most C systems).
|
While that was a contributing factor, the real problems were those of
all systems that do parallel processing in one form or the other: syn-
chronization, global time and event ordering, inconsistent system state.
There's a lot of public information available, down to the implementation
behind certain features that led to the errors. Whether that code was
written in C was largely irrelevant.
Jan |
|
| Back to top |
|
 |
R Adsett
Guest
|
Posted:
Wed Feb 09, 2005 9:17 pm Post subject:
Re: Self restarting property of RTOS-How it works? |
|
|
In article <QoiOd.3768$mG6.73@newsread1.news.pas.earthlink.net>,
horedson@earthlink.net says...
| Quote: | "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.
|
And as much (or more) to the point of the original question no thread or
task 'went for a toss' so restarting would have had no effect.
Robert |
|
| Back to top |
|
 |
Tim Wescott
Guest
|
Posted:
Wed Feb 09, 2005 10:08 pm Post subject:
Re: Self restarting property of RTOS-How it works? |
|
|
CBFalconer wrote:
| Quote: |
There is a language barrier here. You are both expressing the same
concern for the medical patient. THERAC, IIRC, was due to the
silly use of a language and system that did not catch overflows
(such as most C systems).
|
My one value-adding experiencing with Ada was debugging code written by
another company who's attitude was "you write in C, therefore all the
bugs are yours".
You can write crappy code in any language.
You can write solid, quality code in any language.
I liken writing life-critical code to driving a car full of sleeping
children: I can pretty much do anything I choose, but some of my choices
can be quite disastrous for a number of innocent lives. If _all_ layers
of your organization take responsibility for the lives of the people who
can be affected by the product, and if the people working with the
software are aware of the known methods for developing then chances are
the software will be up to snuff. It doesn't really matter whether the
language is C, Ada, assembly or COBOL (although a flight-control or
biomedical system written in COBOL boggles the mind).
It ain't the code, it's the coders that make the difference.
--
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com |
|
| Back to top |
|
 |
Guy Macon
Guest
|
Posted:
Wed Feb 09, 2005 10:43 pm Post subject:
Re: Self restarting property of RTOS-How it works? |
|
|
Tim Wescott wrote:
| Quote: | I liken writing life-critical code to driving a car full of sleeping
children: I can pretty much do anything I choose, but some of my choices
can be quite disastrous for a number of innocent lives. If _all_ layers
of your organization take responsibility for the lives of the people who
can be affected by the product, and if the people working with the
software are aware of the known methods for developing then chances are
the software will be up to snuff. It doesn't really matter whether the
language is C, Ada, assembly or COBOL (although a flight-control or
biomedical system written in COBOL boggles the mind).
It ain't the code, it's the coders that make the difference.
|
I would broaden the above to include the hardware designers.
The earlier models in the Therac series had a microswitch that
would not allow the electron beam to go to lethal levels unless
the electron-beam-to-x-ray converter was in front of the emitter.
The Therac-25 simply turned on the motor and waited X seconds.
The fact that a software bug made it fail to wait is the fault of
the coders, but the fact that the hardware-based lock wasn't there
was the fault of the system/hardware designers.
I have worked on aircraft systems where we did the following:
[1] Challenged the software engineers to write example code that
manages to bypass the hardware interlocks.
[2] Challenged the hardware engineers to introduce a faulty
component (usually a sensor) that manages to confuse or crash
the software.
You can't always do the above, but with many designs you can.
--
Guy Macon
<http://www.guymacon.com/> |
|
| Back to top |
|
 |
|
|
|
|