so i explain. the application is very conplicated. atm it got 223 tasks but it will get more. ride51 has the code compresser. does uvision? i mean i want each task uncompress when it runs. how? wait for the reply now.
Let task 224 contain pkzip, winrar, zoo or maybe lzh.
Patch the task switcher to decompress on every task switch - after all, with 223+ tasks, the average task should be quite small.
Potentially improve the performance by allocating 4MB cache for recently decompressed tasks in an LRU memory structure.
hey. thx for the answer but i am a noob and what are the zoo or lzh. i have winrar on my pc. can i put it into uvision? i have 64k of iram and sram. how can i add 4mb cach?
Solder it!
i dont understand you/ what is a cach? are you a computer or a real person? you answer very quick.
how do you plan to fit 223 'tasks' in the 64k memory of a '51?
Erik
Maybe, just maybe, the word "task" here is used about functions. So the code has 223 functions.
Because 223 actual tasks is more in the line of a running Linux system with mail server, web server, database server, ...
And 223 tasks, would mean a significant amount of stack space, even if only 10 % of the tasks are started at any one point in time.
Besides - the 8051 is one of the worlds worst processors to use with tasks/threads, because of the limitations in memory indexing, stack management, ...
In the end, something is very wrong here - either in use of terminology, or in expected capabilities of the processor.
Because 223 actual tasks is more in the line of a running Linux system with mail server, web server, database server, ... it has been posted in one of the fora (and not joking) "how do I implement Linux on a '51"
i do know what a function is and i know what a task is and i know what linux is. when i sayed 223 tasks i mean i have 223 tasks. what is rediculous? they dont all run at the same time. i know only one runs at a time. do you know it? no. when i finish this i will put my code on google and you can see. you just answer a question i did not ask and think i am wrong.
If only one task at a time runs, you are wrong.
Tasks are for (semi)concurrent execution. So no tasks are needed if only one runs at a time...
i give you lesson. yu dont know that the c51 only can execute one instruction at a time. it can only execute one task at a time. only one task can run at a time. it is a very complex program and needs a lot of tasks. i think you have never written a big complex program like mine. when i finish the code i will put it on google and you can learn.
it is a very complex program and needs a lot of tasks
Why is that necessary? Come on, tell us. We want to learn.
The following code have an even larger complexity - 1947 "tasks". But since only one can run at a time, each task has become a function to call. So zero task support needed. No extra task stacks needed. Just 1947 functions for the specific "tasks" to perform.
Now how is that for complexity?
int main() { initialize(); for (;;) { switch (find_out_what_to_to()) { case TASK_1: do_task_1(); break; case TASK_2: do_task_2(); break; ... case TASK_1947: do_task_1947(); break; default: oops_repair(); } } }
The days are ticking - when can we expect this master-class lecture on the writing of advanced, complicated, applications using 223 threads but with only one thread "runnable" (as separate from "running") at any one time?
Can we also expect a nice diagram showing the timing and sequence interaction between the 223 threads, so we can be awed at the exquisite handover mechanisms and state machine designs used to get the data pumping around in the system in a deterministic way?
so you should be careful. you show you are very fast to mock and even faster to judge. and you still mislead with things i not say. i am busy. you waste my time with nonsense. be patient and open your mind.
So have you spent some time considering my posted code about a state machine calling functions depending on what current task to do? Zero impact on the stack, and produces excellent code for the 8051 processor.
Remember that a concept with threads means that all 223 threads are execution root objects, making it impossible for the compiler to find how to overlay variables.
But what do I know. A state machine must be nonsense since so many people are using them.
so i did waste some time with your suggestions. but it is obviously no good for my project. i said first it is very conplicated. you probably cannot understand.
dont waste any more of my time to answering the distractions. i see you want to show you are better. but wait.