Hello all,
I revival this thread because i have an ununderstood probleme on my scheduler that lost power at à moment.
All began very slowly (Sorry for my bad english expression)
I have build a little test application named "zBalls" on my OS named "Zumba" (begin on 2005 from my spare time)
There are some balls witch bounce on the screen borders and themselfs
Each zball is a thread that simply calcul the next coordinate of the ball and go to sleep for 80ms
There is 2 others threads:
-One "The creator" For create a zball and go to sleep for 500ms
-Second "The screen" to refresh the screen information.
All of this thread are synchronized with 2 semaphores:
-Semaphore for "Screen"
-Semaphore for zball list on memory
It's semms like that:
(All the balls have an idependent trajectorie and they bounce on the creen border and bounce on other balls)
Here the overview of architecture
- Scheduler is roundrobin
- Timerlist used to sleep threads
- Waitq Semaphore Screen : for screen acces synchro
- Waitq Liste : for data liste(list of zball) acces syncho
My Probleme:
1/ At the beginning all work correctly
- There is 13 zball thread + 2 threads (create + screen) + 1 (my Idle thread)
- 2 are actif in the scheduler
- 14 timer existe, so 14 thread sleeping
- Semaphore(waitq) are not solicited
2/ At 62 zball, all is OK
- More thread sleeping (greate !)
3/ At 126 zball QEMU : SCRATCH !!!
The apparent fludity go down so quickly, 125 zball all is OK, at 126 all down very very slowly
- 116 thread want to acces the liste
4/ An other try, but now is the screen
Like before, power go down, all be very slow....
- 104 thread want to acces the screeen...
5/ If i wait the power slow more and more down
zball d'ont move every 80 ms, it now move every 1 or 3 sec....
6/ Boch slow down progressively
look i can run 370 thread and the power slow down progressively. look sharing of ressources demande 163 for screen 197 for liste
7/ On reeal architecture i can go to 256 threads very greate and at the 257 all are going to slow down immédiately !!!
I check for RAM allocation (see corner top_right)
So i think i have win the place of "The Os can't run a small peace of thread"... i just can run 257 in the same time.
But i think it's not common to have 250 thread who want to access to the same ressource but perhaps it can be, what do you think ?
* I just want to know if it's a "normal" comportement of a stressed scheduler ?
* Can you tell me you impression or idée ?
* Have you try this kind on processing ? what is the result ? does your OS Fall Down immédiately if you go off a limit ? What is this limit ? How many thread can you run on a sharing ressource ?
Thanks a lot for read me
(Please thousands excuses for my bad english expression)
Have nice coder day
Molux