Re: request for feature

new topic     » goto parent     » topic index » view thread      » older message » newer message
mattlewis said...
useless_ said...

Can tasks.e use some fast database methods to page out unscheduled tasks to the harddrive? The goal to free up memory and task pointers.

This strikes me as fairly difficult for the interpreter. We'd need to serialize all of the private data for the entire stack of the task as well as be able to jump back to the appropriate point where execution left off.


Well, not entirely quite exactly, if it's a requirement the task save it's own variables when done, that's trivial for the programmer to do. What's more difficult is the app saving a portion of it's own source code, and then a week later that app, or even another app, reloading it. Or reloading it twice under different task ID's.

mattlewis said...

Where I think this would be really tricky is with the translator. I'm not even sure it's possible without doing lots of nasty stack manipulation (which was what broke the old task implementation when we started looking like a stack smashing piece of malware to the OS).


But if the task has returned, it's done doing whatever it was written to do, it executed "end procedure", then isn't it off the stack?

mattlewis said...
useless_ said...

I wish to cycle thru lists of functions (procedures) to do similar, i guess, to how a cron job scheduler would work, and each task does things in the global application, then when it's done enough, and enough times, it can be paged out until needed again. The problem is the task system can run out of memory and pointers, if i leave this running, with intent for it to keep on for a year, it could crash in 11 months simply by filling all memory with task overhead, and i will have wasted all that time.

Alternatively, you might add a layer between std/task.e and the parts of your code that use them. This way, your task overseeing code refers to the tasks by whatever sort of ID system you like. Your tasks would have to actually end instead of just suspend, at which point all of the task memory would get recycled.

Ah, it's the "actually end" words i didn't use, i said "when it's done enough", to mean "i am through with it, it's over, done", so it saving it's data itself, instead of the task manager doing it, then executing "end procedure" is fine. I didn't mean to have task manager save a running block of code. But i did think the task manager would have access to the procedure's variable list and with a swipe of it's magic wand just run thru and save them all.

And the part about reloading the code for execution later, possibly by an app that did not have that source code as it's code, but wanted to execute it one or more times.

useless

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu