Liste des Groupes | Revenir à ca embedded |
You asked how best to handle these things. The answer is provideI object to the *complexity* that all those different potential
options in the scheduler and ensure that the options are (at least)
considered by the programmer by making them /required/ parameters.
If you don't like the number of parameters, pass them as a structure.
Exactly. Why tell the scheduler how to respond to changes in theWhat you're describing here is meta: it's a condition of utilizing theIf you treat the tasks in a system as being flexible in their
scheduling (which is inherent in almost all multitasking systems...
you can't be assured when ANY task *actually* executes), then you
can't define hard limits as to how "late" something can happen.
scheduler in the 1st place, not a condition of triggering a scheduled
event.
I think what you may really /mean/ is dependency scheduling ... i.e.No, it is a reflection of how "now" has changed from what the
"this event depends on there being one or more other events already
scheduled".
The number and criticality of such dependencies can be unbounded - orThat is my point. schedule(X) simply and unconditionally schedules X.
at least unworkable to specify - and I don't think checking for them
belongs /in/ the scheduler or its API. If some program depends on
such meta knowledge of what is scheduled, it should have to keep track
of that itself.
It's just another object. Anyone (including some OTHER task)If all the options can be (de)selected individually, then you don'tAgain the Windows scheduler: (paraphrased) there are options to>
"wait <time units> for idle state"
"wait until in idle state for <time units>"
"stop if idle state ceases"
"start again if idle state resumes"
"after trigger delay execution randomly for <time units>"
"remove from schedule after <epoch>"
"check for network connections available"
"start only on line power"
"stop if on battery"
"wake up to run this task"
"keep trying to start for so many <time units>"
"stop/abort after so many <time units>"
"stop the task if it runs too long"
"force abort the task if it won't stop"
>
and more.
And, no matter how many -- and how BLOATED the syscall becomes -- there
will STILL be conditions that are applicable to specific tasks.
>
Rather than trying to anticipate ALL of them to handle *in* the
syscall (and STILL having to account for others that were not
envisioned), it seems more prudent to have the syscall UNCONDITIONALLY
perform its action and let the developer assume responsibility for
writing explicit code to handle cases that *it* considers as "special".
Especially as bugs *there* are readily contained in the task's
environment and don't risk corrupting the kernel.
have to bundle them all together ... but then you run the risk of the
programmer forgetting something.
It's a good idea anyway for the API to allow modifying an existing
schedule without having to delete/recreate it (even if "modify" really
is just an illusion for the programmer).
Scheduling in a complex system is NOT SIMPLE and it never has been:This is why it is easier (to get "right") a simple, unconditional
whole books have been written about it. The overwhelming majority of
events likely will require only a small subset of the scheduler's
options, but the scheduler itself must deal with the most complex case
possible.
You might consider having multiple APIs [parameter blocks?] of varying
complexity. But there must be some version of the API that can
specify every possible option.
There are also /schedule/ priorities[*], and the task itself can be>
scripted to run at a given OS priority (and as any particular user).
Sub "resource" for "idle" and this list ought to give you a few ideas
for what you should provide.
>
>
[*] schedule priority is not visible in the GUI. To see/modify it you
need to export the task to XML, edit the file and import it to
recreate the task with new settings. Yeah, Windows really /is/ a pain
sometimes.
Les messages affichés proviennent d'usenet.